
//首页验证用户登录表单
function checkLogin(){
	var f=document.formLogin;
	var u_name = f.u_name.value;
	var u_password = f.u_password.value;
	if(u_name.length<3 || u_name.value>20){
		alert("对不起，用户名长度3-20");
		f.u_name.focus();
		return false;
	}
	if(u_password.length<6 || u_password.value>20){
		alert("对不起，用户密码长度6-20");
		f.u_name.focus();
		return false;
	}
	return true;
}


function userlogin(){
    var xmlhttp;
    var str;
    var sendstr="";
     try{
             xmlhttp=new XMLHttpRequest();
         }
	catch(e){
             xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
	xmlhttp.onreadystatechange=function(){
          if (xmlhttp.readyState==4){
              if (xmlhttp.status==200){		
			   str = xmlhttp.responseText;	
			   if(str!="")
			   {	
			     document.getElementById("userlogin").innerHTML=str;
			   }	
			   }else{
			   alert("系统错误,如有疑问,请与管理员联系!"+xmlhttp.status);
			 }
          }
       }
	xmlhttp.open("post","/config/userlogin.asp",true);
	xmlhttp.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xmlhttp.send(sendstr); 
 }

function ifmanager(){
    var xmlhttp;
    var str;
    var sendstr="";
     try{
             xmlhttp=new XMLHttpRequest();
         }
	catch(e){
             xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
	xmlhttp.onreadystatechange=function(){
          if (xmlhttp.readyState==4){
              if (xmlhttp.status==200){		
			   str = xmlhttp.responseText;	
			   if(str!="")
			   {	
			     document.getElementById("ifmanager1").href=str;
			
			document.getElementById("ifmanager2").href=str;
			   }	
			   }else{
			   alert("系统错误,如有疑问,请与管理员联系!"+xmlhttp.status);
			 }
          }
       }
	xmlhttp.open("post","/config/ifmanager.asp",true);
	xmlhttp.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xmlhttp.send(sendstr); 
 }

function gethuodong(){
    var xmlhttp;
    var str;
    var sendstr="";
     try{
             xmlhttp=new XMLHttpRequest();
         }
	catch(e){
             xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
	xmlhttp.onreadystatechange=function(){
          if (xmlhttp.readyState==4){
              if (xmlhttp.status==200){		
			   str = xmlhttp.responseText;	
			   if(str!="")
			   {	
			     document.getElementById("huodong").innerHTML=str;
			   }	
			   }else{
			   alert("系统错误,如有疑问,请与管理员联系!"+xmlhttp.status);
			 }
          }
       }
	xmlhttp.open("post","/config/huodong.asp",true);
	xmlhttp.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xmlhttp.send(sendstr); 
 }


function MM_jumpMenu(){
	var href=document.all.menu1.value;
	if(href!="")
	window.top.location=href;
}

