﻿function pkgSearchJS(ctry,dest,rst,mod)
{
var sendPar;
if (mod == 1) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry;
} else if (mod == 2) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_destination=" + dest;
} else if (mod == 3) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_destination=" + dest + "&sr_resort=" + rst;
} else {
	sendPar = "mod=0";
}
//alert(sendPar);
		if (mod=="")
		{
			//document.getElementById("txtHint").innerHTML="";
			document.getElementById("pkgSearchForm").innerHTML="";
			return;
		}
		if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
		else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlhttp.onreadystatechange=function()
		{
//			if (xmlhttp.readyState==1)
//			{
				//document.getElementById("txtHint").innerHTML="OK";
//			}
			if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
				document.getElementById("pkgSearchForm").innerHTML=xmlhttp.responseText;
			}
		}
		xmlhttp.open("GET","modules/search/pkg_search_module.php?"+sendPar,true);
		xmlhttp.send();
}

function fastpkgSearchJS(ctry,dest,rst,mod)
{
var sendPar;
if (mod == 1) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry;
} else if (mod == 2) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_destination=" + dest;
} else if (mod == 3) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_destination=" + dest + "&sr_resort=" + rst;
} else {
	sendPar = "mod=0";
}
//alert(sendPar);
		if (mod=="")
		{
			//document.getElementById("txtHint").innerHTML="";
			document.getElementById("fastpkgSearchForm").innerHTML="";
			return;
		}
		if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
		else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlhttp.onreadystatechange=function()
		{
			if (xmlhttp.readyState==1)
			{
				//document.getElementById("txtHint").innerHTML="OK";
			}
			if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
				document.getElementById("fastpkgSearchForm").innerHTML=xmlhttp.responseText;
			}
		}
		xmlhttp.open("GET","modules/search/fast_pkg_search_module.php?"+sendPar,true);
		xmlhttp.send();
}

function flySearchJS(ctry,rst,mod)
{
var sendPar;
if (mod == 1) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry;
} else if (mod == 2) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_resort=" + rst;
} else {
	sendPar = "mod=0";
}
//alert(sendPar);
		if (mod=="")
		{
			//document.getElementById("txtHint").innerHTML="";
			document.getElementById("flySearchForm").innerHTML="";
			return;
		}
		if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
		else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlhttp.onreadystatechange=function()
		{
//			if (xmlhttp.readyState==1)
//			{
				//document.getElementById("txtHint").innerHTML="OK";
//			}
			if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
				document.getElementById("flySearchForm").innerHTML=xmlhttp.responseText;
			}
		}
		xmlhttp.open("GET","modules/search/fly_search_module.php?"+sendPar,true);
		xmlhttp.send();
}

function hotSearchJS(ctry,dest,rst,mod)
{
var sendPar;
if (mod == 1) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry;
} else if (mod == 2) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_destination=" + dest;
} else if (mod == 3) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_destination=" + dest + "&sr_resort=" + rst;
} else {
	sendPar = "mod=0";
}
//alert(sendPar);
		if (mod=="")
		{
			//document.getElementById("txtHint").innerHTML="";
			document.getElementById("hotSearchForm").innerHTML="";
			return;
		}
		if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
		else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlhttp.onreadystatechange=function()
		{
//			if (xmlhttp.readyState==1)
//			{
				//document.getElementById("txtHint").innerHTML="OK";
//			}
			if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
				document.getElementById("hotSearchForm").innerHTML=xmlhttp.responseText;
			}
		}
		xmlhttp.open("GET","modules/search/hotel_search_module.php?"+sendPar,true);
		xmlhttp.send();
}

function fastHotSearchJS(ctry,dest,rst,mod)
{
var sendPar;
if (mod == 1) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry;
} else if (mod == 2) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_destination=" + dest;
} else if (mod == 3) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_destination=" + dest + "&sr_resort=" + rst;
} else {
	sendPar = "mod=0";
}
//alert(sendPar);
		if (mod=="")
		{
			//document.getElementById("txtHint").innerHTML="";
			document.getElementById("fasthotSearchForm").innerHTML="";
			return;
		}
		if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
		else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlhttp.onreadystatechange=function()
		{
			if (xmlhttp.readyState==1)
			{
				//document.getElementById("txtHint").innerHTML="OK";
			}
			if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
				document.getElementById("fasthotSearchForm").innerHTML=xmlhttp.responseText;
			}
		}
		xmlhttp.open("GET","modules/search/fast_hotel_search_module.php?"+sendPar,true);
		xmlhttp.send();
}

function showhide_dep_arr(name){
	var obj = (document.getElementById)? document.getElementById('dep_div') : eval("document.all[dep_div]");
	var obj1 = (document.getElementById)? document.getElementById('arr_div') : eval("document.all[arr_div]");
	if(name==11)
	{
		obj.style.display="block";
		obj1.style.display="none";
	}
	if(name==12)
	{
		obj1.style.display="block";
		obj.style.display="none";
	}
	if(name==2)
	{
		obj1.style.display="block";
		obj.style.display="block";
	}
}

function searchInfoTourJS(ctry,rst,mod)
{
var sendPar;
if (mod == 1) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry;
} else if (mod == 3) {
	sendPar = "mod=" + mod + "&sr_country=" + ctry + "&sr_resort=" + rst;
} else {
	sendPar = "mod=0";
}
//alert(sendPar);
		if (mod=="")
		{
			//document.getElementById("txtHint").innerHTML="";
			document.getElementById("srInfoTour").innerHTML="";
			return;
		}
		if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
		else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlhttp.onreadystatechange=function()
		{
//			if (xmlhttp.readyState==1)
//			{
				//document.getElementById("txtHint").innerHTML="OK";
//			}
			if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
				document.getElementById("srInfoTour").innerHTML=xmlhttp.responseText;
			}
		}
		xmlhttp.open("GET","modules/my_page/info_tours/search_info_tour_module.php?"+sendPar,true);
		xmlhttp.send();
}
