   var request = false;
   
   var tableobject;
   
   try {
     request = new XMLHttpRequest();
   } catch (trymicrosoft) {
     try {
       request = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         request = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         request = false;
       }  
     }
   }

function GetTimestring(){
        var d, s;
        var c=":";
        d=new Date(); 
        s+=d.getHours()+c;
        s+=d.getMinutes()+c;
        s+=d.getSeconds()+c;
        s+=d.getMilliseconds();
        return(s);
 }
 
function updateActionPage() {
     if((request.readyState== 4)&&(request.status == 200)) {
		   
	 		if(tableobject)
			{		
				//	alert(request.responseText);
					
					//tableobject.setAttribute("innerHTML",request.responseText);
					
					tableobject.innerHTML=request.responseText;
					
					
					
					eval(tableobject.innerHTML);
					
					tableobject=undefined;
				
	 		}
			
      }
   }
   
function updatePage() {
     if((request.readyState== 4)&&(request.status == 200)) {
		   
	 		if(tableobject)
			{		
				//	alert(request.responseText);
					
					//tableobject.setAttribute("innerHTML",request.responseText);
					
					tableobject.innerHTML=request.responseText;
					
					tableobject=undefined;
				
	 		}
			
      }
   }
 
   
function showPop(url)
{ 
	 if(request)
     {
		
		
     	request.open("GET",encodeURI(url),false);
     	
     	request.setRequestHeader("Content-Type", "text/html");
     	
     //	request.onreadystatechange = updatePage;
	 
		
     	request.send(null);
     }   
  
} 

function PostPop(url,para)
{ 
    if(request)
     {
		
		
     	     request.open("POST",encodeURI(url),false);

              request.setRequestHeader("content-type","application/x-www-form-urlencoded");
     	
		request.setRequestHeader("content-length",para.length); 
		
		
		
     	
     	    request.send(encodeURI(para));
     }   
  
} 


function PostRequest(url,para,idname)
{ 
   tableobject=document.getElementById(idname);
	
   if(tableobject)
		tableobject.innerHTML="<IMG src='images/tbscan.gif'/>";

   if(request)
     {
	request.open("POST",encodeURI(url),true);
	
	 request.setRequestHeader("content-type","application/x-www-form-urlencoded");

	request.setRequestHeader("content-length",para.length); 

	request.onreadystatechange = updatePage;
	     	
     	request.send(encodeURI(para));
     }   
  
}

function getactionasyn(url,idname)
{ 

	tableobject=document.getElementById(idname);
	
	if(tableobject)
		tableobject.innerHTML="<IMG src='images/tbscan.gif'/>";
	
	 if((request)&&(tableobject))
     {
		
     	request.open("GET",encodeURI(url),true);
     	
     	request.setRequestHeader("Content-Type", "text/html");
		
     	request.onreadystatechange = updateActionPage;
		
     	request.send(null);
     }   
  
} 


function getasyn(url,idname)
{ 

	tableobject=document.getElementById(idname);
	
	
	if(tableobject)
		tableobject.innerHTML="<IMG src='images/tbscan.gif'/>";
	
	 if((request)&&(tableobject))
     {
		
     	request.open("GET",encodeURI(url),true);
     	
     	request.setRequestHeader("Content-Type", "text/html");
		
     	request.onreadystatechange = updatePage;
		
     	request.send(null);
     }   
  
} 



function dhtmlWinInCustomUser(command,title)
{
	
	command=command+"&fatherdiv=dhtmlwindowholder";
	
	
	
	var WinInCustomUser=dhtmlwindow.open("viewCusto", "iframe", "http://www.sina.com", title,"width=650px,height=400px,left=100px,top=100px,resize=1,scrolling=1", "", null, "top", "top");
	
}


function getasynbyname(url,childobj)
{ 
	//  alert(name);
	  
	  tableobject=(typeof childobj.parentNode != "undefined")?childobj.parentNode:childobj.parentElement;
	  
	 alert(tableobject);
	 
	 if(request)
     {
		
     	request.open("GET",encodeURI(url),true);
     	
     	request.setRequestHeader("Content-Type", "text/html");
     	
     	request.onreadystatechange = updatePage;
		
     	request.send(null);
     }   
  
} 




function _display_obj(obj, status)
{
		
        obj.style.display=status;
		
}

function Switch(objname,lineitem)
{		
	var obj=document.getElementById(objname);

        _display_obj(obj, obj.style.display=="none"?"":"none");
	return obj.style.display;
}



function Switchspanitem(objname,lineitem)
{		
		var obj=document.getElementById(objname);

        _display_obj(obj, obj.style.display=="none"?"":"none");
		
		
		if(lineitem.lastChild)
		{
			
			if(obj.style.display=="none")
				lineitem.lastChild.setAttribute("src","images/menu-bg-down.gif");
			else
				lineitem.lastChild.setAttribute("src","images/menu-bg-up.gif");
		}
}




function Switchtabitem(lineitem)
{				
		var obj=lineitem.parentNode;
		
		if(obj)
		{
			var t=obj.firstChild;
			
			while(t)
			{
				if(t.nodeName=="SPAN")
				{	t.style.background="";
					t.style.padding=0;
				}
				
				t=t.nextSibling;
				
			}
		}
		lineitem.style.background="url(images/dot.gif) repeat-x";
}

function Switchmain(lineitem)
{				
		var obj=lineitem.parentNode;
		
		if(obj)
		{
			var t=obj.firstChild;
			
			while(t)
			{
			//	if(t.nodeName=="li")
			//	{	
					t.style.background="";
				//	t.style.padding=0;
			//	}
				
				t=t.nextSibling;
				
			}
		}
		lineitem.style.background="url(images/dot.gif) repeat-x";
}

function displaydiv(objname,status)
{		
		var obj=document.getElementById(objname);

        obj.style.display=status;
}


 
function  hide(o){  
document.getElementById("m"+o).style.visibility='hidden'  
}  
 
function  show(o){ 
//alert(o) 
var  m=document.getElementById(o);
m.style.left=getL(o);
//¶øÇÒ×¢ÒâÐèÒªdocument.getElementById
m.style.top=getT(o)+document.getElementById(o).offsetHeight;
m.style.visibility='';
}  


			
function popjsp(url)			
{
		h=document.body;
		
		if(h)
		{
		 var backnotify=document.createElement("script");
						 
		  backnotify.setAttribute("language","javascript");
		  backnotify.setAttribute("type","text/javascript");
		
		 
		  backnotify.setAttribute("charset","utf-8");
		
		  backnotify.setAttribute("src",encodeURI(url));
		
		  h.appendChild(backnotify);
		
		}
						
}


function scrollObj(scrolobj)
{
							 var o;
							 if(scrolobj)
							 {
								 o=scrolobj.firstChild;
								 scrolobj.removeChild(o);
								 wscrolobj.appendChild(o);
							 }
}


function alertwindow(msg,title) {
  
  var tianbabackdiv = document.createElement("DIV");
   	
  tianbabackdiv.setAttribute("id","tianbapackgroud");		
  tianbabackdiv.style.cssText='position:absolute;width:100%;height:100%;left:0px;top:0px;background-color:white;z-index:900;text-align:center;opacity:0.5;filter:Alpha(Opacity=50)';
  	
  var divMsg = document.createElement("DIV");  
  divMsg.setAttribute("id","tianbadivmsg");	
  divMsg.style.cssText ="noWrap:true;font-size:12px;background-color:#ECE9D8;BORDER-RIGHT: #ffffcc 2pt outset;BORDER-TOP: #000000 1pt outset;BORDER-LEFT: #ffffcc 2pt outset;BORDER-BOTTOM: #ffffcc 2pt outset;position:absolute;left:300px;top:60px;width:400px;height:auto;z-index:901";
  

  var text = document.createElement("DIV");
  text.setAttribute("id","tianbadivtext");		
  text.innerHTML=msg;
  text.style.cssText="text-align:left;OVERFLOW-y:auto;noWrap:true;margin-top:4px;margin-right:8px;margin-left:8px";	

  var banner= document.createElement("DIV");
  banner.setAttribute("id","tianbabanner");
  banner.style.cssText="background:url(http://www.myzd.net/images/bg.gif) repeat-x left top;margin-top:0px;width:100%;height:27px;";
  banner.onmousedown=tianbavivdown;
  banner.onmouseup=tianbavivup;
  banner.innerHTML=title+"<img src='http://www.myzd.net/images/claose.gif' style='position:absolute;top:3px; right:10px;' onClick=\"javascript:var fd=document.getElementById('tianbadivmsg');var fdb=document.getElementById('tianbapackgroud');if(fd) fd.parentNode.removeChild(fd);if(fdb) fdb.parentNode.removeChild(fdb);void(0);\"/>";
	
  var btn =document.createElement("INPUT");
  btn.type="BUTTON"
  btn.value = "Close";
  btn.style.cssText="display:block;text-align:left;margin-top:0px;margin-right:20px";

  btn.onclick = function() {
   document.body.removeChild(divMsg);
   document.body.removeChild(tianbabackdiv);
  }
  btn.onblur = function() {
   this.focus();
  }

//  banner.appendChild(btn);
  divMsg.appendChild(banner);
  divMsg.appendChild(text); 
  document.body.appendChild(tianbabackdiv);
  document.body.appendChild(divMsg);

  //btn.focus();

  var tianbalayer = 990;
 var tianbadragok = false;
 var tianbaobj_OX,tianbaobj_OY, tianbamove_y,tianbamove_x,dy,tianbadragobj;


 function tianbadivmove(e)
 {
    if (!e) e = window.event;
    if (tianbadragok==true){
    	tianbadragobj.style.left=tianbaobj_OX+e.clientX-tianbamove_x+ "px";
    	tianbadragobj.style.top=tianbaobj_OY+e.clientY-tianbamove_y+ "px";

    	return false;
    }
}

 function tianbavivdown(e)
 {      
	if (!e) e = window.event;

	var temp = (typeof e.target != "undefined")?e.target:e.srcElement;

        if(temp.getAttribute('id')!="tianbabanner") return;
	

	temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;    	
        

	tianbadragobj=temp;     
	tianbadragobj.focus();
        
	tianbadragok=true;	
	tianbadragobj.style.zIndex =tianbalayer++;

	tianbamove_x= e.clientX;

	tianbamove_y= e.clientY;

	tianbaobj_OX=parseInt(tianbadragobj.style.left)|0;

	tianbaobj_OY=parseInt(tianbadragobj.style.top)|0;

	document.onmousemove=tianbadivmove;
        document.onmouseup=tianbavivup;
	return false;
   }

	function tianbavivup()
	{
   	  tianbadragok= false;
	  document.onmouseup=null;
 	  document.onmousemove=null;
   	 //  banner.onmousedown=null;
  	 //  banner.onmouseup=null;
 	}
	
}

 function refreshframe(url)
	   {
	    // if(rcontrol)
			var obj=document.getElementById("rcontrol");
	    	obj.src="configright.asp?itempara="+url+"&method=requery";	  
	   }	
 