function whrite_fh() {
	document.write('<form acti'); 
	document.write('on="#form" meth'); 
	document.write('od="post" na'); 
	document.write('me="conta'); 
	document.write('ct_fo'); 
	document.write('rm" id'); 
	document.write('="cont'); 
	document.write('act_fo'); 
	document.write('rm">'); 
	document.write('<i'); 
	document.write('nput t'); 
	document.write('ype="hi'); 
	document.write('dden" n'); 
	document.write('ame="p'); 
	document.write('assed" v'); 
	document.write('alue="y'); 
	document.write('es">'); 


}
function whrite_ff() {
	document.write('</for'); 
	document.write('m>'); 
}



var ajaxReQ = getXmlHttpRequestObject();
function getXmlHttpRequestObject() {
    if (window.XMLHttpRequest) {
    	return new XMLHttpRequest();
    } else if(window.ActiveXObject) {
    	return new ActiveXObject("Microsoft.XMLHTTP");
    } 
}

function getloc(country_id) {
	if (!document.getElementById("destination_"+country_id).value) {
		document.getElementById("view_link"+country_id).innerHTML = '<a href="'+document.getElementById("orig_url_"+country_id).value+'"  class="ad_but" style="margin-left:10px; padding-left:14px; width:100px;">&gt; View Vacations</a>';	
	document.getElementById("region_dd"+country_id).innerHTML = '<select name="country_'+country_id+'" id="country_'+country_id+'"  style="margin-left:0px; font-size:11px; width:180px;"></select>'
	} else {
	if (ajaxReQ.readyState == 4 || ajaxReQ.readyState == 0) {
		document.getElementById("loader_"+country_id).style.display = '';
		document.getElementById("region_dd"+country_id).innerHTML = '<select name="country_'+country_id+'" id="country_'+country_id+'"  style="margin-left:0px; font-size:11px; width:180px;"></select>'
		
		day = new Date();
		id = day.getTime();
		ajaxReQ.open("GET", 'kContent/plugins/Travel.php?kContent_section=ajax&destination='+document.getElementById("destination_"+country_id).value+'&main_id='+country_id+'&time='+id, true);
		ajaxReQ.onreadystatechange = gotloc; 
		ajaxReQ.send(null);
	}			
}}

function gotloc() {
	
	if (ajaxReQ.readyState == 4) {
		if (ajaxReQ.responseText) {
			var bits=ajaxReQ.responseText.split('||');
			
		document.getElementById("loader_"+bits[0]).style.display = 'none';
			 document.getElementById("region_dd"+bits[0]).innerHTML = bits[1];
			 document.getElementById("view_link"+bits[0]).innerHTML = bits[2];	
			 
		}
	}
}
function change_loc(country_id) {
document.getElementById("view_link"+country_id).innerHTML = '<a href="'+document.getElementById("country_"+country_id).value+'"  class="ad_but" style="margin-left:10px; padding-left:14px; width:100px;">&gt; View Vacations</a>';	
	
}

function searchFocus() {
	if (document.getElementById('search').value=="Enter hotel, country, facility etc.") {
		document.getElementById('search').value="";
	}
	document.getElementById('search').style.color="#000000";
}

function searchHotels() {
	if (document.getElementById('search').value=="Enter hotel, country, facility etc." || document.getElementById('search').value=="") {
		alert("Please enter a search");
		return false;
	} else if (document.getElementById('search').value.length <3) {
		alert("Please enter at least three characters for your search");
		return false;
	} else {
		document.getElementById('searchForm').action = 'search.htm';
		return true();
	}
	return false;
}
function dn() {
	
}