function tzsearch()
{
	document.apLogin.submit();
}

function displayCMI(o){
	tmpobj = "win"+o;
	$("div.windowHotelRoom").hide();
	$("#"+tmpobj).fadeIn(800);
}

function hideCMI(o){
	$("#"+"win"+o).fadeOut(800);
}

function checkHotelRate(n){
	//document.writeln("/hotel/ajax-room-rate.asp?hotelid="+n+"&starttime="+document.getElementById("starttime").value+"&endtime="+document.getElementById("endtime").value);

		$.get("/hotel/ajax-room-rate.asp?hotelid="+n+"&starttime="+document.getElementById("starttime").value+"&endtime="+document.getElementById("endtime").value,function(ajaxdata){
		$("#hotelRate").html(ajaxdata);
		if ($("#hotelRate").css("display")=="block"){
			$("#hotelRate").fadeOut(350);
			$("#hotelRate").fadeIn(380);
		}else{
			$("#hotelRate").slideDown(380);
		}

		})
}


function displayRateCalendar(o){
	tmphtml1 = "<strong>Hide Rate Calendar</strong>"
	tmphtml2 = "<strong>Show Hotel Rate Calendar</strong>"
	if ($("#rateCalendar").css("display")=="block"){
			$("#rateCalendar").slideUp(1000);
			$(o).html(tmphtml2);
	}else{
			$("#rateCalendar").slideDown(1000);
			$(o).html(tmphtml1);
	}
}


//预定酒店是机票搜索函数
function hotelSearchFlights(){
	var c1 = getCityAirCode(document.sflight.startCode1.value);
	var c2 = getCityAirCode(document.sflight.destinationCode1.value);
	if(c1 && c2)
	{
		document.sflight.startCode1.value = c1;
		document.sflight.destinationCode1.value = c2;
		document.sflight.submit();
	}
	else
	{
		alert('Error City Airport');return false;
	}
}


function closeFlightTable(o){
	o.checked?$("#tableResultid").hide():$("#tableResultid").show();
}

function displayPackinfo(o){
	o.checked?$("#packinfoTable").show():$("#packinfoTable").hide();
}


function getHotelListText(o){
	$("#listhotel").html("test");
	
	//postget("/hotel/hotellist-all.asp?city=shanghai&s=21");
	$.get("/hotel/hotellist-all.asp?city=shanghai", function(data){
  							$("#listhotel").html(data);
})

}

function postget(theurl) {
	alert(theurl);
	var xmlHttp = new XMLHttpRequest();
	xmlHttp.open("POST", theurl, true);
	xmlHttp.send(null);
	xmlHttp.onreadystatechange = function() {
		if (xmlHttp.readyState == 4) { 
			if (xmlHttp.status == 200) return xmlHttp.responseText;
		}
	}
}