function ShowMin(m,n,c1,c2,c3,c4){
 for(var i=1;i<=n;i++)
	if(m == i){
		document.getElementById(c3+i).className = c1;
		document.getElementById(c4+i).style.display = "";
		}
	else{
		document.getElementById(c3+i).className = c2;
		document.getElementById(c4+i).style.display = "none";
		}
}

function Showtab(m,n,c1,c2,c3,c4){
 for(var i=1;i<=n;i++)
    //alert(i+"m"+m+",n"+n);
	if(m == i){
		document.getElementById(c3+i).className = c1;
		document.getElementById(c4+i).style.display = "";}
	else{
		document.getElementById(c3+i).className = c2;
		document.getElementById(c4+i).style.display = "none";}
}

function ShowWDMin(m,n){
 for(var i=1;i<=n;i++)
    //alert(i+"m"+m+",n"+n);
	if(m == i){
		document.getElementById("WDMinMenu"+i).className = "overbg";
		document.getElementById("WDMinTab"+i).style.display = "";}
	else{
		document.getElementById("WDMinMenu"+i).className = "";
		document.getElementById("WDMinTab"+i).style.display = "none";}
}
function ShowHMin(m,n){
 for(var i=1;i<=n;i++)
	if(m == i){
		document.getElementById("MinHMenu"+i).className = "overbg";
		document.getElementById("MinHTab"+i).style.display = "";}
	else{
		document.getElementById("MinHMenu"+i).className = "";
		document.getElementById("MinHTab"+i).style.display = "none";}
}
function cSearch(i){
 var fsh = document.getElementById("FlightSH");
 var hsh = document.getElementById("HotelSH");
 if(i == 1){
	fsh.style.display = "block";
	hsh.style.display = "none";}
 else{
	fsh.style.display = "none";
	hsh.style.display = "block";}
}
function ChgFT(id){
 if(id == 0)
	document.getElementById("BackDate").style.display = "none";
 else
	document.getElementById("BackDate").style.display = "block";
}
function ShowVisor(Airs,cw){
 window.showModalDialog("ShowVisor.asp?Airs="+Airs+"&CW="+cw,'', 'help:no;status:no;dialogWidth=200px;dialogHeight=200px;dialogleft=400px');
}
function GetHotel(HID,CD,LD){
with(document){
 HoteHotelFrm.HotelID.value = HID;
 HoteHotelFrm.ComeDate.value =  CD;
 HoteHotelFrm.LeaveDate.value = LD;
 HoteHotelFrm.submit();
}}
function GetMinFlight(Istrue,SC,EC,SD,BD){
with(document){
 MinFlightFrm.Istrue.value = Istrue;
 MinFlightFrm.StartCity.value = SC;
 MinFlightFrm.EndCity.value =  EC;
 MinFlightFrm.StartDate.value = SD;
 MinFlightFrm.BackDate.value = BD;
 MinFlightFrm.submit()
}}

function HotelInfo(id,cityname,obj){
 obj.HotelID.value = id;
 obj.CityName.value = cityname;
 obj.target = "_blank";
 obj.submit();
}

function GetMinFlight2(SC,SD,IstU,obj){	
 var SCa=SC.split("$");
 var SDa=SD.split("$");
 obj.StartCity.value = SCa[0];
 obj.StartDate.value = SDa[0]; 
 if (IstU==0)
  {
	obj.EndCity.value = SCa[1];  
  }
 else if (IstU==1)
  {
	obj.BackDate.value = SDa[1];
	obj.EndCity.value = SCa[1];
  }
 else if(IstU==2)
  {
	obj.StartDate2.value = SDa[2];
	obj.EndCity.value = SCa[2];
	obj.StartCity2.value = SCa[2];
	obj.EndCity2.value = SCa[1];
  }
 else if(IstU==3)
   {
	 obj.EndCity.value = SCa[1];   
   }
 else 
  {
	obj.EndCity.value = SCa[1];   
  }
 obj.IsTrue.value=IstU;
 obj.submit()
}

function CheckSF(){
with(FlightFrm){
 if(StartCity.value == ""){
	alert("请填写正确的机场名称！");
	StartInput.focus();
	return false;}
 if(EndCity.value == ""){
	alert("请填写正确的机场名称！");
	EndInput.focus();
	return false;}}
 return true;
}
function CheckSH(){
with(HotelFrm){
 if(CityName.value == ""){
	alert("请填写正确的城市名称！");
	CityInp.focus();
	return false;}}
 return true;
}

/*

function showlx(sel)
{
		if(sel == 0)
		{
			document.getElementById("flight").style.display="block";
			document.getElementById("flight1").style.display="none";
			cximg.src="../images/BJ/jipiao_bt01.gif";
		}
		if(sel == 1)
		{
			document.getElementById("flight").style.display="none";
			document.getElementById("flight1").style.display="block";
			cximg.src="../images/BJ/jipiao_bt02.gif";
		}

}


*/



