function validcheck()
{	
	with(document.contactus)
	{
		if(Trim(_vName_CONTACT.value)=="")
		{
			alert("Please Enter Name");
			_vName_CONTACT.focus();
			return false;
		}
		if(Trim(_vPhone_CONTACT.value)=="")
		{
			alert("Please Enter Phone Number");
			_vPhone_CONTACT.focus();
			return false;
		}
				
		if(!(isPhoneNumber(Trim(_vPhone_CONTACT.value))))
		{
			alert("Please provide your Valid Phone Number");
			_vPhone_CONTACT.focus();
			return false;
		}
		if(_vCountry_CONTACT.value.length < 1)
		{
			alert("Please select country");
			_vCountry_CONTACT.focus();
			return false;
		}
		if(_vEmail_CONTACT.value.length < 1)
		{
			alert("Please Enter Email");
			_vEmail_CONTACT.focus();
			return false;
		}
		if(!isValidEmail(_vEmail_CONTACT.value))
		{
			_vEmail_CONTACT.focus();
			return false;	
		}
				
		if(Trim(_vSubject_CONTACT.value)=="")
		{
			alert("Please Enter subject");
			_vSubject_CONTACT.focus();
			return false;
		}
		if(Trim(_vMessage_CONTACT.value)=="")
		{
			alert("Please Enter Message");
			_vMessage_CONTACT.focus();
			return false;
		}
				
		if(Trim(_vCapt_CONTACT.value)=="")
		{
			alert("Please enter the verification code");
			_vCapt_CONTACT.focus();
			return false;	
		}
		if(Trim(_vCapt_CONTACT.value).length<5)
		{
			alert("Verification Code is not Valid ! Please Try Again");
			_vCapt_CONTACT.focus();
			return false;
		}
	}
	//CheckValidationText();
	return true;
}
		
function CheckValidationText()
{ 
	var vText;
	if(document.contactus._vCapt_CONTACT)
		vText = document.contactus._vCapt_CONTACT.value;
	else
		vText = "";
				
	var url = "checkcaptcha.html?paraValid="+vText;
	//var url = "validate.php?vText="+vText;
			
	if (window.XMLHttpRequest)
	{
		http=new XMLHttpRequest()
		http.open("GET",url,true)
		http.onreadystatechange=function (){
			if (http.readyState == 4) 
			{	
				isWorking = false;
				if (http.responseText.indexOf('invalid') == -1) 
				{
					var xmlDocument = http.responseXML;
					var existId = xmlDocument.getElementsByTagName('msg').item(0).firstChild.data;
					if(existId == "0"){
						alert("Verification Code is not Valid ! Please Try Again");
						document.contactus._vCapt_CONTACT.focus();
						return false;
					}
					else
					{
						document.contactus.submit();
					}	
				}
			}
		}
		http.send(null)
	}
	// code for IE
	else if (window.ActiveXObject)
	{
		http=new ActiveXObject("Microsoft.XMLHTTP")
		if (http)
		{
			http.open("GET",url,true)
			http.onreadystatechange=function (){
				if (http.readyState == 4) 
				{	
					isWorking = false;
					if (http.responseText.indexOf('invalid') == -1) 
					{
						var xmlDocument = http.responseXML; 
						var existId  = xmlDocument.getElementsByTagName('msg').item(0).firstChild.data;
						if(existId == "0")
						{
							alert("Verification Code is not Valid ! Please Try Again");
							document.contactus._vCapt_CONTACT.focus();
							return false;
						}
						else
						{
							document.contactus.submit();
						}	
					}
				}
			}	
			http.send()
		}
	}
}	

