function validate(theform)
{
     var i;
     var j=1;
     var k;
     var bn;
     var t;
     var r;
     var len;
     var VC = "0123456789";
     var IsNumber=true;
     var Char
	
if(theform.Title.value=="")
		{
			theform.Title.focus();
			alert("Please provide your Title.");
			return false;
		}
if(theform.First_Name.value=="")
		{
			theform.First_Name.focus();
			alert("Please provide your First Name.");
			return false;
		}		
if(theform.Last_Name.value=="")
		{
			theform.Last_Name.focus();
			alert("Please provide your Last Name.");
			return false;
		}	
if(theform.House_No.value=="")
		{
			theform.House_No.focus();
			theform.House_No.select();
			alert("Please provide House No.");
			return false;
		}
if(isNaN(theform.House_No.value))
{
theform.House_No.focus();
alert("House No : only numbers");
return false;
}
if(theform.Street_Name.value=="")
		{
			theform.Street_Name.focus();
			alert("Please provide your Street Name.");
			return false;
		}	
if(theform.City.value=="")
		{
			theform.City.focus();
			alert("Please provide your City Name.");
			return false;
		}
if(theform.Postcode.value=="")
		{
			theform.Postcode.focus();
			alert("Please provide your Postcode.");
			return false;
		}		
if(theform.email.value=="")
		{
			theform.email.focus();
			alert("Please provide Email.");
			return false;	
		}
		
			if(theform.email.value != "")
	{	
		text1=theform.email.value;
	    len=theform.email.value.length;
       for(i=0;i<=len;i++)
            {
              if (text1.charAt(i)=='@')
                 {
                    k=1;
                 }
            }           
         
         if (k!=1)
           {
              theform.email.focus();
              theform.email.select();
              alert("Please Check Email Address");
              return false;
           }
        
        text1=theform.email.value;       
        len=theform.email.value.length;
            for(i=0; i<=len;i++)
               {
                 if (text1.charAt(i)=='.')
                   {
                     bn=1; 
                   } 
               }             
       
              if(bn!=1)
               {
                  theform.email.focus(); 
                  theform.email.select(); 
                  alert("Please check Email Address");
                  return false;
               }
if(theform.day_phone.value=="")
		{
			theform.day_phone.focus();
			theform.day_phone.select();
			alert("Please provide Day Time Phone No.");
			return false;
		}
if(isNaN(theform.day_phone.value))
{
theform.day_phone.focus();
alert("Day Time Phone : only numbers");
return false;
}

if(theform.evening_phone.value=="")
		{
			theform.evening_phone.focus();
			theform.evening_phone.select();
			alert("Please provide Evening Time Phone No.");
			return false;
		}
if(isNaN(theform.evening_phone.value))
{
theform.evening_phone.focus();
alert("Evening Time Phone : only numbers");
return false;
}

if(theform.Suitable_Date.value=="")
		{
			theform.Suitable_Date.focus();
			alert("Please select atleast one suitable Date");
			return false;
		}
if(theform.Suitable_Time.value=="")
		{
			theform.Suitable_Time.focus();
			alert("Please select atleast one suitable Time");
			return false;
		}		
if(theform.product_type.value=="")
		{
			theform.product_type.focus();
			alert("Please select Product Type");
			return false;
		}
if(theform.timescale.value=="")
		{
			theform.timescale.focus();
			alert("Please select Your Time Scale");
			return false;
		}
if(!theform.Accept.checked)
		{
			alert("Please accept Terms & Conditions.");
			return false;
		}		
}
return true;
}



