var web_id;
<!--获取登陆信息-->
function getCommonInfo(){
	web_id = ShowCookie('webmaster');
}

<!--检查用户是否登陆函数-->
function checkLogon(){
	getCommonInfo();
	if(!web_id == null ||!web_id == '' ) {
		return true;
	}else{
		return false;
	}
}

<!--每张页面的判断-->
function checkweb_id(){
	if(checkLogon()==true){
		return;
	}else{
	  window.location="/index.html";
	}
}
function checkinweb_id(){
	if(checkLogon()==true){
		return;
	}else{
	  top.location="/index.html";
	}
}
	function checklog(obj){
	name=obj.all.name.value;
	psw=obj.all.psw.value;

	if(!checkUsr(name)) {
       obj.all.name.focus();
       return false;
       }
        if(!checkPwd(psw)) {
        obj.all.psw.focus();
       return false;
       }
	 var url="/imgValidate/valif.jsp?num="+obj.verfy.value;
  new net.ContentLoader(url,subform,null,"GET","num="+obj.verfy.value,null); 

	return false;
	  
}
function show(o){
	var timenow = new Date().getTime();
	o.src="/imgValidate/random.jsp?d="+timenow;
}
var times=0;
function subform(){
	var gtext=this.req.responseText;
  if(gtext.indexOf("validate_successful")!=-1){
   document.forms["form1"].submit();
  }else{
	     times++;
			 if(times>=3){//如果连接3次输入错误，则重载图片，可以防止作弊和用户看不清图片;
					alert('接连3次输入错误。更新验证码，请重新输入');
			 	  document.forms["form1"].verfy.value="";
			 	  show(document.getElementById('random'));
			 	  times=0;
			 	}else{
			  //"第"+times+"次验证码错误,请注意区分大小写 ";
	  }
		document.forms["form1"].verfy.select();
  }

}
function checkUsr(s){		
		var ma = ["用户名不能为空！","用户名由数字、英文、下划线、中杠线组成！","用户名不能为数字"];
		if(!limitLen(s,3,16)){
			alert(ma[0]);
			return false;
		}
		if(!hasAccountChar(s)){
			alert(ma[1]);
			return false;
		}
		return true;
	}
	function checkPwd(s){
		var ma = ["密码不能为空！","密码不能包含中文或全角符号！"];
		//ps.update(s);
		if(!limitLen(s,5,16)){
			alert(ma[0]);
			return false;
		}
		if(hasChineseChar(s)){
			alert(ma[1]);
			return false;
		}
		return true;
	}
	function submitForm(obj){
		domian=obj.all.domian.value;
		domian1=obj.all.domian1.value;
		domian2=obj.all.domian2.value;
		var name=domian+"."+domian1+domian2;
		if(domian.length<1){
		alert("域名不能为空");
		return false;
		}
		if(domian1.length<2){
		alert("域名不能为空");
		return false;
		}
		if(!chk(name)){
	alert('域名格式不对');
	return false;
	}
	var url="/imgValidate/ckdomain.jsp?url="+name;
    new net.ContentLoader(url,suburl,null,"GET","url="+domian+"."+domian1+domian2,null); 

	return false;
	}
	function suburl(){
	var gtext=this.req.responseText;
  if(gtext.indexOf("validate_successful")!=-1){
   document.forms["reguser"].submit();
  }else{
	alert('您的域名已经被使用，请重新输入');
	  }
}