function validateForm(thisform)
{ 
	with (thisform)
	{
		if (emptyvalidation(txtfirst_name,"Please enter First Name")==false)  
		{
			txtfirst_name.focus();
			return false;
		}
		if(emptyvalidation(txtlast_name,"Please enter Last Name")==false)
		{
			txtlast_name.focus();
			return false;
		
		}
		if(emptyvalidation(txtphone_no,"Please enter Phone Number")==false)
		{
			txtphone_no.focus();
			return false;
		
		}
		if (emptyvalidation(txtemail,"Please enter Email Address")==false) 
		{
			txtemail.focus();
			return false;
		}
		if(echeck(txtemail.value)==false)
		{
			txtemail.select();
			txtemail.focus();
			return false;
		}
		
		if($('#userdigit2').val()=='Enter Verification Code')
			{
			   alert("Please enter the Verification Code.");
			   $('#userdigit2').focus();$('#userdigit2').select(); 
			   $('#submit_btn1').show();
			   return false;
			}   		
		      validateCaptcha('contact_captcha.php',thisform.userdigit2.value,thisform);
		      return false;
		
	}
	 return false;
}

function validateCaptcha(filename,code,thisform)
{
   $.post(filename,{userdigit:$.trim(code)},
              function(data)
			  {
			       data=$.trim(data);
				   if(data=='yes')
				   {
				       thisform.submit();
				    }
				   else
				  {
				       alert("Verification Code Mismatch.");
				       $('#userdigit2').focus();$('#userdigit2').select();
					   $('#submit_btn1').show();
					   captcha_refresh1();
				       return false;
				  } 
			 });
		return false;		 		
}
function captcha_refresh1()
{
 	$("#button_div1").attr('src','contact-button.php?'+Math.random());
    return false;
	
}