function save_captcha(obj,arg)
{
_link=document.links;

for(i=0;i<_link.length;i++)
{
	if(_link[i].className=="captcha-image") {	
		if(_link[i]!=obj) {
			_link[i].childNodes[0].style.border='1px solid #f3f3f3';
		} else {
			_link[i].childNodes[0].style.border='1px solid #000';
		}
	}
}

document.getElementById("captcha_hid").value=arg;
}


function save_captcha2(obj,arg)
{
_link=document.links;

for(i=0;i<_link.length;i++)
{
	if(_link[i].className=="captcha-image2") {	
		if(_link[i]!=obj) {
			_link[i].childNodes[0].style.border='1px solid #f3f3f3';
		} else {
			_link[i].childNodes[0].style.border='1px solid #000';
		}
	}
}

document.getElementById("captcha_hid2").value=arg;
}

function save_captcha3(obj,arg)
{
_link=document.links;

for(i=0;i<_link.length;i++)
{
	if(_link[i].className=="captcha-image3") {	
		if(_link[i]!=obj) {
			_link[i].childNodes[0].style.border='1px solid #f3f3f3';
		} else {
			_link[i].childNodes[0].style.border='1px solid #000';
		}
	}
}

document.getElementById("captcha_hid3").value=arg;
}

function  quickform_validation(thisform)
{ 


	with (thisform)
	{					
			if (emptyvalidation(fname,"Woops! You forgot to fill your Name")==false) 
			{
				fname.focus();
				return false;
			}
			
			if(email.value=="email")email.value="";		
			if (emptyvalidation(email,"Woops! You forgot to fill your Email Address")==false) 
			{				
				email.focus();
				return false;
			}
			
			if(emailvalidation(email)==false)
			{
				alert("Woops! You have entered an invalid Email Address");
				email.select();
				email.focus();
				return false;
			}		
			
			if (emptyvalidation(phone,"Woops! You forgot to fill your Phone Number")==false) 
			{
				phone.select();
				phone.focus();
				return false;
			}			
			if (emptyvalidation(comments,"Woops! You forgot to fill your Comments")==false) 
			{				
				comments.focus();
				return false;
			}
			
			 if (emptyvalidation(captcha_hid,"The symbol you selected is incorrect. Please try again.")==false) 
			{
	 
				return false;
			}
			
									
			validateCaptcha('http://www.charlotteweddinghotels.com/includes/verify_captcha.php');
		
		     return false;
					 
	}
	

}


	 /*Captch code starts here... */
	

<!--Ajax for checking the captcha code ends here -->
var xmlHttp

function validateCaptcha(argUrl)
{

argVal=document.quick_contact.captcha_hid.value;
//document.getElementById("check_captcha").innerHTML=" Loading...";
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=argUrl
url=url+"?captchaVal="+argVal
url=url+"&sid="+Math.random()
//if(field=='check_captchaquick')
xmlHttp.onreadystatechange=check_captchaquick;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function check_captchaquick() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
			
			//alert(xmlHttp.responseText);
			if(xmlHttp.responseText=="yes")
			{
			     document.quick_contact.submit();
			}
			else
			{
				alert("Incorrect Answer.Please Select the Right Symbol.");
				captcha_refreshquick();
				return false;
				
			}
			
	} 
} 
 /*Captch code ends here... */
 



function captcha_refreshquick()
{
captcha_refresh1('http://www.charlotteweddinghotels.com/includes/captcha_code.php');

}

var xmlHttp11

function captcha_refresh1(argUrl)
{
argVal=document.quick_contact.captcha_hid.value;


//document.getElementById("check_captcha1").innerHTML=" Loading...";

xmlHttp11=GetXmlHttpObject()
if (xmlHttp11==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=argUrl
url=url+"?sid="+Math.random()
xmlHttp11.onreadystatechange=response_refresh1;
xmlHttp11.open("GET",url,true)
xmlHttp11.send(null)
}

function response_refresh1() 
{ 
	if (xmlHttp11.readyState==4 || xmlHttp11.readyState=="complete")
	{ 
				
			//alert (xmlHttp11.responseText);
			document.getElementById("captcha_div").innerHTML=xmlHttp11.responseText;

	} 

}



function GetXmlHttpObject()
{ 
	var objXMLHttp=null
if (window.XMLHttpRequest)
{
	objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
	objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
	return objXMLHttp
}




<!--####################################################-->


function  wedding_date(thisform)
{ 

	with (thisform)
	{					
			if (emptyvalidation(wed_date,"Woops! You forgot to fill Wedding Date")==false) 
			{
				wed_date.focus();
				return false;
			}	
			if (emptyvalidation(name,"Woops! You forgot to fill your Name")==false) 
			{
				name.focus();
				return false;
			}			
			
			if (emptyvalidation(email,"Woops! You forgot to fill your Email Address")==false) 
			{				
				email.focus();
				return false;
			}
			
			if(emailvalidation(email)==false)
			{
				alert("Woops! You have entered an invalid Email Address");
				email.select();
				email.focus();
				return false;
			}		
			
			if (emptyvalidation(phone,"Woops! You forgot to fill your Phone Number")==false) 
			{
				phone.select();
				phone.focus();
				return false;
			}			
			if (emptyvalidation(comments,"Woops! You forgot to fill your Comments")==false) 
			{				
				comments.focus();
				return false;
			}
			
		thisform.submit();
	}
}


<!--#######################################################-->
function  validateHilton(thisform)
{ 

	with (thisform)
	{
		
		
			if (emptyvalidation(fnameH,"Woops! You forgot to fill your Name")==false) 
			{
				fnameH.focus();
				return false;
			}			
				
			if (emptyvalidation(emailH,"Woops! You forgot to fill your Email Address")==false) 
			{				
				emailH.focus();
				return false;
			}
			
			if(emailvalidation(emailH)==false)
			{
				alert("Woops! You have entered an invalid Email Address");
				emailH.select();
				emailH.focus();
				return false;
			}		
			
			if (emptyvalidation(phoneH,"Woops! You forgot to fill your Phone Number")==false) 
			{
				phoneH.select();
				phoneH.focus();
				return false;
			}			
			if (emptyvalidation(commentsH,"Woops! You forgot to fill your Comments")==false) 
			{				
				commentsH.focus();
				return false;
			}
			
			
			
			 if (emptyvalidation(captcha_hid2,"The symbol you selected is incorrect. Please try again.")==false) 
			{
	 
				return false;
			}
			
									
			validateCaptcha2('http://www.charlotteweddinghotels.com/includes/verify_captcha2.php');
		
		     return false;
			
			
	}
		

}




	 /*Captch code starts here... */
 
/*function captcha_refreshhil()
{
document.getElementById("button_div").src='buttonhil.php?'+Math.random();
return false;
}*/
<!--Ajax for checking the captcha code ends here -->
var xmlHttp1
function validateCaptcha2(argUrl)
{
argVal=document.hiltonform.captcha_hid2.value;
xmlHttp1=GetXmlHttpObject()
if (xmlHttp1==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=argUrl
url=url+"?captchaVal2="+argVal
url=url+"&sid="+Math.random()
//if(field=='check_captchahil')
xmlHttp1.onreadystatechange=check_captchahil;
xmlHttp1.open("GET",url,true)
xmlHttp1.send(null)
}
function check_captchahil() 
{ 
	if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
	{ 
			
			//alert(xmlHttp1.responseText);
			if(xmlHttp1.responseText=="yes")
			{
			     document.hiltonform.submit();
			}
			else
			{
				
				alert("Incorrect Answer.Please Select the Right Symbol.");
				captcha_refreshhil();
				return false;
				
			}
			
	} 
} 


function captcha_refreshhil()
{
captcha_refresh2('http://www.charlotteweddinghotels.com/includes/captcha_code2.php');

}


var xmlHttp12

function captcha_refresh2(argUrl)
{
argVal=document.hiltonform.captcha_hid2.value;

//document.getElementById("check_captcha1").innerHTML=" Loading...";

xmlHttp12=GetXmlHttpObject()
if (xmlHttp12==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=argUrl
url=url+"?sid="+Math.random()
xmlHttp12.onreadystatechange=response_refresh2;
xmlHttp12.open("GET",url,true)
xmlHttp12.send(null)
}

function response_refresh2() 
{ 
	if (xmlHttp12.readyState==4 || xmlHttp12.readyState=="complete")
	{ 
				
			//alert (xmlHttp.responseText);
			document.getElementById("captcha_div2").innerHTML=xmlHttp12.responseText;

	} 

}
 /*Captch code ends here... */
 
 
<!--#################################################-->


function  validateHoliday(thisform)
{ 

	with (thisform)
	{					
			if (emptyvalidation(fnameHI,"Woops! You forgot to fill your Name")==false) 
			{
				fnameHI.focus();
				return false;
			}			
				
			if (emptyvalidation(emailHI,"Woops! You forgot to fill your Email Address")==false) 
			{				
				emailHI.focus();
				return false;
			}
			
			if(emailvalidation(emailHI)==false)
			{
				alert("Woops! You have entered an invalid Email Address");
				emailHI.select();
				emailHI.focus();
				return false;
			}		
			
			if (emptyvalidation(phoneHI,"Woops! You forgot to fill your Phone Number")==false) 
			{
				phoneHI.select();
				phoneHI.focus();
				return false;
			}			
			if (emptyvalidation(commentsHI,"Woops! You forgot to fill your Comments")==false) 
			{				
				commentsHI.focus();
				return false;
			}
			
			 if (emptyvalidation(captcha_hid3,"The symbol you selected is incorrect. Please try again.")==false) 
			{
	 
				return false;
			}
			
									
			validateCaptcha3('http://www.charlotteweddinghotels.com/includes/verify_captcha3.php');
		
		     return false;

					 
	}
	

}

	 /*Captch code starts here... */

<!--Ajax for checking the captcha code ends here -->
var xmlHttp2
function validateCaptcha3(argUrl)
{
argVal=document.holidayform.captcha_hid3.value;
xmlHttp2=GetXmlHttpObject()
if (xmlHttp2==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=argUrl
url=url+"?captchaVal3="+argVal
url=url+"&sid="+Math.random()
//if(field=='check_captchaholi')
xmlHttp2.onreadystatechange=check_captchaholi;
xmlHttp2.open("GET",url,true)
xmlHttp2.send(null)
}
function check_captchaholi() 
{ 
	if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
	{ 
			
			//alert(xmlHttp2.responseText);
			if(xmlHttp2.responseText=="yes")
			{
			     document.holidayform.submit();
			}
			else
			{
				alert("Incorrect Answer.Please Select the Right Symbol.");
				captcha_refreshholi();
				return false;
				
			}
			
	} 
} 

function captcha_refreshholi()
{
captcha_refresh3('http://www.charlotteweddinghotels.com/includes/captcha_code3.php');

}

var xmlHttp13

function captcha_refresh3(argUrl)
{
argVal=document.holidayform.captcha_hid3.value;

xmlHttp13=GetXmlHttpObject()
if (xmlHttp13==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=argUrl
url=url+"?sid="+Math.random()
xmlHttp13.onreadystatechange=response_refresh;
xmlHttp13.open("GET",url,true)
xmlHttp13.send(null)
}

function response_refresh() 
{ 
	if (xmlHttp13.readyState==4 || xmlHttp13.readyState=="complete")
	{ 
				
			//alert (xmlHttp.responseText);
			document.getElementById("captcha_div3").innerHTML=xmlHttp13.responseText;

	} 

}





 /*Captch code ends here... */
 
function  gettingStarted(thisform)
{ 

	with (thisform)
	{					
			if (emptyvalidation(fname2,"Woops! You forgot to fill your Name")==false) 
			{
				fname2.focus();
				return false;
			}			
			if (emptyvalidation(phone2,"Woops! You forgot to fill your Phone Number")==false) 
			{
				phone2.select();
				phone2.focus();
				return false;
			}			
			if (emptyvalidation(email2,"Woops! You forgot to fill your Email Address")==false) 
			{				
				email2.focus();
				return false;
			}
			
			if(emailvalidation(email2)==false)
			{
				alert("Woops! You have entered an invalid Email Address");
				email2.select();
				email2.focus();
				return false;
			}		
			if (emptyvalidation(weddate,"Woops! You forgot to select your wedding date")==false) 
			{
				weddate.select();
				weddate.focus();
				return false;
			}	
			if (emptyvalidation(guest,"Woops! You forgot to fill number of guests")==false) 
			{
				guest.select();
				guest.focus();
				return false;
			}		
			if (emptyvalidation(comments2,"Woops! You forgot to fill your Comments")==false) 
			{				
				comments2.focus();
				return false;
			}
			
		thisform.submit();
	}
}
