function contactform(thisform)
{
	var phoneaelement =  document.getElementById("cphone1");
	var phonebelement =  document.getElementById("cphone2");
	with(thisform)
	{
		if(emptyvalidation(cfname,"Please fill in your First Name.")==false) 
			{
			cfname.focus();
			return false;
			}
		if(emptyvalidation(clname,"Please fill in your Last Name.")==false) 
			{
			clname.focus();
			return false;
			}
		if (emptyvalidation(cphone,"Please enter your phone number with the area code.")==false) 
			{
			cphone.focus();
			return false;
			}
		else
		 {
		   		 for(var i=0;i<cphone.value.length;i++)
				  {
					  if(!isDigit(cphone.value.charAt(i)))
					  {
						alert("Sorry,Phone number cannot contain characters.");
						cphone.focus();
						return false;
					  }
				  }
		 }	
		 if(cphone.value.length<3)
		 {
		   alert("Please enter your phone number with the area code.");	
		   cphone.focus();
		   return false;
		 }
	
        if(phoneaelement.value == "")
			{
				alert("Please enter your phone number with the area code.");
				phoneaelement.focus();
				return false;
			}
		else
		 {
		    	 for(var i=0;i<phoneaelement.value.length;i++)
				  {
					  if(!isDigit(phoneaelement.value.charAt(i)))
					  {
						alert("Sorry,Phone number cannot contain characters");
						phoneaelement.select();
						return false;
					  }
				  }
				
		 }		
         if(phoneaelement.value.length<3)
		 {
		   alert("Please enter your phone number with the area code.");	
		   phoneaelement.focus();
		   return false;
		 }
		if(phonebelement.value == "" )
			{
				alert("Please enter your phone number with the area code.");
				phonebelement.focus();
				return false;
			}

         else
		 {
		      
				 for(var i=0;i<phonebelement.value.length;i++)
				  {
					  if(!isDigit(phonebelement.value.charAt(i)))
					  {
						alert("Sorry,Phone number cannot contain characters.");
						phonebelement.select();
						return false;
					  }
				  }
				
		 }	
		 if(phonebelement.value.length<4)
		 {
		   alert("Please enter your phone number with the area code.");	
		   phonebelement.focus();
		   return false;
		 }
		if(emptyvalidation(cemail,"Please fill in your Email Address.")==false) 
			{
			cemail.focus();
			return false;
			}
		if(validate_email(cemail)==false)
			{
			cemail.select();
			cemail.focus();
			return false;
			}
		if (thisform.province.value=='') 
			{
			alert("Please select State/Province.");
			thisform.province.focus();
			return false;
			}
		if (thisform.reachme.value=='') 
			{
			alert("Please select When to Reach me.");
			thisform.reachme.focus();
			return false;
			}
			thisform.submit();
			document.getElementById("loading").innerHTML='<img  src="images/loading.gif" alt=""width="120" height="15" />';
   }
}
