
function showCHSearchForm(){
	try{
		$.ajax({
		   type: "POST",
		   url: "/module/worldSearchForm.vm",
		   success: function(cValue){
			   	var tagdiv = document.getElementById("showWSearchForm");
			   	tagdiv.innerHTML = cValue;	
			   	_tagCnID = "placeToS";
				_tagID = "placeTo";
				try{document.getElementById("searchDate").value=getDateCC(new Date(),-1);}catch(e){}
				try{document.getElementById("returnDate").value=getDateCC(new Date(),-30);}catch(e){}
				//alert(getCookie("placeToS"));
				if(getCookie("placeToS")!=""){
					document.getElementById("placeToS").value = getCookie("placeToS");
					document.getElementById("placeTo").value = getCookie("placeTo");
					document.getElementById("contentType").value = getCookie("contentType");
				}
				ZZ.module.searchBox.init();
		   }
		});
		$("#tit_flight").addClass("on");
		$("#tit_airport").removeClass();
		$("#tit_airline").removeClass();
	}catch(e){window.status=(e.description);}
}

function showAirportSearchForm(){
	$("#showWSearchForm").load("/module/airportSearchForm.vm");
	$("#tit_flight").removeClass();
	$("#tit_airport").addClass("on");
	$("#tit_airline").removeClass();
}
function showAirlineSearchForm(){
	$("#showWSearchForm").load("/module/airlineSearchForm.vm");
	$("#tit_flight").removeClass();
	$("#tit_airport").removeClass();
	$("#tit_airline").addClass("on");
}

function tabChange(key){
	if(key==1){
		document.getElementById("gzl").style.display="block";
		document.getElementById("gzltit").className="on";
		document.getElementById("hkl").style.display="none";
		document.getElementById("hkltit").className="";
	}else if(key==2){
		document.getElementById("hkl").style.display="block";
		document.getElementById("hkltit").className="on";
		document.getElementById("gzl").style.display="none";
		document.getElementById("gzltit").className="";
	}
}


function goSearchAirport(){
	var cURL = "/AirportFrontScript.do?method=airportSearch&enName="+document.getElementById("enName").value+"&cnName="+document.getElementById("cnName").value+"&threeCode="+document.getElementById("threeCode").value+"&city="+document.getElementById("country").value;
	location.href = encodeURI(cURL);
}
function goSearchAirline(){
	try{
		var cURL = "/AirlineFrontScript.do?method=airlineSearch&subject="+document.getElementById("subject").value+"&subjectCH="+document.getElementById("subjectCH").value+"&twoCode="+document.getElementById("twoCode").value+ "&country="+document.getElementById("country").value;
		location.href = encodeURI(cURL);
	}catch(e){}
}
