function ValidateForm() 
{
	var re5digit=/^\w{1}|[ _]{.}$/
	
	if(!isAlphaNumeric(document.agent_form.fname.value))
	{
		alert("First Name should not be blank");
		document.agent_form.fname.focus();
		return false;
	}
	
	if(!isAlphaNumeric(document.agent_form.lname.value))
	{
		alert("Last Name should not be blank");
		document.agent_form.lname.focus();
		return false;
	}
	
	var regAdd=/^\w{1}|[ _]{.}$/
	if(document.agent_form.address.value.search(regAdd)==-1)
	{
		alert("Address should not be blank. and it start from char.");
		document.agent_form.address.focus();
		return false;
	}
	
	if(document.agent_form.phone.value == "")
	{
		alert("Phone Number should not be blank");
		document.agent_form.phone.focus();
		return false;
	}
	
	//if(!ValidateNo(document.agent_form.phone.value," 1234567890"))  
	//{       
	  // 		alert("Please Enter Only Number"); 
	  //       document.agent_form.phone.focus();  
	//		  return false; 
	//}  
	
	if(document.agent_form.cmbCountry.selectedIndex == 0)
	{
		alert("Country should not be blank");
		document.agent_form.cmbCountry.focus();
		return false;
	}
	
	if(document.agent_form.cmbState.selectedIndex == 0)
	{
		//alert(document.agent_form.cmbState.value)
		alert("State should not be blank");
		document.agent_form.cmbState.focus();
		return false;
	}
	
	var regCity = /^[a-zA-Z_0-9]{1,}$/
	if (document.agent_form.city.value.search(regCity)==-1)
	{
		alert("City  should not be blank");
		document.agent_form.city.focus();
		return false;
	}
	
	if(document.agent_form.zip.value == "")
	{
		alert("Post Code should not be blank");
		document.agent_form.zip.focus();
		return false;
	}
	
	if(!ValidateNo(document.agent_form.zip.value,"1234567890"))  
	{       
	   		alert("Please Enter Only Number"); 
	         document.agent_form.zip.focus();  
			  return false; 
	}  
	
	if(document.agent_form.email.value == "")
	{
		alert("Email Address should not  be blank");
		document.agent_form.email.focus();
		return false;
	}

    if(document.agent_form.email.value)  
	{
		if(!isEmail(document.agent_form.email.value)){
			alert("Please enter valid Email");
			document.agent_form.email.select();
			document.agent_form.email.focus();
			return false;
		}
    }
	
	if(!isAlphaNumeric(document.agent_form.username.value))
	{
		alert("User Name should not be blank");
		document.agent_form.username.focus();
		return false;
	}
	
	if(!isAlphaNumeric(document.agent_form.password.value))
	{
		alert("Password should not be blank");
		document.agent_form.password.focus();
		return false;
	}
		
	if(document.agent_form.turingNo.value == "")
	{
		alert("Please enter text from the image.");
		document.agent_form.turingNo.focus();
		return false;
	}

	return true;

}
// JavaScript Document


function ValidateForm1() 
{
	var re5digit=/^\w{1}|[ _]{.}$/
	if(!isAlphaNumeric(document.frmCustInfo.first_name.value))
	{
		alert("First Name should not be blank");
		document.frmCustInfo.first_name.focus();
		return false;
	}
	
	if(!isAlphaNumeric(document.frmCustInfo.last_name.value))
	{
		alert("Last Name should not be blank");
		document.frmCustInfo.last_name.focus();
		return false;
	}
	
	var regAdd=/^\w{1}|[ _]{.}$/
	if(document.frmCustInfo.address1.value.search(regAdd)==-1)
	{
		alert("Address should not be blank. and its start from char.");
		document.frmCustInfo.address1.focus();
		return false;
	}
	
	if(document.frmCustInfo.cmbCountry.selectedIndex == 0)
	{
		alert("Country should not be blank");
		document.frmCustInfo.cmbCountry.focus();
		return false;
	}
	
	if(document.frmCustInfo.cmbState.selectedIndex == 0)
	{
		alert("State should not be blank");
		document.frmCustInfo.cmbState.focus();
		return false;
	}
	
	
	var regCity = /^[a-zA-Z_0-9]{1,}$/
	if (document.frmCustInfo.city.value.search(regCity)==-1)
	{
		alert("City should not be blank");
		document.frmCustInfo.city.focus();
		return false;
	}
	
	if(document.frmCustInfo.zip.value == "")
	{
		alert("Post Code should not be blank");
		document.frmCustInfo.zip.focus();
		return false;
	}
	
	if(!ValidateNo(document.frmCustInfo.zip.value,"1234567890"))  
	{       
	   		alert("Please Enter Only Number"); 
	         document.frmCustInfo.zip.focus();  
			  return false; 
	} 
	
	if(document.frmCustInfo.phone.value == "")
	{
		alert("Phone Number  should not be blank");
		document.frmCustInfo.phone.focus();
		return false;
	}
	
	//if(!ValidateNo(document.frmCustInfo.phone.value," 1234567890"))  
	//{       
	 //  	alert("Please Enter Only Number"); 
	  //  document.frmCustInfo.phone.focus();  
	//	return false; 
	//}  
	//	
	
	return true;

}
// JavaScript Document