// JavaScript Document

function  AJAX(url)
	 {
 var xmlHttp;
 try{ 
if( window.ActiveXObject ){ 
for( var i = 4; i; i-- ){ 
try{ 
if( i == 2 ){ 
xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" ); }
else{ 
xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP." + i + ".0" ); 
xmlHttp.setRequestHeader("Content-Type","text/xml"); 
xmlHttp.setRequestHeader("Content-Type","gb2312"); }
break;} 
catch(e){ 
xmlHttp = false; } } }
else if( window.XMLHttpRequest )
{ xmlHttp = new XMLHttpRequest(); 
if (xmlHttp.overrideMimeType) 
{ xmlHttp.overrideMimeType('text/xml'); } } }
catch(e){ xmlHttp = false; } 

       xmlHttp.open("GET", url, false);
	   xmlHttp.send(null);
	   return xmlHttp.responseText;
	  		
	}
	


function motype()   
{
	 for(i=document.form.s2.length-1;i>=0;i--){
		document.form.s2.options.remove(i);}
		
		
   var url="motype.asp?pid="+document.form.s1.value+"&t="+Math.random();
   zf=decodeURIComponent(AJAX(url));
   k=zf.indexOf("$") ;
   h=zf.substring(0,k);
   zf=zf.substring(k+1);
   
   
   
   for(j=1;j<=h;j++){
   m=zf.indexOf("^") ;
   p=zf.substring(0,m);
   zf=zf.substring(m+1);
   r=zf.indexOf("#") ;
   s=zf.substring(0,r);
   zf=zf.substring(r+1);
   document.form.s2.options[j]= new Option(s,p);
    }
	  document.form.s2.options[0]= new Option('²ÎÊýÀàÐÍ','');
   document.form.s2.options[0].selected=true;

		}

function check_zb()   
{
	document.getElementById('result').innerHTML="";	
document.form.z_code.value=document.form.content3.value;
document.getElementById('light').style.display='block'; 
document.getElementById('fade').style.display='block';}

function cx(){
	var url="search_zb.asp?z_code="+document.form.z_code.value+"&z_who="+document.form.z_who.value+"&t="+Math.random();
zf=AJAX(url);
if (zf=="1"){
document.getElementById('result').innerHTML="<img src=image/img_pass.gif>";
	}
	else{
		document.getElementById('result').innerHTML="<img src=image/img_fail.gif>";	
		}
		}
