<!--
function goback()
{
		window.history.go(-1);
}


function Validator()
{
	//alert("checking the form 1.");

	var email=document.registform.email;
	var password1=document.registform.password1;
	var password2=document.registform.password2;
	var firstname=document.registform.firstname;
	var lastname=document.registform.lastname;
	var institute=document.registform.institute;
	//var postal_code=document.registform.institute.postal_code.value;
	//var postaddress=document.registform.postaddress.value;
	//var countryid=document.registform.countryid.value;
	//var get_select=document.registform.title.selectedIndex; 
	//var title=document.registform.title.options[get_select].text ;
	if(email.value=="")
	{
		alert("请输入您的电子邮件地址！");
		email.select();
		return false;
	}	
	var re=/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
	if (!email.value.match(re)) 
	{
		alert("电子邮件格式错误！"); 
		email.select();
		return false;
	}
	if(password1.value=="" || password1.value.length<4)
	{
		alert("请输入您的密码且大于4位！");	
		password1.select();
		return false;
	}
	if(password2.value=="" || password2.value.length<4)
	{
		alert("请再输入您的密码且大于4位！");
		password2.select();
		return false;
	}
	if(password1.value!=password2.value)
	{
		alert("您两次输入的密码不一致！");
		password2.select();
		return false;
	}
	if(firstname.value=="")
	{
		alert("请输入您的姓氏！");
		firstname.select();
		return false;	
	}
	if(lastname.value=="")
	{
		alert("请输入您的名字");
		lastname.select();
		return false;	
	}
	if(institute.value=="")
	{
		alert("请输入您的所在单位！");
		institute.select();
		return false;	
	}
	/*if(countryid==0)
	{
		alert("Please select your country/district");
		return false;
	}
	if(postaddress.length<5)
	{
		alert("Please input your post address.");
		return false;
	}

	//alert("check setpassword");
	if(document.registform.setpassword.value=="yes")
	{
		//alert("check password");
		if(passvalidator()==false) return false;		
	}
	
	//if(document.registform.operation.checked)
	if(document.registform.setemail.value=="yes")
	{
		//alert("check email");
		var regemail=document.registform.email.value;
		if(regemail=="")
		{
			alert("Please input your email.");
			return false;
		}	
		var re=/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
		if (!regemail.match(re)) 
		{
			alert("Invalid e-mail format!");  
			return false;
		}
		//alert("checking the email.");
	}*/	
	return true;
}

function passvalidator()
{
		//alert("check password");
		var pwd1=document.getElementById("password1").value;
		var pwd2=document.getElementById("password2").value;
		if(pwd1=="")
		{
				alert("Please input the password.");	
				return false;
		}
		if(pwd2=="")
		{
			alert("Please conform the password.");
			return false;
		}
		
		if(pwd1!=pwd2)
		{
			alert("Two passwords don't match!");
			return false;
		}
		
		if(pwd1.length<4)
		{
			alert("Your password is too short, it should be no less than 4 characters");
			return false;
		}
		/*
		var patrn=/^(\w){6,40}$/; 
		if (!patrn.exec(pwd1)) 
		{
			alert("Invalid characters in password");
			return false;
		} 
	    */
		return true;
}
/*
function show()
{
	if(document.registform.operation.checked){
	   //oldp.innerHTML='<INPUT name=oldpassword type="password" class="input6">&nbsp;*';
	   document.getElementById("newp1").innerHTML='<INPUT name="password1" type="password" class="input6" onblur="this.setAttribute('value', this.value);" />&nbsp;*';
	   document.getElementById("newp2").innerHTML='<INPUT name="password2" type="password" class="input6" onblur="this.setAttribute('value', this.value);" />&nbsp;*';
//	   document.getElementById("newp1").innerHTML='<INPUT name=password1 type="password" class="input6" >&nbsp;*';
//	   document.getElementById("newp2").innerHTML='<INPUT name=password2 type="password" class="input6" >&nbsp;*';
   
	   //oldp_name.innerHTML='Old&nbsp;Password:';
	   document.getElementById("newp1_name").innerHTML='New&nbsp;Password:';
	   document.getElementById("newp2_name").innerHTML='<input name="setpassword" type="hidden" value="yes">Confirm&nbsp;Password:';  
		}
	else{
	  // oldp.innerHTML='<INPUT name="oldpassword" type="password" class="input7" disabled>&nbsp;*';
	  // newp1.innerHTML='<INPUT name="password1" type="password" class="input7" disabled>&nbsp;*';
	  // newp2.innerHTML='<INPUT name="password2" type="password" class="input7" disabled>&nbsp;*';
	   //oldp.innerHTML='&nbsp;';
	   document.getElementById("newp1").innerHTML='&nbsp;';
	   document.getElementById("newp2").innerHTML='&nbsp;';
	   //oldp_name.innerHTML='&nbsp;';
	   newp1_name.innerHTML='&nbsp;';
	   newp2_name.innerHTML='&nbsp;';  
		 
	   }
}
*/
-->
