<%@ Register TagPrefix="uc1" TagName="PCy" Src="../js/PCy.ascx" %>
<%@ Page language="c#" Codebehind="GuoNeiSearch.aspx.cs" AutoEventWireup="false" Inherits="TourOnline.TemplateDefault.Airplane.GuoNeiSearch" %>
<%@ Register TagPrefix="uc1" TagName="Bottom" Src="../Bottom.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Top" Src="../Top.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>
			<%=strTitle%>
		</title>
		<META content="<%=strKeywords%>" name=Keywords>
		<META content="<%=strMata%>" name=Description>
		<LINK href="/style/Main.css" type="text/css" rel="stylesheet">
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script language="javascript" src="/js/calendar.js"></script>
		<style type="text/css">.style1 { FONT-WEIGHT: bold; FONT-SIZE: 18px; COLOR: #0066cc }
	.style2 { COLOR: #003399 }
		</style>
		<script language="javascript">
			function FunHcType(HcTypeValue)
			{
				if(HcTypeValue == "dc")
				{
					document.getElementById("Dc").style.display = "";
					document.getElementById("Wf").style.display = "none";
					document.getElementById("Lc").style.display = "none";
				}
				if(HcTypeValue == "wf")
				{
					document.getElementById("Dc").style.display = "none";
					document.getElementById("Wf").style.display = "";
					document.getElementById("Lc").style.display = "none";
				}
				if(HcTypeValue == "lc")
				{
					document.getElementById("Dc").style.display = "none";
					document.getElementById("Wf").style.display = "none";
					document.getElementById("Lc").style.display = "";
				}
			}
			function SearchSubmit()
			{
				if(document.Form1.HcType[0].checked)
				{
					if(document.Form1.DcStartCyId.value == "")
					{
						alert("请选择出发城市");
						document.Form1.DcStartCyId.focus();
						return false;
					}
					if(document.Form1.DcEndCyId.value == "")
					{
						alert("请选择目的城市");
						document.Form1.DcEndCyId.focus();
						return false;
					}
					if(document.Form1.DcStartCyId.value == document.Form1.DcEndCyId.value)
					{
						alert("您选择的出发城市与目的城市相同，请重新选择");
						document.Form1.DcEndCyId.focus();
						return false;
					}
					if(document.Form1.DcStartDate.value == "")
					{
						alert("请选择出发日期");
						return false;
					}
				}
				if(document.Form1.HcType[1].checked)
				{
					if(document.Form1.WfStartCyId.value == "")
					{
						alert("请选择出发城市");
						document.Form1.WfStartCyId.focus();
						return false;
					}
					if(document.Form1.WfEndCyId.value == "")
					{
						alert("请选择目的城市");
						document.Form1.WfEndCyId.focus();
						return false;
					}
					if(document.Form1.WfStartCyId.value == document.Form1.WfEndCyId.value)
					{
						alert("您选择的出发城市与目的城市相同，请重新选择");
						document.Form1.WfEndCyId.focus();
						return false;
					}
					var strWfStartDate = document.Form1.WfStartDate.value;
					if(strWfStartDate == "")
					{
						alert("请选择出发时间");
						return false;
					}
					aryWfStartDate = strWfStartDate.split("-");
					if(aryWfStartDate[1].length == 1)
					{
						strWfStartDate = aryWfStartDate[0] + "0" + aryWfStartDate[1];
					}
					else
					{
						strWfStartDate = aryWfStartDate[0] + aryWfStartDate[1];
					}
					if(aryWfStartDate[2].length == 1)
					{
						strWfStartDate = strWfStartDate + "0" + aryWfStartDate[2];
					}
					else
					{
						strWfStartDate = strWfStartDate + aryWfStartDate[2];
					}
					
					var strWfEndDate = document.Form1.WfEndDate.value;
					if(strWfEndDate == "")
					{
						alert("请选择返回时间");
						return false;
					}
					aryWfEndDate = strWfEndDate.split("-");
					if(aryWfEndDate[1].length == 1)
					{
						strWfEndDate = aryWfEndDate[0] + "0" + aryWfEndDate[1];
					}
					else
					{
						strWfEndDate = aryWfEndDate[0] + aryWfEndDate[1];
					}
					if(aryWfEndDate[2].length == 1)
					{
						strWfEndDate = strWfEndDate + "0" + aryWfEndDate[2];
					}
					else
					{
						strWfEndDate = strWfEndDate + aryWfEndDate[2];
					}
					if(strWfStartDate >  strWfEndDate )
					{
						alert("您选择的出发时间大于返回时间，请重新选择");
						return false;
					}
				}
				
				if(document.Form1.HcType[2].checked)
				{
					if(document.Form1.LcStartCyId.value == "")
					{
						alert("请选择出发城市");
						document.Form1.LcStartCyId.focus();
						return false;
					}
					if(document.Form1.LcFirstCyId.value == "")
					{
						alert("请选择第一目的城市");
						document.Form1.LcFirstCyId.focus();
						return false;
					}
					if(document.Form1.LcSecondlyCyId.value == "")
					{
						alert("请选择第二目的城市");
						document.Form1.LcSecondlyCyId.focus();
						return false;
					}
					if(document.Form1.LcStartCyId.value == document.Form1.LcFirstCyId.value)
					{
						alert("您选择的出发城市与第一目的城市相同，请重新选择");
						document.Form1.LcFirstCyId.focus();
						return false;
					}
					if(document.Form1.LcFirstCyId.value == document.Form1.LcSecondlyCyId.value)
					{
						alert("您选择的第一目的城市与第二目的城市相同，请重新选择");
						document.Form1.LcSecondlyCyId.focus();
						return false;
					}
					var strLcStartDate = document.Form1.LcStartDate.value;
					if(strLcStartDate == "")
					{
						alert("请选择出发时间");
						return false;
					}
					aryLcStartDate = strLcStartDate.split("-");
					if(aryLcStartDate[1].length == 1)
					{
						strLcStartDate = aryLcStartDate[0] + "0" + aryLcStartDate[1];
					}
					else
					{
						strLcStartDate = aryLcStartDate[0] + aryLcStartDate[1];
					}
					if(aryLcStartDate[2].length == 1)
					{
						strLcStartDate = strLcStartDate + "0" + aryLcStartDate[2];
					}
					else
					{
						strLcStartDate = strLcStartDate + aryLcStartDate[2];
					}
					
					var strLcFirstDate = document.Form1.LcFirstDate.value;
					if(strLcFirstDate == "")
					{
						alert("请选择您在第一目的城市的出发时间");
						return false;
					}
					aryLcFirstDate = strLcFirstDate.split("-");
					if(aryLcFirstDate[1].length == 1)
					{
						strLcFirstDate = aryLcFirstDate[0] + "0" + aryLcFirstDate[1];
					}
					else
					{
						strLcFirstDate = aryLcFirstDate[0] + aryLcFirstDate[1];
					}
					if(aryLcFirstDate[2].length == 1)
					{
						strLcFirstDate = strLcFirstDate + "0" + aryLcFirstDate[2];
					}
					else
					{
						strLcFirstDate = strLcFirstDate + aryLcFirstDate[2];
					}
					if(strLcStartDate >  strLcStartDate )
					{
						alert("您选择的出发时间大于在第一目的城市的出发时间，请重新选择");
						return false;
					}
					
				}
				Form1.action = "GuoNeiSearchList.aspx";
				Form1.submit();
				
			}
		</script>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<uc1:top id="Top1" runat="server"></uc1:top>
			<table cellSpacing="0" cellPadding="0" width="760" align="center" border="0">
				<tr>
					<td><span class="style1">国内航班查询</span></td>
				</tr>
			</table>
			<table cellSpacing="0" cellPadding="0" width="760" align="center" bgColor="#d4e5fa" border="0">
				<tr>
					<td align="right" width="71"><span class="style2">航程类型</span></td>
					<td height="27"><font color="#cf6000"><FONT face="宋体">&nbsp; </FONT><INPUT onclick="FunHcType(this.value)" type="radio" value="dc" name="HcType"><FONT face="宋体">&nbsp;单程
							</FONT><INPUT onclick="FunHcType(this.value)" type="radio" CHECKED value="wf" name="HcType"><FONT face="宋体">&nbsp;往返
							</FONT><INPUT onclick="FunHcType(this.value)" type="radio" value="lc" name="HcType"><FONT face="宋体">&nbsp;联程</FONT></font>
						<uc1:pcy id="PCy1" runat="server"></uc1:pcy></td>
				</tr>
			</table>
			<table id="dc" style="DISPLAY: none" cellSpacing="0" cellPadding="0" width="760" align="center"
				bgColor="#d4e5fa" border="0">
				<tr>
					<td align="right" width="68" height="14"><span class="style2">出发城市</span></td>
					<td width="318" height="27"><asp:dropdownlist id="DcStartPId" runat="server"></asp:dropdownlist><asp:dropdownlist id="DcStartCyId" runat="server"></asp:dropdownlist></td>
					<td class="style2" width="56">出发日期</td>
					<td class="style2" vAlign="middle" width="155"><INPUT readOnly type="text" maxLength="50" size="15" name="DcStartDate"><A onclick="event.cancelBubble=true;" href="javascript:showCalendar('imageCalendar1',false,'DcStartDate',null,null);"><IMG id="imageCalendar1" height="21" src="../images/button.gif" width="34" align="absMiddle"
								border="0"></A></td>
					<td class="style2" width="58">出发时间</td>
					<td class="style2" width="105"><SELECT name="DcStartTime">
							<OPTION value="" selected>不限</OPTION>
							<OPTION value="00:00-06:00">00:00-06:00</OPTION>
							<OPTION value="06:00-12:00">06:00-12:00</OPTION>
							<OPTION value="12:00-18:00">12:00-18:00</OPTION>
							<OPTION value="18:00-24:00">18:00-24:00</OPTION>
						</SELECT></td>
				</tr>
				<tr>
					<td align="right" width="68"><span class="style2">目的城市</span></td>
					<td colSpan="5" height="27"><asp:dropdownlist id="DcEndPId" runat="server"></asp:dropdownlist><asp:dropdownlist id="DcEndCyId" runat="server"></asp:dropdownlist></td>
				</tr>
				<tr>
					<td align="right" width="68"><span class="style2">舱位等级</span></td>
					<td colSpan="5" height="27">&nbsp;<INPUT type="radio" CHECKED value="1" name="DcCw"><FONT face="宋体" color="#003399">&nbsp;经济舱
							<INPUT type="radio" value="2" name="DcCw">&nbsp;公务舱 <INPUT type="radio" value="3" name="DcCw">&nbsp;头等舱</FONT></td>
				</tr>
				<tr>
					<td align="right" width="68"><span class="style2">航空公司</span></td>
					<td colSpan="5" height="27"><asp:dropdownlist id="DcHkgs" runat="server"></asp:dropdownlist></td>
				</tr>
			</table>
			<table id="wf" cellSpacing="0" cellPadding="0" width="760" align="center" bgColor="#d4e5fa"
				border="0">
				<tr>
					<td align="right" width="65" height="14"><span class="style2">出发城市</span></td>
					<td width="321" height="27"><asp:dropdownlist id="WfStartPId" runat="server"></asp:dropdownlist><asp:dropdownlist id="WfStartCyId" runat="server"></asp:dropdownlist></td>
					<td class="style2" width="56">出发日期</td>
					<td class="style2" width="156"><INPUT readOnly type="text" maxLength="50" size="15" name="WfStartDate"><A onclick="event.cancelBubble=true;" href="javascript:showCalendar('Img1',false,'WfStartDate',null,null);"><IMG id="Img1" height="21" src="/images//button.gif" width="34" align="absMiddle"
								border="0"></A></td>
					<td class="style2" width="57">出发时间</td>
					<td class="style2" width="105"><SELECT name="WfStartTime">
							<OPTION value="" selected>不限</OPTION>
							<OPTION value="00:00-06:00">00:00-06:00</OPTION>
							<OPTION value="06:00-12:00">06:00-12:00</OPTION>
							<OPTION value="12:00-18:00">12:00-18:00</OPTION>
							<OPTION value="18:00-24:00">18:00-24:00</OPTION>
						</SELECT></td>
				</tr>
				<tr>
					<td align="right" width="65"><span class="style2">目的城市</span></td>
					<td height="27"><asp:dropdownlist id="WfEndPId" runat="server"></asp:dropdownlist><asp:dropdownlist id="WfEndCyId" runat="server"></asp:dropdownlist></td>
					<td class="style2">返回日期</td>
					<td><INPUT readOnly type="text" maxLength="50" size="15" name="WfEndDate"><A onclick="event.cancelBubble=true;" href="javascript:showCalendar('Img2',false,'WfEndDate',null,null);"><IMG id="Img2" height="21" src="/images//button.gif" width="34" align="absMiddle"
								border="0"></A></td>
					<td class="style2">返回时间</td>
					<td><SELECT name="WfEndTime">
							<OPTION value="" selected>不限</OPTION>
							<OPTION value="00:00-06:00">00:00-06:00</OPTION>
							<OPTION value="06:00-12:00">06:00-12:00</OPTION>
							<OPTION value="12:00-18:00">12:00-18:00</OPTION>
							<OPTION value="18:00-24:00">18:00-24:00</OPTION>
						</SELECT></td>
				</tr>
				<tr>
					<td align="right" width="65"><span class="style2">舱位等级</span></td>
					<td colSpan="5" height="27">&nbsp;<INPUT type="radio" CHECKED value="1" name="WfCw"><FONT face="宋体" color="#003399">&nbsp;经济舱
							<INPUT type="radio" value="2" name="WfCw">&nbsp;公务舱 <INPUT type="radio" value="3" name="WfCw">&nbsp;头等舱</FONT></td>
				</tr>
				<tr>
					<td align="right" width="65"><span class="style2">航空公司</span></td>
					<td colSpan="5" height="27"><asp:dropdownlist id="WfHkgs" runat="server"></asp:dropdownlist></td>
				</tr>
			</table>
			<table id="lc" style="DISPLAY: none" cellSpacing="0" cellPadding="0" width="760" align="center"
				bgColor="#d4e5fa" border="0">
				<tr>
					<td align="right" width="80" height="14"><span class="style2">出发城市</span></td>
					<td width="310" height="27"><asp:dropdownlist id="LcStartPId" runat="server"></asp:dropdownlist><asp:dropdownlist id="LcStartCyId" runat="server"></asp:dropdownlist></td>
					<td class="style2" width="55">出发日期</td>
					<td class="style2" width="158"><INPUT readOnly type="text" maxLength="50" size="15" name="LcStartDate"><A onclick="event.cancelBubble=true;" href="javascript:showCalendar('Img3',false,'LcStartDate',null,null);"><IMG id="Img3" height="21" src="/images//button.gif" width="34" align="absMiddle"
								border="0"></A></td>
					<td class="style2" width="58">出发时间</td>
					<td class="style2" width="99"><SELECT name="LcStartTime">
							<OPTION value="" selected>不限</OPTION>
							<OPTION value="00:00-06:00">00:00-06:00</OPTION>
							<OPTION value="06:00-12:00">06:00-12:00</OPTION>
							<OPTION value="12:00-18:00">12:00-18:00</OPTION>
							<OPTION value="18:00-24:00">18:00-24:00</OPTION>
						</SELECT></td>
				</tr>
				<tr>
					<td align="right" width="80"><span class="style2">第一目的城市</span></td>
					<td height="27"><asp:dropdownlist id="LcFirstPId" runat="server"></asp:dropdownlist><asp:dropdownlist id="LcFirstCyId" runat="server"></asp:dropdownlist></td>
					<td class="style2">出发日期</td>
					<td><INPUT readOnly type="text" maxLength="50" size="15" name="LcFirstDate"><A onclick="event.cancelBubble=true;" href="javascript:showCalendar('Img4',false,'LcFirstDate',null,null);"><IMG id="Img4" height="21" src="/images//button.gif" width="34" align="absMiddle"
								border="0"></A></td>
					<td class="style2">出发时间</td>
					<td><SELECT name="LcFirstTime">
							<OPTION value="" selected>不限</OPTION>
							<OPTION value="00:00-06:00">00:00-06:00</OPTION>
							<OPTION value="06:00-12:00">06:00-12:00</OPTION>
							<OPTION value="12:00-18:00">12:00-18:00</OPTION>
							<OPTION value="18:00-24:00">18:00-24:00</OPTION>
						</SELECT></td>
				</tr>
				<tr>
					<td align="right" width="80"><span class="style2">第二目的城市</span></td>
					<td height="27"><asp:dropdownlist id="LcSecondlyPId" runat="server"></asp:dropdownlist><asp:dropdownlist id="LcSecondlyCyId" runat="server"></asp:dropdownlist></td>
					<td class="style2"></td>
					<td><A onclick="event.cancelBubble=true;" href="javascript:showCalendar('Img5',false,'LcSecondlyDate',null,null);"></A></td>
					<td class="style2"></td>
					<td></td>
				</tr>
				<tr>
					<td align="right" width="80"><span class="style2">舱位等级</span></td>
					<td colSpan="5" height="27">&nbsp;<INPUT type="radio" CHECKED value="1" name="LcCw"><FONT face="宋体" color="#003399">&nbsp;经济舱
							<INPUT type="radio" value="2" name="LcCw">&nbsp;公务舱 <INPUT type="radio" value="3" name="LcCw">&nbsp;头等舱</FONT></td>
				</tr>
				<tr>
					<td align="right" width="80"><span class="style2">航空公司</span></td>
					<td colSpan="5" height="27"><asp:dropdownlist id="LcHkgs" runat="server"></asp:dropdownlist></td>
				</tr>
			</table>
			<table cellSpacing="0" cellPadding="0" width="760" align="center" border="0">
				<tr>
					<td align="center" height="10"></td>
				</tr>
				<tr>
					<td align="center"><IMG style="CURSOR: hand" onclick="javascript:SearchSubmit();" src="../images/cxyd.gif">&nbsp;<IMG height="32" src="../images/cxskb.gif" width="92"></td>
				</tr>
			</table>
			<uc1:Bottom id="Bottom1" runat="server"></uc1:Bottom>
		</form>
	</body>
</HTML>
