﻿// JScript 文件

function senfe(o,a,b,c,d){
 var t=document.getElementById(o).getElementsByTagName("tr");
 for(var i=0;i<t.length;i++){
  t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
  t[i].onmouseover=function(){
   if(this.x!="1")this.style.backgroundColor=c;
  }
  t[i].onmouseout=function(){
   if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
  }
 }
}

function XMLHttps(){
var ret=null;
try {ret=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){try {ret=new ActiveXObject("Microsoft.XMLHTTP")}catch(ee){ret=null;}}
if(!ret&&typeof XMLHttpRequest!="undefined"){ret=new XMLHttpRequest();}
return ret;
}


function loadXMLDoc(url,str,id) { 
var xmlHttp=XMLHttps();
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.onreadystatechange=function(){
	if(xmlHttp.readyState==4 && xmlHttp.status==500){alert(xmlHttp.responseText);return false;}
	if(xmlHttp.readyState==4 && xmlHttp.status==200){
	    var obj = document.getElementById(id);
	    obj.innerHTML=xmlHttp.responseText;
	    if(obj.offsetHeight < 20)
	    {
	        obj.style.overflowY="hidden";
	    }
	    xmlHttp=null;
	    }
	 }
    xmlHttp.send(str);
} 

function loadXMLResult(url,str,callback) { 
var xmlHttp=XMLHttps();
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4 && xmlHttp.status==500){alert(xmlHttp.responseText);return false;}
	//if(xmlHttp.readyState==4 && xmlHttp.status==500){alert('Sorry , the page is expired, please login again!');location.href="/";return false;}
	if(xmlHttp.readyState==4 && xmlHttp.status==200){
	    if(callback){callback(xmlHttp);}
	    xmlHttp=null;
	    }
	 }
    xmlHttp.send(str);
} 

function loadXMLResultC(url,str,callback,Way,PageSize) { 
var xmlHttp=XMLHttps();
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4 && xmlHttp.status==500){alert(xmlHttp.responseText);return false;}
	//if(xmlHttp.readyState==4 && xmlHttp.status==500){alert('Sorry , the page is expired, please login again!');location.href="/";return false;}
	if(xmlHttp.readyState==4 && xmlHttp.status==200){
	    if(callback){callback(xmlHttp,Way,PageSize);}
	    xmlHttp=null;
	    }
	 }
    xmlHttp.send(str);
}

function loadXMLResult1(url,str) { 
var xmlHttp=XMLHttps();
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4 && xmlHttp.status==500){alert(xmlHttp.responseText);return false;}
	//if(xmlHttp.readyState==4 && xmlHttp.status==500){alert('Sorry , the page is expired, please login again!');location.href="/";return false;}
	
	 }
    xmlHttp.send(str);
} 

function loadXMLContent(url,str,callback,id) { 
var xmlHttp=XMLHttps();
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4 && xmlHttp.status==500){alert(xmlHttp.responseText);return false;}
	//if(xmlHttp.readyState==4 && xmlHttp.status==500){alert('Sorry , the page is expired, please login again!');location.href="/";return false;}
	if(xmlHttp.readyState==4 && xmlHttp.status==200){
	    callback(xmlHttp,id);
	    xmlHttp=null;
	 }
	}
    xmlHttp.send(str);
} 

