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


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

	var firstname=document.registform.firstname.value;
	var lastname=document.registform.lastname.value;
	var institute=document.registform.institute.value;
	var countryid=document.registform.countryid.value;
	var postaddress=document.registform.postaddress.value;
	var get_select=document.registform.title.selectedIndex; 
	//var title=document.registform.title.options[get_select].text ;

	if(firstname=="")
	{
	        alert("Please input your firstname.");
	        return false;	
	}
	if(lastname=="")
	{
	        alert("Please input your lastname.");
	        return false;	
	}
	if(institute.length<2)
	{
	        alert("Please input your institute.");
	        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;';  
		 
	   }
}
*/
-->
