// JavaScript Document
function validateform()
{
	
	 var txt="";    		  	
     var val1,val2,val3;					   
			  
			   val1=document.enquiry.name.value;   					   
               if(val1==null||val1=="")
			 	 txt=txt+"please enter Name\n";		
	
	
	           val1=document.enquiry.phone.value;   					   
               if(val1==null||val1=="")
			 	 txt=txt+"please enter phone number\n";		
               if (!IsNumeric(val1)) 
 				 txt=txt+"please enter only numbers in phone number\n";	 				   
			   
			   val1=document.enquiry.address.value;   					   
               if(val1==null||val1=="")
			 	 txt=txt+"please enter address\n";		
			   
			   val1=document.enquiry.email.value;   					   
               if(val1==null||val1=="")
			 	 txt=txt+"please enter your email id\n";		

               if(val1==null||val1=="")
							txt=txt+"please enter your email id \n";
					  else 
							   {
									if(val1.match("@")==null || val1.match(".")==null )       
									  txt=txt+"Your email address is not correct \n";
									else
									   {
									   loc1=val1.lastIndexOf("@"); 
									   loc2=val1.lastIndexOf(".");
										   if(loc2<loc1)
											  txt=txt+"Your email address is not correct \n";
										   
										   
									   }  
							   }	  
			   
			   
			   val1=document.enquiry.fbtype.value;   					   
               if(val1==null||val1=="")
			 	 txt=txt+"please select feedback\n";		
			   
			   val1=document.enquiry.comments.value;   					   
               if(val1==null||val1=="")
			 	 txt=txt+"please enter comments\n";		
			 
			   val1=document.enquiry.knowtype.value;   					   
               if(val1==null||val1=="")
			 	 txt=txt+"please selct How did you come to know about GK Constructions?\n";		
	
				if(txt=="")
				  return true;
				else
				 {
				  alert(txt);
				  return false;
				 }   
	
	
	
	
	
	
	
}
function IsNumeric(sText)

{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }
	