
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "0";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "0";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "0";
}



var xmlHttp


function inputname(form)
{

xmlHttp=getNewXMLHttpRequest()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var url="validate.php"




url=url+"?fname="+form.fname.value+"&lname="+form.lname.value+"&phone="+form.phone.value+"&email="+form.email.value+"&address="+form.address.value+"&city="+form.city.value+"&state="+form.state.value+"&zip="+form.zip.value+"&country="+form.country.value+"&adventure="+form.adventure.value+"&leisure="+form.leisure.value+"&family="+form.family.value+"&business="+form.business.value+"&historical="+form.historical.value+"&romantic="+form.romantic.value+"&weekend="+form.weekend.value+"&budget="+form.budget.value+"&holiday="+form.holiday.value


/* url=url+"&sid="+Math.random() */
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open('GET',url,true)
xmlHttp.send(null)

}
function stateChanged() 
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
 
try
{
 document.getElementById('txtHint').innerHTML=xmlHttp.responseText; 
}
catch(e)
{
alert(e);
}

 } 
if(xmlHttp.readyState == 1)
	{

 document.getElementById("txtHint").innerHTML = "one moment ...";
	}

}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

function getNewXMLHttpRequest() {
  var obj;
    try {
      // For Internet Explorer.
      obj = new ActiveXObject('Microsoft.XMLHTTP');
    }
    catch(e) {
      try {
        // Gecko-based browsers, Safari, and Opera.
        obj = new XMLHttpRequest();
      }
      catch (e) {
        // Browser supports Javascript but not XMLHttpRequest.
        obj = false;
      }
    }
    return obj;
}

