//更改字体大小
var status0='';
var curfontsize=10;
var curlineheight=18;
function fontZoomA(){
  if(curfontsize>8){
    document.getElementById('fontzoom').style.fontSize=(--curfontsize)+'pt';
	document.getElementById('fontzoom').style.lineHeight=(--curlineheight)+'pt';
  }
}
function fontZoomB(){
  if(curfontsize<64){
    document.getElementById('fontzoom').style.fontSize=(++curfontsize)+'pt';
	document.getElementById('fontzoom').style.lineHeight=(++curlineheight)+'pt';
  }
}
function checknum()
{  
  if ( !(((window.event.keyCode >= 48) && (window.event.keyCode <= 57))|| (window.event.keyCode == 13) || (window.event.keyCode == 46)|| (window.event.keyCode == 45)))
  {     
      window.event.keyCode = 0 ;     
   }  
} 
function show(strid){
	  var strId = eval(strid)
	  strId.style.display="";	
}
function hide(strid){
	  var strId = eval(strid)
	  strId.style.display = "none";	
}
//Email格式的验证 
function isEmail(strEmail) {
 if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
  return true;
 else
  return false;
}
var formval="";
var ckbr="\r";
function addtxt(num,txt,txt2){
	var thisname=eval("document.helpform.elemt"+num);
	var cbox="";
	if(thisname.value){
		if(txt){
		cbox=txt+":";
		}
		if(!txt2){
		txt2="";
		}
	    formval=formval+cbox+thisname.value+txt2+ckbr;
	}
}
function addcheckbox(num,txt){
  var thisname=eval("document.helpform.elemt"+num);
  var s = "";
  for(var i=0; i<thisname.length; i++){
    if(thisname[i].name=="elemt"+num){
      if(thisname[i].checked){
        s += thisname[i].value+" ";
	  }
	}
  }
  if(s){
		var cbox=txt+":";
	    formval=formval+cbox+s+ckbr;
  }
}
function addcheckbox2(num,txt){
  var thisname=eval("document.helpform.elemt"+num);
  var s = "";
      if(thisname.checked){
        s += thisname.value;
	  }
  if(s){
		var cbox=txt+":";
	    formval=formval+cbox+s+ckbr;
  }
}

// JScript 文件
var oldid;
var allnum=0;
var isimg=true;
var mapwin = null;
//图片格式判断
function istype(v){
	isimg=true;
	if(v!=""){
		var pos=v.lastIndexOf(".");
		var end=v.length;
		var value=v.substring(pos+1,end);
			if (pos==-1){
			isimg=false;
			}
			if (value!="jpg" && value!="gif" && value!="bmp" && value!="JPG" && value!="GIF" && value!="BMP"){
			isimg=false;
			}
		if (!isimg){
			document.getElementById('tstxt').innerHTML="<img src='../images/defeat_ico.gif' align='absmiddle'/><span class='red'>图片格式错误!支持jpg\\gif\\bmp格式。图片上传限5张，每张且不超过200kb。</span>";
		}
	}
}
function showimg(list,id)
{
	document.getElementById('tstxt').innerHTML="图片上传限5张，每张且不超过200kb，支持jpg\\gif\\bmp格式";
	istype(list.value);
	for(i=1;i<=5;i++)//判断图片是否存在 add by peter
	{
		try
		{
			var temp = document.getElementById("img"+i).src.substring(8,document.getElementById("img"+i).src.length).replace(/%20/g," ").replace(/\//g,"\\");
			if(list.value == temp)
			{
				
				alert("图片重复，请不要上传相同图片！");				
				del_img(id);
				return;						
			}			
		}
		catch(ex){}	
	}// add finished
	if(isimg && list.value!=""){
    	hidefile(id);
	initimg(list,id)
	forinit();
	}
}
function del_img(n)
{
document.getElementById('div_file'+n).innerHTML="";
document.getElementById('div_file'+oldid).innerHTML="";
document.getElementById('imgtd'+n).innerHTML="";
allnum--;
forinit();
}
//插入图片
function initimg(list,n){
	document.getElementById('imgtd'+n).innerHTML="<center><img src='"+list.value+"' align='middle' id='img"+n+"' /><br/>[ <a onclick='del_img("+n+")' style='cursor: pointer;'>删除</a> ]</center>";
	allnum++;
}
//插入文件域
function initfile(num){
	for (var i=1;i<=5;i++)
	{
		if(i!=num){
		hidefile(i);
		}
	}
	document.getElementById('div_file'+num).innerHTML ="<INPUT type='file' NAME='File' class='file1' id='file"+num+"' onchange='showimg(this,"+num+")' >";
	document.getElementById('div_file'+num).style.position="static";
	document.getElementById('div_file'+num).style.visibility="v攀瑮欮祥潃isible";
}
//加载图片后隐藏文件域
function hidefile(num){
    document.getElementById('div_file'+num).style.visibility="hidden";
	document.getElementById('div_file'+num).style.position="absolute";
	document.getElementById('div_file'+num).style.left="0px";
}
//判断那个为空插入
function forinit(){
	if(allnum<=5){
		for (var i=1;i<=5;i++){
			if(document.getElementById('div_file'+i).innerHTML==""){	
			if(allnum<5){
				initfile(i);
			}
				oldid=i;
				break;
			}
		}
	}
}

//去除前后空格
function Trim(s)
{
    if (s == null)
    {
        return s;
    }
    var i;
    var beginIndex = 0;
    var endIndex = s.length - 1;
    for (i=0; i<s.length; i++)
    {
        if (s.charAt(i) == ' ' || s.charAt(i) == '　')
        {
            beginIndex++;
        }
        else
        {
            break;
        }
    }
    for (i = s.length - 1; i >= 0; i--)
    {
        if (s.charAt(i) == ' ' || s.charAt(i) == '　')
        {
            endIndex--;
        }
        else
        {
            break;
        }
    }
    if (endIndex < beginIndex)
    {
        return "";
    }
    return s.substring(beginIndex, endIndex + 1);
}
//去除多余的空格，如果有连续空格，只保留第一个
function cutSpace(s)
{
    var len = s.length;
    var i;
    var ch;
    var result = "";

    i = 0;
    while (i < len)
    {
        ch = s.charAt(i++);
        result += ch;
        while (i < len && (ch = s.charAt(i)) == ' ')
        {
           i++;
        }
    }

    return result;
}
//错误提示颜色
var bcolor="3px solid #F60";
var numcolor="1px solid #999";
//中介隐藏控制
function corzj(){
	  if(document.getElementById("agency1").checked){
	  document.getElementById("trhh").style.visibility="visible";
	  document.getElementById("agency").value=1;
	  }else{
	  document.getElementById("trhh").style.visibility="hidden";
	  document.getElementById("agency").value=0;
	  }
}
//--------------------------------------------------
//add by peter
function GetTitleLen(str)	//得到字符长度
{
    var i,sum;
    sum=0;攀瑮欮祥潃
    for(i=0;i<str.length;i++)
    {
        if ((str.charCodeAt(i)>=0) && (str.charCodeAt(i)<=255))
            sum=sum+1;
        else
            sum=sum+2;
    }
    return sum;
}
//end add

var isok=true;
var hint="";
//整数验证
function isNum(str){
		 var i,j,strTemp;
		 var flag=true;
		 strTemp="0123456789 ";
		 for (i=0;i<str.length;i++)
		 {
			j=strTemp.indexOf(str.charAt(i)); 
			if (j==-1)
			{
				flag=false;
			}
		 }
		 return(flag);
}
//浮点数验证
function isFloat(str){
		 var i,j,strTemp;
		 var flag=true;
		 strTemp="0123456789. ";
		 for (i=0;i<str.length;i++)
		 {
			j=strTemp.indexOf(str.charAt(i)); 
			if (j==-1)
			{
				flag=false;
			}
		 }
		 return(flag);
}
//电话验证
function isTel(str){
		 var i,j,strTemp;
		 var flag=true;
		 strTemp="0123456789.()#- ";
		 for (i=0;i<str.length;i++)
		 {
			j=strTemp.indexOf(str.charAt(i)); 
			if (j==-1)
			{
				flag=false;
			}
		 }
		 return(flag);
}
//邮件验证
function isEmail(theStr)
	{
		var atindex=theStr.indexOf('@');
		var dotindex=theStr.indexOf('.',atindex);
		var flag=true;
		thesub=theStr.substring(0,dotindex+1);
		if((atindex<1)||(atindex!=theStr.lastIndexOf('@'))||(dotindex<atindex+2)||(theStr.length<=thesub.length))
		{
			flag=false;
		}
		else
		{
			flag=true;
		}
		return(flag);
    }
//标题验证-------------------------------------------------
function titelyz(thename){
	thename.value=Trim(thename.value);
	thename.style.border=numcolor;
	if(thename.value==""){
			hint=hint+"* "+"标题不可为空！"+"\r\r";
			thename.style.border=bcolor;
			isok=false;
	}else if (GetTitleLen(thename.value)<10 || GetTitleLen(thename.value)>40){
			hint=hint+"* "+"标题不能少于5个汉字(字母或数字2个算一个汉字)，不能长于20个汉字！"+"\r\r";
			thename.style.border=bcolor;
			isok=false;
	}
}
//价格验证
function isprice(thename){
	if(thename!=null){
		thename.value=cutSpace(Trim(thename.value));
		thename.style.border=numcolor;
		if(thename.value==""){
					hint=hint+"* "+"价格不能为空，并且只能输入整数或\"面议\""+"\r\r";
					thename.sty攀瑮欮祥潃le.border=bcolor;
					isok=false;
		}else{
			if(!isNum(thename.value)&&thename.value!="面议"){
					hint=hint+"* "+"价格格式错误，只能输入整数或\"面议\""+"\r\r";
					thename.style.border=bcolor;
					isok=false;
			}
		}
	}
}
//面议换成0
function mianyi(thename){
	if(thename!=null){
		if(thename.value=="面议"){
			thename.value=0;
		}
	}
}
//浮点验证
function mjyz(thename,b){
	if(thename!=null){
		thename.value=cutSpace(Trim(thename.value));
		thename.style.border=numcolor;
		if(thename.value!=""){
			if(!isFloat(thename.value)){
					hint=hint+"* "+b+"\r\r";
					thename.style.border=bcolor;
					isok=false;
			}
		}
	}
}
//数字必填验证
function thisage(thename,b,c){
	if(thename!=null){
		thename.value=cutSpace(Trim(thename.value));
		thename.style.border=numcolor;
		if(thename.value!=""){
			if(!isNum(thename.value)){
				hint=hint+"* "+c+"\r\r";
				thename.style.border=bcolor;
				isok=false;
			}
		}else{
			hint=hint+"* "+b+"\r\r";
			thename.style.border=bcolor;
			isok=false;
		}
	}
}
//信息描述验证
function specyz(thename){
	thename.style.border=numcolor;
	if(thename.value==""){
			hint=hint+"* "+"详细描述不可为空！"+"\r\r";
			thename.style.border=bcolor;
			isok=false;
	}else if (thename.value.length>4000){
			hint=hint+"* "+"详细描述不能多于4000个字！"+"\r\r";
			thename.style.border=bcolor;
			isok=false;
	}
}
//邮件验证
function mailyz(thename,b){
	thename.value=cutSpace(Trim(thename.value));
	thename.style.border=numcolor;
	if(thename.value==""){
		    hint=hint+"* "+"Email地址不能为空！"+"\r\r";
			thename.style.border=bcolor;
		    isok=false;
	}else if(!isEmail(thename.value)){
			hint=hint+"* "+"请输入正确的Email地址！"+"\r\r";
			thename.style.border=bcolor;
			isok=false;
	}
}
//电话验证
function telyz(thename,b){
	if(thename!=null){
		thename.value=cutSpace(Trim(thename.value));
		thename.style.border=numcolor;
		if(thename.value!=""){
			if(!isTel(thename.value)){
					hint=hint+"* "+b+"\r\r";
					thename.style.border=bcolor;
					isok=false;
			}
		}
	}
}
//QQ/MSN验证
function Q攀瑮欮祥潃Qyz(thename){
	thename.value=cutSpace(Trim(thename.value));
	thename.style.border=numcolor;
	if(thename.value!=""){
     if(!isNum(thename.value)){
			hint=hint+"* "+"QQ格式错误！"+"\r\r";
			thename.style.border=bcolor;
			isok=false;
	}
	}
}
//服务条款验证
function TKyz(thename){
	thename.style.border="none";
	thename.style.padding="2px";
	if(!thename.checked){
		hint=hint+"* "+"对不起，您只有同意《263在线分类信息服务条款》才能发布信息！"+"\r\r";
		thename.style.border=bcolor;
		isok=false;
	}
}
//必填项验证
function bx(thename,b){
	thename.value=Trim(thename.value);
	thename.style.border=numcolor;
	if(thename.value==""){
			hint=hint+"* "+b+"\r\r";
		    thename.style.border=bcolor;
			isok=false;
	}
}
//数字验证
function numyz(thename,b){
	if(thename!=null){
		thename.value=cutSpace(Trim(thename.value));
		thename.style.border=numcolor;
		if(thename.value!=""){
			if(!isNum(thename.value)){
					hint=hint+"* "+b+"\r\r";
					thename.style.border=bcolor;
					isok=false;
			}
		}
	}
}
//最少字符验证
function minleng(thename,b,num){
	thename.value=Trim(thename.value);
	if(thename.value!=""){
		thename.style.border=numcolor;
		if(thename.value.length<num && thename.value.length>0){
				hint=hint+"* "+b+"\r\r";
				thename.style.border=bcolor;
				isok=false;
		}
	}
}
//最多字符验证
function maxleng(thename,b,num){
	if(thename.value!=""){
		thename.style.border=numcolor;
		if(thename.value.length>num){
				hint=hint+"* "+b+"\r\r";
				thename.style.border=bcolor;
				isok=false;
		}
	}
}
//中介名称判断
function zhongjiename(thename,b){
	thename.agencyname.value=Trim(thename.agencyname.value);
	thename.agencyname.style.border=numcolor;
	if(thename.agency.checked){
		if(thename.agencyname.value==""){
			hint=hint+"* "+b+"\r\r";
			thename.agencyname.style.border=bcolor;
			isok=false;
		}
	}
}
//二填一验证
function twoSelOne(thenameA,thenameB,a,b){
	thenameA.value=Trim(thenameA.value);
	thenameB.value=Trim(thenameB.value);
	thenameA.style.border=numcolor;
	thenameB.style.border=numcolor;
	if(thenameA攀瑮欮祥潃.value!=""){
		if(thenameB.value==""){
			hint=hint+"* "+b+"\r\r";
			thenameB.style.border=bcolor;
			isok=false;
		}
	}
	if(thenameB.value!=""){
		if(thenameA.value==""){
			hint=hint+"* "+a+"\r\r";
			thenameA.style.border=bcolor;
			isok=false;
		}
	}
}
//图片验证
function isimgfun(){
	if(!isimg) {
		hint=hint+"* "+"图片格式错误"+"\r\r";
		isok=false;
	}
}
//普通基本型------------------------------------
function check_normal(theForm)
{
	isprice(theForm.price);
	numyz(theForm.age,"年龄格式错误，只能输入整数！");
    mjyz(theForm.housesize,"面积格式错误，只能输入数字！");
	titelyz(theForm.title);
	specyz(theForm.specific);
	bx(theForm.AreaID,"请选择您所在的地区！");
	mailyz(theForm.email);
	telyz(theForm.mobileTel,"手机/电话格式错误！");
	QQyz(theForm.qqmsn);
	TKyz(theForm.fwtk);
	isimgfun();
	if(!isok){
		alert(hint);
		hint="";
		isok=true;
		return false;
      }
	mianyi(theForm.price);
	if(!gopen1('../Logins.aspx?email='+theForm.email.value,410,260))
	{
	    alert('请您登陆！');
	    return false;
	}
	//add by peter
	//document.getElementById('btn_add').innerHTML='<img src=../images/post/fb_btn1.gif>' ;	
	//add finish
return true;
}

 function gopen1(url,w,h)
	{
	var selProdWnd =window.showModalDialog(url,"","dialogWidth="+w+"px;dialogHeight="+h+"px;status:0;scroll:no");
	if (selProdWnd!=undefined)
	  {
	    return selProdWnd;
	  }
	  else
	{
	    return false;
	}
	}
//交友
function check20_68(theForm)
{
	bx(theForm.hometown,"请输入家乡！");
	numyz(theForm.age,"年龄格式错误，只能输入整数！");
	titelyz(theForm.title);
	specyz(theForm.specific);
	bx(theForm.AreaID,"请选择您所在的地区！");
	mailyz(theForm.email);
	telyz(theForm.mobileTel,"手机/电话格式错误！");
	QQyz(theForm.qqmsn);
	TKyz(theForm.fwtk);
	isimgfun();
	if(!isok){
		alert(hint);
		hint="";
		isok=true;
		return false;
      }
//add by peter
	document.getElementById('btn_add').innerHTML='<img src=../images/post/fb_btn1.gif>' ;
	//add finish
	theForm.Submit.disabled=true;
return true;
}
function check20_69(theForm)
{
    thisage(theForm.age,"年龄不能为空！","年龄格式错误，只能输攀瑮欮祥潃入整数！");
	titelyz(theForm.title);
	specyz(theForm.specific);
	bx(theForm.AreaID,"请选择您所在的地区！");
	mailyz(theForm.email);
	telyz(theForm.mobileTel,"手机/电话格式错误！");
	QQyz(theForm.qqmsn);
	TKyz(theForm.fwtk);
	isimgfun();
	if(!isok){
		alert(hint);
		hint="";
		isok=true;
		return false;
      }
//add by peter
	document.getElementById('btn_add').innerHTML='<img src=../images/post/fb_btn1.gif>' ;
	//add finish
theForm.Submit.disabled=true;
return true;
}

function check21_74(theForm)
{
	isprice(theForm.price);
	twoSelOne(theForm.qstart,theForm.qstop,"起点不可为空","终点不可为空")
	titelyz(theForm.title);
	specyz(theForm.specific);
	bx(theForm.AreaID,"请选择您所在的地区！");
	mailyz(theForm.email);
	telyz(theForm.mobileTel,"手机/电话格式错误！");
	QQyz(theForm.qqmsn);
	TKyz(theForm.fwtk);
	isimgfun();
	if(!isok){
		alert(hint);
		hint="";
		isok=true;
		return false;
      }
	 mianyi(theForm.price);
//add by peter
	document.getElementById('btn_add').innerHTML='<img src=../images/post/fb_btn1.gif>' ;
	//add finish
	theForm.Submit.disabled=true;
return true;
}
 function gopen(url,w,h)
	{
	var selProdWnd =window.showModalDialog(url,"","dialogWidth="+w+"px;dialogHeight="+h+"px;status:0;scroll:no");
	if (selProdWnd!=undefined)
	  {
		document.getElementById ("specific").value = document.getElementById ("specific").value + selProdWnd;		        
	  }
	}
	
//插入地图
function showMap()
{
    var mapvalue = document.getElementById("IsMap").value;
    if(document.getElementById("DBID")==null&&document.getElementById("IsMap").value=="")
    {
        window.open("MapBar/Map.aspx?"+getValue(mapvalue));
    }
    else
    {
        openUpdatePoiWin();
    }    
	//win.ref = this;    
//    return false;
}
//得到mapBar需要的参数
function getValue(infoId)
{
    var data = "";
    var name=document.getElementById("title").value;
    data += "name=" +encodeURI(name)+ "&";
    var cityName=document.getElementById("hidCity").value+"市";
    data += "city=" + encodeURI(cityName) + "&";
    var distri攀瑮欮祥潃ctName=document.getElementById('AreaBID').options[document.getElementById('AreaBID').options.selectedIndex].text;
    data += "district=" + encodeURI(districtName) + "&";
    var addressName = "";
    if(document.getElementById('AreaID').options.selectedIndex > 0)
    {
        addressName=document.getElementById('AreaID').options[document.getElementById('AreaID').options.selectedIndex].text;
    }
    data += "address=" + encodeURI(addressName) + "&";
    var typeId=document.getElementById("hidSortB").value;
    data += "typeId=" + typeId + "&";
    data += "infoId=" + infoId;
    return data;
}
//发布信息完成后需要调用的方法
function openUpdatePoiQuiteWin(mapid, name, cityname, areabid, areaid, sortid, infoid, type) 
{
    if(mapid=='1')
    {
        return;
    }
    var url = encodeURI("http://club.mapbar.com/center/client/263/updateMarkPoi.jsp?charset=utf8&publish=1&model=quite&name="+escape(name)+"&mapid="+mapid+"&city="+escape(cityname + "市")+"&district="+escape(areabid)+"&address="+escape(areaid)+"&typeId="+sortid+"&infoId="+mapid);
    window.open(url, "target");    
    if(type == 1)
    {
        alert('修改成功');
        window.close();
    }
	//正式上线连接： http://club.mapbar.com/center/client/263/updateMarkPoi.jsp
	//win.ref = this;
}
function getValue1(infoId)
{
    var data = "";
    var name=document.getElementById("title").value;
    data += "name=" +escape(name)+ "&";
    var cityName=document.getElementById("hidCity").value+"市";
    data += "city=" + escape(cityName) + "&";
    var districtName=document.getElementById('AreaBID').value;
    data += "district=" + escape(districtName) + "&";
    var addressName = "";
    addressName=document.getElementById('AreaID').value;
  
    data += "address=" + escape(addressName) + "&";
    var typeId=document.getElementById("hidSortB").value;
    data += "typeId=" + typeId + "&";
    data += "infoId=" + infoId;
    return data;
}

function CheckReg1(form1) {
		if (form1.User_Name.value == "") {
			window.alert("请填写用户名！");
			form1.User_Name.focus();
			return (false);
		}
		if (form1.User_Name.value.length<6) {
			window.alert("您填写的用户名不足六位！");
			form1.User_Name.focus();
			return (false);
		}
		if (form1.User_Name.value.length>20) {
			window.alert("您填写的用户名长度超过20位，请重新填写！");
			form1.User_Name.focus();
			return (false);
		}
		if (form1.User_Psw.value == "") {
			window.alert("请填写密码！");
			form1.User_Psw.focus();
			return (false);
		}
		if (form1.User_Psw2.value == "") {
			window.alert("请填写确认密码！");
			form1.User_Psw2.focus();
			return (false);
		}
		if (form1.User_PswQues.value == "") {
			window.alert("请填写密码问题！");
			form1.User_PswQues.focus();
			return (false);
		}
		if (form1.User_PswAnsw.value == "") {
			window.alert("请填写密码答案！");
			form1.User_PswAnsw.focus();
			return (false);
		}
		if (form1.User_RealName.value == "") {
			window.alert("请填写姓名！");
			form1.User_RealName.focus();
			return (false);
		}
		if (form1.User_Brith.value == "") {
			window.alert("请填写您的出生年月！");
			form1.User_Brith.focus();
			return (false);
		}
		if (form1.User_Tel.value == "") {
			window.alert("请填写联系电话！");
			form1.User_Tel.focus();
			return (false);
		}		
		if (form1.User_Email.value == "") {
			window.alert("请填写邮件地址！");
			form1.User_Email.focus();
			return (false);
		}		
		if(form1.User_Email.value!=""){
			if (!isEmail(form1.User_Email.value)){
				window.alert("Email格式不正确");
				form1.User_Email.focus();
				return (false);
			}
		}
		if (form1.User_xueli.value == "学历未填") {
			window.alert("请选择学历！");
			form1.User_Email.focus();
			return (false);
		}		
		if (form1.User_Job.value == "") {
			window.alert("请选择您的职务！");
			form1.User_Job.focus();
			return (false);
		}
		else
		{
		  if(form1.User_Mobile.value == ""){
			  alert("手机不能为空");
			  return false;
			  }
			  else{
			return (true);}
		}
	}
function CheckReg2(form1) {
	     form1.User_Content.value = eWebEditor1.getHTML();
		if (form1.User_Name.value == "") {
			window.alert("请填写用户名！");
			form1.User_Name.focus();
			return (false);
		}
		if (form1.User_Name.value.length<6) {
			window.alert("您填写的用户名不足六位！");
			form1.User_Name.focus();
			return (false);
		}
		if (form1.User_Name.value.length>20) {
			window.alert("您填写的用户名长度超过20位，请重新填写！");
			form1.User_Name.focus();
			return (false);
		}
		if (form1.User_Psw.value == "") {
			window.alert("请填写密码！");
			form1.User_Psw.focus();
			return (false);
		}
		if (form1.User_Psw2.value == "") {
			window.alert("请填写确认密码！");
			form1.User_Psw2.focus();
			return (false);
		}
		if (form1.User_PswQues.value == "") {
			window.alert("请填写密码问题！");
			form1.User_PswQues.focus();
			return (false);
		}
		if (form1.User_PswAnsw.value == "") {
			window.alert("请填写密码答案！");
			form1.User_PswAnsw.focus();
			return (false);
		}
		if (form1.User_RealName.value == "") {
			window.alert("请填写姓名！");
			form1.User_RealName.focus();
			return (false);
		}
		if (form1.User_Brith.value == "") {
			window.alert("请填写您的出生年月！");
			form1.User_Brith.focus();
			return (false);
		}
		if (form1.User_Tel.value == "") {
			window.alert("请填写联系电话！");
			form1.User_Tel.focus();
			return (false);
		}		
		if (form1.User_Email.value == "") {
			window.alert("请填写邮件地址！");
			form1.User_Email.focus();
			return (false);
		}		
		if(form1.User_Email.value!=""){
			if (!isEmail(form1.User_Email.value)){
				window.alert("Email格式不正确");
				form1.User_Email.focus();
				return (false);
			}
		}
		if (form1.User_xueli.value == "学历未填") {
			window.alert("请选择学历！");
			form1.User_Email.focus();
			return (false);
		}		
		if (form1.User_Job.value == "") {
			window.alert("请选择您的职务！");
			form1.User_Job.focus();
			return (false);
		}		
		{
			return (true);
		}
	}
function CheckReg3(form1) {
	     form1.User_Content.value = eWebEditor1.getHTML();
		if (form1.User_Company.value == "") {
			window.alert("请填写厂商名称！");
			form1.User_Company.focus();
			return (false);
		}
		if (form1.User_Name.value == "") {
			window.alert("请填写用户名！");
			form1.User_Name.focus();
			return (false);
		}
		if (form1.User_Name.value.length<6) {
			window.alert("您填写的用户名不足六位！");
			form1.User_Name.focus();
			return (false);
		}
		if (form1.User_Name.value.length>20) {
			window.alert("您填写的用户名长度超过20位，请重新填写！");
			form1.User_Name.focus();
			return (false);
		}
		if (form1.User_Psw.value == "") {
			window.alert("请填写密码！");
			form1.User_Psw.focus();
			return (false);
		}
		if (form1.User_Psw2.value == "") {
			window.alert("请填写确认密码！");
			form1.User_Psw2.focus();
			return (false);
		}
		if (form1.User_PswQues.value == "") {
			window.alert("请填写密码问题！");
			form1.User_PswQues.focus();
			return (false);
		}
		if (form1.User_PswAnsw.value == "") {
			window.alert("请填写密码答案！");
			form1.User_PswAnsw.focus();
			return (false);
		}
		if (form1.User_RealName.value == "") {
			window.alert("请填写姓名！");
			form1.User_RealName.focus();
			return (false);
		}
		if (form1.User_Job.value == "") {
			window.alert("请添写负责人的职务！");
			form1.User_Job.focus();
			return (false);
		}		
		if (form1.User_Tel.value == "") {
			window.alert("请填写联系电话！");
			form1.User_Tel.focus();
			return (false);
		}		
		if (form1.User_Email.value == "") {
			window.alert("请填写邮件地址！");
			form1.User_Email.focus();
			return (false);
		}		
		if(form1.User_Email.value!=""){
			if (!isEmail(form1.User_Email.value)){
				window.alert("Email格式不正确");
				form1.User_Email.focus();
				return (false);
			}
		}
		{
			return (true);
		}
	}
	
function checklog(frm)
{
if(frm.UserName.value==''){alert("请输入登录名");frm.UserName.focus();return false;}
if(frm.UserPwd.value==''){alert("请输入登录密码");frm.UserPwd.focus();return false;}
}
function checkLeaveWord(form1){
  if(form1.UserName.value==""){alert('请输入您的姓名');form1.UserName.focus();return false;}
  if(form1.Tel.value==""){alert('请输入您的联系电话');form1.Tel.focus();return false;}
  if(form1.ProductName.value==""){alert('请输入所要留言的产品名称');form1.ProductName.focus();return false;}
  if(form1.Content.value==""){alert('请输入留言内容');form1.Content.focus();return false;}
}
