function  validationcontact(thisform)
{ 
	with (thisform)
	{ 
			//if(fname.value=="name")fname.value="";		
			if (emptyvalidation(fnames,"Woops! You forgot to fill your Name")==false) 
			{
				fnames.select();
				fnames.focus();
				return false;
			}
			//if(email.value=="email")email.value="";		
			if (emptyvalidation(email,"Woops! You forgot to fill your Email Address")==false) 
			{
				email.select();
				email.focus();
				return false;
			}
			if(emailvalidation(email)==false)
			{
				alert("Woops! You have entered an invalid Email Address");
				email.select();
				email.focus();
				return false;
			}
			//if(phone.value=="phone")phone.value="";
			if (emptyvalidation(phone,"Woops! You forgot to fill your Phone Number")==false) 
			{
				phone.select();
				phone.focus();
				return false;
			}
			//if(comments.value=="comments")comments.value="";
			if (emptyvalidation(comments,"Woops! You forgot to fill your Comments")==false) 
			{
				comments.select();
				comments.focus();
				return false;
			}
			if (userdigitcontact.value==userdigitcontact.defaultValue)
			{
			userdigitcontact.value="";	
			}
			if(emptyvalidation(userdigitcontact,"Woops! You forgot to fill Veritification code")==false)
			{
			userdigitcontact.focus();
			return false;
			}
			runAjax1('check_captcha','http://www.markhamplasticsurgery.com/contactprocess_mail.php',thisform.userdigitcontact.value);
			return false;
			
	}
	thisform.submit();
	return true;
}
var baseURLC = location.href.substring(0,location.href.indexOf(".com")) + ".com";
function captcha_refresh1()
{
document.getElementById("button_div1").src='http://www.markhamplasticsurgery.com/button.php?'+Math.random();
return false;
}
<!--Ajax for checking the captcha code ends here -->
var xmlHttp
function runAjax1(field,argurl,argVal)
{
//document.getElementById("check_captcha").innerHTML=" Loading...";
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=argurl
url=url+"?userdigitcontact="+argVal
url=url+"&sid="+Math.random()
if(field=='check_captcha')
xmlHttp.onreadystatechange=check_captcha1;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function check_captcha1() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
			
			if(xmlHttp.responseText=="yes")
			{
				var pasurlc=baseURLC+'/email_validate.php';
			    checkemaildomain2('check_cemail',document.contact.email.value,pasurlc);
				//document.contact.submit();
			}
			else
			{
				captcha_refresh1();
				alert("Verification code mismatch");
				document.contact.userdigitcontact.focus();
				document.contact.userdigitcontact.select();
				return false;
			}
			
	} 
} 


function checkemaildomain2(field,argVal,argurl)
{

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=argurl 
url=url+"?email="+argVal 
url=url+"&sid="+Math.random()
if(field=='check_cemail')
xmlHttp.onreadystatechange=check_email2;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function check_email2() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ //alert(xmlHttp.responseText);
			
			if(xmlHttp.responseText==0) 
			{
			 alert("Woops! Invalid email address");
			 document.contact.email.focus();
			 document.contact.email.select();
			 return false;
			}
		 else{
		       document.contact.submit();
			 }
	} 
} 
function GetXmlHttpObject()
{ 
	var objXMLHttp=null
if (window.XMLHttpRequest)
{
	objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
	objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
	return objXMLHttp
}
<!--Ajax for checking the captcha code starts here -->