﻿// JScript 文件
function $(id)         
 {
    return (document.getElementById) ? document.getElementById(id) : document.all[id] ;
        
 }

   function getRange()                      //得到屏幕的大小
    {
              var top     = document.body.scrollTop;
              var left    = document.body.scrollLeft;
              var height  = document.body.clientHeight;
              var width   = document.body.clientWidth;

              if (top==0 && left==0 && height==0 && width==0) 
              {
                top     = document.documentElement.scrollTop;
                left    = document.documentElement.scrollLeft;
                height  = document.documentElement.clientHeight;
                width   = document.documentElement.clientWidth;
              }
              return  {top:top  ,left:left ,height:height ,width:width } ;
     }
    
    function showdiv(){ 
      var range = getRange();
     $('doing').style.width = range.width+ "px";
     $('doing').style.height = range.height+600+ "px";
     $('doing').style.display = "block";  
     document.getElementById("showtest").style.display = "block";
     }
  function showon() {
     document.getElementById("doing").style.display = "none";
     document.getElementById("showtest").style.display = "none";
     }
     
  function showlogin(ID){ 
      var range = getRange();
     $('doingdel').style.width = range.width+ "px";
     $('doingdel').style.height = range.height+600+ "px";
     $('doingdel').style.display = "block";  
     document.getElementById("showdel").style.display = "block";
     document.getElementById("ctl00_WebMain_hid").value=ID;
     document.getElementById("ctl00_WebMain_Button1").focus();
     }
  function showloginnew(){ 
      var range = getRange();
     $('doingdel').style.width = range.width+ "px";
     $('doingdel').style.height = range.height+600+ "px";
     $('doingdel').style.display = "block";  
     document.getElementById("showdel").style.display = "block";
     }
  function showonlogin() {
     document.getElementById("doingdel").style.display = "none";
     document.getElementById("showdel").style.display = "none";
     }
     
  function getfocus(){
  
   document.getElementById("ctl00_WebMain_Button1").focus();
        
     }
     
  function FSubmit(e){ if(e == 13 || e == 32){  document.getElementById("ctl00_WebMain_Button1").submit();  e.returnValue = false;   }}
  
  
  function printbypage(){
        
         bdhtml=window.document.body.innerHTML;
         sprnstr="<!--startprint-->";
         eprnstr="<!--endprint-->";
         prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
         prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
         window.document.body.innerHTML=prnhtml;
         window.print();
    }
