function subform_onsubmit() {
if (document.subform.sub_to0.value=="")
	{
	  alert("Please enter first name")
	  document.subform.sub_to0.focus()
	  return false
	 }
else if (document.subform.sub_to1.value=="")
	{
	  alert("Please enter last name")
	  document.subform.sub_to1.focus()
	  return false
	 }
else if(document.subform.sub_country.value=="")
	{
	  alert("Please enter country")
	  document.subform.sub_adds.focus()
	  return false
	 }

else if(document.subform.sub_state.value=="")
	{
	  alert("Please enter state")
	  document.subform.sub_adds.focus()
	  return false
	 }

else if(document.subform.sub_city.value=="")
	{
	  alert("Please enter city")
	  document.subform.sub_adds.focus()
	  return false
	 }

else if(document.subform.sub_adds.value=="")
	{
	  alert("Please enter address")
	  document.subform.sub_adds.focus()
	  return false
	 }

else if(document.subform.sub_tel.value=="")
	{
	  alert("Please enter phone number")
	  document.subform.sub_tel.focus()
	  return false
	 }
	 
else if(document.subform.sub_mail.value.length!=0)
  {
    if (document.subform.sub_mail.value.charAt(0)=="." ||        
         document.subform.sub_mail.value.charAt(0)=="@"||       
         document.subform.sub_mail.value.indexOf('@', 0) == -1 || 
         document.subform.sub_mail.value.indexOf('.', 0) == -1 || 
         document.subform.sub_mail.value.lastIndexOf("@")==document.subform.sub_mail.value.length-1 || 
         document.subform.sub_mail.value.lastIndexOf(".")==document.subform.sub_mail.value.length-1)
     {
      alert("Please enter correct Email!");
      document.subform.sub_mail.focus();
      return false;
      }
   }
 else
  {
   alert("Please enter Email!");
   document.subform.sub_mail.focus();
   return false;
   }	 	 
}
