<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:msxsl="urn:schemas-microsoft-com:xslt"  xmlns:user="http://mycompany.com/mynamespace">
	<xsl:variable name="ItinTitle"/>
	<msxsl:script language="JScript" implements-prefix="user">
	function setGlobalStr()
	{
		return "/";
	}
	function GetMonth(strMonth)
	{
		switch(strMonth)
		{
			case "DEC":
				return 11;
			case "NOV":
				return 10;
			case "OCT":
				return 9;
			case "SEP":
				return 8;
			case "AUG":
				return 7;
			case "JUL":
				return 6;
			case "JUN":
				return 5;
			case "MAY":
				return 4;
			case "APR":
				return 3;
			case "MAR":
				return 2;
			case "FEB":
				return 1;
			case "JAN":
				return 0;
			default:
				return 0;
		}
	}
	
   function GetDate(nodeDep,flag,nodeDeadLine,bDeadLine) {
	strDepArrTemp =  nodeDep.nextNode().xml;
	if(flag == 0)
	{
		strDepArrTemp = strDepArrTemp.substring(9,14);
	}
	else
	{
		strDepArrTemp = strDepArrTemp.substring(12,17);
	}	
	strDepArrDay = strDepArrTemp.substring(0,2);
	strDepArrMonth = strDepArrTemp.substring(2,5).toUpperCase();
	var iDepArrMonth;
	iDepArrMonth = GetMonth(strDepArrMonth);
	if(bDeadLine == 1)
	{
		strDeadLineTemp = nodeDeadLine.nextNode().xml;
		istart = strDeadLineTemp.indexOf(">") + 1;
		iend = strDeadLineTemp.indexOf("/") - 1;
		strDeadLineTemp = strDeadLineTemp.substring(istart,iend);
		strDeadLineDay = strDeadLineTemp.substring(0,2);
		strDeadLineMonth = strDeadLineTemp.substring(2,5).toUpperCase();
		strDeadLineYear = strDeadLineTemp.substring(5,7);
		strDeadLineYear = "20" + strDeadLineYear;
		iDepArrYear = strDeadLineYear;
		iDeadLineMonth = GetMonth(strDeadLineMonth);
		if(iDeadLineMonth > iDepArrMonth)
		{
				iDepArrYear = parseInt(iDepArrYear) + 1;
		}
		else
		{
			iDepArrYear = strDeadLineYear;
		}
	}
	else
	{
		date = new Date();
		if(date.getMonth() > iDepArrMonth)
		{
			iDepArrYear = parseInt(date.getFullYear()) + 1;
		}
		else
		{
			iDepArrYear = parseInt(date.getFullYear());
		}
	}
	var CurDate = new Date();
	var TickDate = CurDate;
	TickDate.setDate(strDepArrDay);	
	TickDate.setMonth(iDepArrMonth);
	TickDate.setFullYear(iDepArrYear);
	var weekday=new Array(7);
	weekday[0]="(星期日)";
	weekday[1]="(星期一)";
	weekday[2]="(星期二)";
	weekday[3]="(星期三)";
	weekday[4]="(星期四)";
	weekday[5]="(星期五)";
	weekday[6]="(星期六)";
	strWeek = weekday[TickDate.getDay()];
	var strDate = iDepArrMonth+1;
	if(10 > strDate)
	{
		strDate = "0" + strDate;
	}
	strDate += "月";
	strDate += strDepArrDay;
	strDate += "日";
	strDate += strWeek;
	if(flag == 2)
	{
		strDate = iDepArrYear;
		strDate += "年";
		strDate += iDepArrMonth+1;
		strDate += "月";
		strDate += strDepArrDay;
		strDate += "日";
		return strDate;
	}
	return strDate;
   }
   
   function Segment(nodelist){
		strTemp = nodelist.nextNode().xml;
		if(strTemp.match("&lt;NORMAL>"))
			return "普通航段";
		else if(strTemp.match("&lt;OPEN>"))
			return "OPEN航段";
		else if(strTemp.match("&lt;ARNK>"))
			return "地面运输航段";
		else if(strTemp.match("&lt;INFO>"))
			return "信息航段";
		else
			return "null";
	}

	function GetTime(nodelist){
		strTemp = nodelist.nextNode().xml.toUpperCase();
		if(strTemp.indexOf("&lt;/") &lt;=0)
			return "-";
		istart = strTemp.indexOf(">") + 1;
		iend = strTemp.lastIndexOf("&lt;/"); 
		strTemp = strTemp.substring(istart,iend).toUpperCase();
		var strDay = "";
		if(strTemp.indexOf("+") > 0)
		{
			strDay = strTemp.substring(strTemp.length - 2);
		}
		strHour = strTemp.substring(0,2);
		strMinte = strTemp.substring(2,4);
		var strTime = strHour;
		strTime += ":";
		strTime += strMinte;
		return strTime+strDay;
	}
	function GetDuration(Dep,Arr){
		strDepTemp = Dep.nextNode().xml;
		strArrTemp = Arr.nextNode().xml;

		if(strDepTemp.indexOf("&lt;/") &lt;=0)
		{
			return "-小时-分";
		}
		istart = strDepTemp.indexOf(">") + 1;
		iend = strDepTemp.lastIndexOf("&lt;/"); 
		strDepTemp = strDepTemp.substring(istart,iend);

		if(strArrTemp.indexOf("&lt;/") &lt;=0)
		{
			return "-小时-分";
		}
		istart = strArrTemp.indexOf(">") + 1;
		iend = strArrTemp.lastIndexOf("&lt;/"); 
		strArrTemp = strArrTemp.substring(istart,iend);

		strDepHour = strDepTemp.substring(0,2);
		strDepMinte = strDepTemp.substring(2,4);
		strArrHour = strArrTemp.substring(0,2);
		strArrMinte = strArrTemp.substring(2,4);
		var flag = 0;
		if(strDepMinte>strArrMinte)
		{
			flag = 1;
			strArrMinte = parseInt(strArrMinte) + 60;
		}
		if(strDepHour>strArrHour)
		{
			strArrHour = parseInt(strArrHour) + 24;
		}
		var strHour = strArrHour - strDepHour - flag;
		var strMinte = strArrMinte - strDepMinte;
		var strTime = strHour;
		strTime += "小时";
		strTime +=strMinte;
		strTime += "分";
		return strTime;
	}
	function GetIdCard(nodelist)
	{
		strTemp = nodelist.nextNode().xml.toUpperCase();
		if(strTemp.match("NI"))
		{
			return "身份证";
		}
		if(strTemp.match("PP"))
		{
			return "护照";
		}
		istart = strTemp.indexOf(">") + 1;
		iend = strTemp.indexOf("/") - 1;
		strTemp = strTemp.substring(istart,iend);
		return strTemp;
	}
	function GetStatus(nodelist)
	{
		strTemp = nodelist.nextNode().xml.toUpperCase();
		istart = strTemp.indexOf(">") + 1;
		iend = strTemp.lastIndexOf("/") - 1; 
		strTemp = strTemp.substring(istart,iend).toUpperCase();
		if(strTemp.match("OK"))
		{
			return "已确认";
		}
		else
		{
			return "未确认";
		}

	}
	function getPhone(nodelist)
	{
		strTemp = nodelist.nextNode().xml.toUpperCase();
		istart = strTemp.indexOf(">") + 1;
		iend = strTemp.lastIndexOf("/") - 1; 
		strTemp = strTemp.substring(istart,iend).toUpperCase();
		return strTemp;
	}
	function getName(nodelist)
	{
		strTemp = nodelist.nextNode().xml.toUpperCase();
		istart = strTemp.indexOf(">") + 1;
		iend = strTemp.lastIndexOf("/") - 1;
		strTemp = strTemp.substring(istart,iend).toUpperCase();
		strTitle = "";
		if(strTemp.indexOf("MRS") > 0)
		{
			strTitle = "MRS";
		}
		else if(strTemp.indexOf("MISS") > 0)
		{
			strTitle = "MISS";
		}
		else if(strTemp.indexOf("MR") > 0)
		{
			strTitle = "MR";
		}
		else if(strTemp.indexOf("MS") > 0)
		{
			strTitle = "MS";
		}
		if(strTemp != "")
		{
			if(strTemp.indexOf(" ") > 0)
			{
				iend = strTemp.indexOf(strTitle) - 1;
			}
			else
			{
				iend = strTemp.indexOf(strTitle);
			}	
			strName = strTemp.substring(0,iend);
			strTitle = strTemp.substring(iend);
			return strName + " " + strTitle;
		}
		else 
			return strTemp;
	}

</msxsl:script>

<xsl:template match="/">
	<html>
		<TABLE style="border-collapse:collapse;" border="0" cellSpacing="0" cellPadding="0" width="99%" align="center">
			<TBODY>
				<TR>
					<TD align="left" width="45%">
						<BR/>
						
							<FONT style="FONT-WEIGHT: bold; FONT-SIZE: 12pt">
								<SPAN>
									<xsl:value-of select="/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDBY"/>
								</SPAN>
							</FONT>
						<br/>
						<br/>
						<BR/>
						电话 ： <SPAN>
							<xsl:value-of select="/Response/ITINERARY/AGENTINFO/CONTACTINFO/PHONE"/>
						</SPAN>
						<BR/>传真 ： <SPAN>
							<xsl:value-of select="/Response/ITINERARY/AGENTINFO/CONTACTINFO/FAX"/>
						</SPAN>
						<BR/>代理人 ： <SPAN>
							<xsl:value-of select="/Response/ITINERARY/AGENTINFO/NAME"/>
						</SPAN>
					</TD>
					<TD width="35%"/>
					<TD id="iataimage" align="middle" width="45%" style="display:none"/>
				</TR>
			</TBODY>
		</TABLE>
		<TABLE style="BORDER-RIGHT: 0px dashed; BORDER-TOP: 0px dashed; BORDER-LEFT: 0px dashed; BORDER-BOTTOM: #000000 1px dashed" cellSpacing="0" cellPadding="0" width="99%" align="center">
			<TBODY>
				<TR>
					<br/>
					<TD/>
				</TR>
			</TBODY>
		</TABLE>
		<BR/>
		<DIV align="center">
			
				<FONT style="FONT-WEIGHT: bold; FONT-SIZE: 14pt">行 程 单</FONT>
		
		</DIV>
		<BR/>
		<FONT style="FONT-SIZE: 12pt">
		尊敬的 
			<SPAN>
			<xsl:if test = "/Response/ITINERARY/PASSENGERLIST/PASSENGER/NAME != ''">
				<STRONG><xsl:value-of select="user:getName(/Response/ITINERARY/PASSENGERLIST/PASSENGER/NAME)"/></STRONG>
			</xsl:if>
			</SPAN>:
		</FONT>
		<BR/>
		<PRE>
			<FONT style="FONT-SIZE: 12pt">感谢您选择我公司为您安排的旅行行程。以下是您此次行程的具体航班信息，请查收：</FONT>
		</PRE>
		<BR/>
		<PRE>
			<FONT style="FONT-SIZE: 12pt">
				<STRONG>记录编号</STRONG>：</FONT>
			<SPAN>
				<FONT style="FONT-SIZE: 12pt">
					<xsl:value-of select="/Response/ITINERARY/PNRNO"/>
				</FONT>
			</SPAN>
		</PRE>
	
		<!-- 旅客信息 -->
		<STRONG>旅客信息：</STRONG><p/>
		<br/>
			<TABLE style="BORDER-COLLAPSE: collapse; width:700px; table-layout:fixed; word-wrap:break-word;word-break:break-all" borderColor="black" cellSpacing="0" cellPadding="0" width="80%" align="center" border="1" bgColor="#ccccff">
				<TBODY>
					<TR align="center">
						<TD width="185px" height="22">
							<STRONG>旅客姓名</STRONG>
						</TD>
						<TD width="90px" height="22">
							<STRONG>证件类型</STRONG>
						</TD>
						<TD width="150px" height="22">
							<STRONG>证件号</STRONG>
						</TD>
						<TD width="150px" height="22">
							<STRONG>常客卡号</STRONG>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
			<DIV>
			<DIV>
				<TABLE style="BORDER-COLLAPSE: collapse; width:700px;word-wrap:break-word;word-break:break-all" borderColor="black" cellSpacing="0" cellPadding="0" width="80%" align="center" border="1">
					<TBODY>
						<TR align="middle">
							<TD width="185px" height="22">
								<SPAN>
								<xsl:if test = "/Response/ITINERARY/PASSENGERLIST/PASSENGER/NAME != ''">
									<xsl:value-of select="user:getName(/Response/ITINERARY/PASSENGERLIST/PASSENGER/NAME)"/>
								</xsl:if>
								</SPAN>
							</TD>
							<TD width="89px" height="22">
								<xsl:if test="/Response/ITINERARY/PASSENGERLIST/PASSENGER/IDCARD/CARDTYPE!=''">
									<SPAN>
										<xsl:value-of select="user:GetIdCard(/Response/ITINERARY/PASSENGERLIST/PASSENGER/IDCARD/CARDTYPE)"/>
									</SPAN>
								</xsl:if>
							</TD>
							<TD width="149px" height="22">
								<xsl:if test="/Response/ITINERARY/PASSENGERLIST/PASSENGER/IDCARD/CARDNUMBER != ''">
									<SPAN>
										<xsl:value-of select="/Response/ITINERARY/PASSENGERLIST/PASSENGER/IDCARD/CARDNUMBER"/>
									</SPAN>
								</xsl:if>
							</TD>
							<TD width="150px" height="22">
								<SPAN/>
							</TD>
						</TR>
					</TBODY>
				</TABLE>
			</DIV>
		</DIV> 

		<!-- 航班信息 -->
		<STRONG>航班信息：</STRONG><p/>
		<br/>
		<xsl:for-each select="/Response/ITINERARY/SEGMENTS/SEGMENT">

			<TABLE style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 0px solid; width:700px;table-layout:fixed; word-wrap:break-word;word-break:break-all" cellSpacing="0" cellPadding="3" align="center" bgColor="#ccccff">
				<TBODY>
					<TR>
						<TD align="left">第<SPAN>
								<xsl:value-of select="position()"/>
							</SPAN>段 <SPAN>
								<xsl:value-of select="user:Segment(.)"/>
							</SPAN>
						</TD>
					</TR>
				</TBODY>
			</TABLE>


			<!-- NORMAL航段 -->
			<xsl:if test="NORMAL != ''">
				<xsl:for-each select="NORMAL/LEGS/LEG">
					<DIV>
						<TABLE style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; width:698px; word-wrap:break-word;word-break:break-all" cellSpacing="0" cellPadding="3" align="center" bgColor="#f0f0f0">
							<TBODY>
								<TR>
									<TD align="middle" width="84px">
										<STRONG>日期 :</STRONG>
									</TD>
									<TD width="265px">
										<SPAN>
										<xsl:choose>
										<xsl:when test ="DEPDATE != '' and /Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE != ''">
										<xsl:value-of select="user:GetDate(DEPDATE,0,/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE,1)"/>
										</xsl:when>
										<xsl:when test ="DEPDATE != '' and normalize-space(/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE) = ''">
										<xsl:value-of select="user:GetDate(DEPDATE,0,/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE,0)"/>
										</xsl:when>
										</xsl:choose>
										</SPAN>
									</TD>
									<TD align="middle" width="84px">
										<STRONG>经停 :</STRONG>
									</TD>
									<TD width="265px">
										<SPAN>
											<xsl:value-of select="../../STOPS"/>
										</SPAN>
									</TD>
								</TR> 
								<TR>
									<TD align="middle">
										<STRONG>航班 :</STRONG>
									</TD>
									<TD>
										<SPAN>
											<xsl:value-of select="../../AIRLINE"/>
											<xsl:value-of select="../../FLIGHTNO"/>
										</SPAN>  -  <SPAN>
											<xsl:value-of select="/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDBY"/>
										</SPAN>
									</TD>
									<TD align="middle">
										<STRONG>状态 :</STRONG>
									</TD>
									<TD>
										<SPAN>
										<xsl:if test = "/Response/ITINERARY/SEGMENTS/SEGMENT/NORMAL/SEGSTATUS != ''">
											<xsl:value-of select="user:GetStatus(/Response/ITINERARY/SEGMENTS/SEGMENT/NORMAL/SEATSTATUS)"/>
										</xsl:if>
										</SPAN>
									</TD>
									<!--<TD align="middle">
										<STRONG>机型 :</STRONG>
									
									<TD>
										<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
									</TD>-->
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>舱位 :</STRONG>
									</TD>
									<TD>
										<SPAN>
											<xsl:value-of select="../../CLASS"/>
										</SPAN>
										<SPAN/>
									</TD>
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>起飞 :</STRONG>
									</TD>
									<TD colSpan="2">
										<SPAN>
										<xsl:if test = "DEPTIME != ''">
											<xsl:value-of select="user:GetTime(DEPTIME)"/>
										</xsl:if>
										</SPAN> (当地时间)   <SPAN>
											<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										</SPAN>
										<SPAN>
											<xsl:value-of select="ORIGIN"/>
										</SPAN>
										<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										<SPAN>
											<xsl:value-of select="ORI_TERMINAL"/>
										</SPAN>
									</TD>
									<TD id="departureCityWeather" align="left">(天气信息)</TD>
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>到达 :</STRONG>
									</TD>
									<TD colSpan="2">
										<SPAN>
										<xsl:choose>
										<xsl:when test = "ARRTIME != ''">
											<xsl:value-of select="user:GetTime(ARRTIME)"/>
										</xsl:when>
										<xsl:otherwise>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
										</xsl:otherwise>
										</xsl:choose>
										</SPAN> (当地时间)   <SPAN>
											<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										</SPAN>
										<SPAN>
											<xsl:value-of select="DEST"/>
										</SPAN>
										<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										<SPAN>
											<xsl:value-of select="DEST_TERMINAL"/>
										</SPAN>
									</TD>
									<TD id="arrivalCityWeather" align="left">(天气信息)</TD>
								</TR>
								<TR>
									<!--<TD align="middle">
										<STRONG>飞行 :</STRONG>
									</TD>
									<TD>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
									</TD>-->
									
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>行李 :</STRONG>
									</TD>
									<TD>
										<SPAN>
											<xsl:value-of select="BAGGAGE"/>
										</SPAN>
									</TD>
									<TD align="middle">
										<STRONG>餐食 :</STRONG>
									</TD>
									<TD>
										<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
									</TD>
									<TD align="middle"/>
									<TD/>
								</TR>
							</TBODY>
						</TABLE>
					</DIV>
				</xsl:for-each>
			</xsl:if>
			<!-- OPEN航段 -->
			<xsl:if test="OPEN != ''">
				<xsl:for-each select="OPEN">
					<DIV>
						<TABLE style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; width:698px; word-wrap:break-word;word-break:break-all" cellSpacing="0" cellPadding="3" align="center" bgColor="#f0f0f0">
							<TBODY>
								<TR>
									<TD align="middle" width="84px">
										<STRONG>日期 :</STRONG>
									</TD>
									<TD width="265px">
										<SPAN>
										<xsl:choose>
											<xsl:when test = "DEPDATE != '' and /Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE != ''">
											<xsl:value-of select="user:GetDate(DEPDATE,0,/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE,1)"/>
											</xsl:when>
											<xsl:when test ="DEPDATE != '' and normalize-space(/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE) = ''">
											<xsl:value-of select="user:GetDate(DEPDATE,0,/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE,0)"/>
											</xsl:when>
											<xsl:otherwise>
											<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
											</xsl:otherwise>
										</xsl:choose>
										</SPAN>
									</TD>
									<TD align="middle" width="84px">
										<STRONG>经停 :</STRONG>
									</TD>
									<TD width="265px">
										<xsl:choose>
											<xsl:when test = "STOPS != ''">
											<xsl:value-of select="STOPS"/>
											</xsl:when>
											<xsl:otherwise>
											<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
											</xsl:otherwise>
										</xsl:choose>
									</TD>
								</TR> 
								<TR>
									<TD align="middle">
										<STRONG>航班 :</STRONG>
									</TD>
									<TD>
										<SPAN>
											<xsl:choose>
											<xsl:when test = "AIRLINE != '' and FLIGHTNO != '' ">
											<xsl:value-of select="AIRLINE"/>
											<xsl:value-of select="FLIGHTNO"/>
											</xsl:when>
											<xsl:otherwise>
											<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
											</xsl:otherwise>
											</xsl:choose>
										</SPAN>  -  <SPAN>
											
											<xsl:choose>
											<xsl:when test = "/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDBY != ''">
											<xsl:value-of select="/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDBY"/>
											</xsl:when>
											<xsl:otherwise>
											<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
											</xsl:otherwise>
										</xsl:choose>
										</SPAN>
									</TD>
									<TD align="middle">
										<STRONG>状态 :</STRONG>
									</TD>
									<TD>
										<SPAN>
										<xsl:choose>
											<xsl:when test = "/Response/ITINERARY/SEGMENTS/SEGMENT/OPEN/SEGSTATUS != ''">
											<xsl:value-of select="user:GetStatus(/Response/ITINERARY/SEGMENTS/SEGMENT/OPEN/SEATSTATUS)"/>
											</xsl:when>
											<xsl:otherwise>
											<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
											</xsl:otherwise>
										</xsl:choose>
										</SPAN>
									</TD>
									<!--<TD align="middle">
										<STRONG>机型 :</STRONG>
									</TD>
									<TD>
										<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
									</TD>-->
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>舱位 :</STRONG>
									</TD>
									<TD>
										<SPAN>
										<xsl:choose>
											<xsl:when test = "CLASS != ''">
											<xsl:value-of select="CLASS"/>
											</xsl:when>
											<xsl:otherwise>
											<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
											</xsl:otherwise>
										</xsl:choose>
										</SPAN>
									</TD>
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>起飞 :</STRONG>
									</TD>
									<TD colSpan="2">
										<SPAN>
										<xsl:choose>
										<xsl:when test = "DEPTIME != ''">
											<xsl:value-of select="user:GetTime(DEPTIME)"/>
										</xsl:when>
										<xsl:otherwise>
										<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
										</xsl:otherwise>
										</xsl:choose>
										</SPAN> (当地时间)   <SPAN>
											<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										</SPAN>
										<SPAN>
											<xsl:value-of select="ORIGIN"/>
										</SPAN>
										<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										<SPAN>
											<xsl:value-of select="ORI_TERMINAL"/>
										</SPAN>
									</TD>
									<TD id="departureCityWeather" align="left">(天气信息)</TD>
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>到达 :</STRONG>
									</TD>
									<TD colSpan="2">
										<SPAN>
										
										<xsl:choose>
										<xsl:when test = "ARRTIME != ''">
											<xsl:value-of select="user:GetTime(ARRTIME)"/>
										</xsl:when>
										<xsl:otherwise>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
										</xsl:otherwise>
										</xsl:choose>
										
										</SPAN> (当地时间)   <SPAN>
											<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										</SPAN>
										<SPAN>
											<xsl:value-of select="DEST"/>
										</SPAN>
										<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										<SPAN>
											<xsl:value-of select="DEST_TERMINAL"/>
										</SPAN>
									</TD>
									<TD id="arrivalCityWeather" align="left">(天气信息)</TD>
								</TR>
								<TR>
									<!--<TD align="middle">
										<STRONG>飞行 :</STRONG>
									</TD>
									<TD>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
									</TD>-->
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>行李 :</STRONG>
									</TD>
									<TD>
										<xsl:choose>
										<xsl:when test = "BAGGAGE != ''">
											<xsl:value-of select="BAGGAGE"/>
										</xsl:when>
										<xsl:otherwise>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
										</xsl:otherwise>
										</xsl:choose>
									</TD>
									<TD align="middle">
										<STRONG>餐食 :</STRONG>
									</TD>
									<TD>
										<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
									</TD>
									<TD align="middle"/>
									<TD/>
								</TR>
							</TBODY>
						</TABLE>
					</DIV>
				</xsl:for-each>
			</xsl:if>
			<!-- ARNK航段 -->
			<xsl:if test="ARNK != ''">
				<xsl:for-each select="ARNK">
					<DIV>
						<TABLE style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; width:698px; word-wrap:break-word;word-break:break-all" cellSpacing="0" cellPadding="3" align="center" bgColor="#f0f0f0">
							<TBODY>
								<TR>
									<TD align="middle" width="84px">
										<STRONG>日期 :</STRONG>
									</TD>
									<TD width="265px">
										<SPAN>
										</SPAN>
									</TD>
									<TD align="middle" width="84px">
										<STRONG>经停 :</STRONG>
									</TD>
									<TD width="265px">
										<SPAN>
										</SPAN>
									</TD>
								</TR> 
								<TR>
									<TD align="middle">
										<STRONG>航班 :</STRONG>
									</TD>
									<TD>
										<SPAN>
										</SPAN>    <SPAN>
										</SPAN>
									</TD>
									<TD align="middle">
										<STRONG>状态 :</STRONG>
									</TD>
									<TD>
										<SPAN>
											
										</SPAN>
									</TD>
									<!--<TD align="middle">
										<STRONG>机型 :</STRONG>
									</TD>
									<TD>
										<SPAN/>
									</TD>-->
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>舱位 :</STRONG>
									</TD>
									<TD>
										<SPAN>
											
										</SPAN>
										<SPAN/>
									</TD>
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>起飞 :</STRONG>
									</TD>
									<TD colSpan="2">
										<SPAN>
										
										</SPAN>  (当地时间)   <SPAN>
											<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										</SPAN>
										<SPAN>
											<xsl:value-of select="ORIGIN"/>
										</SPAN>
										<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										<SPAN>
											
										</SPAN>
									</TD>
									<TD id="departureCityWeather" align="left">(天气信息)</TD>
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>到达 :</STRONG>
									</TD>
									<TD colSpan="2">
										<SPAN>
										
										
										</SPAN> (当地时间)   <SPAN>
											<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										</SPAN>
										<SPAN>
											<xsl:value-of select="DEST"/>
										</SPAN>
										<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										<SPAN>
										</SPAN>
									</TD>
									<TD id="arrivalCityWeather" align="left">(天气信息)</TD>
								</TR>
								<TR>
									<!--<TD align="middle">
										<STRONG>飞行 :</STRONG>
									</TD>
									<TD>
										<SPAN>
						
										</SPAN>
									</TD>-->
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>行李 :</STRONG>
									</TD>
									<TD>
										<SPAN>
								
										</SPAN>
									</TD>
									<TD align="middle">
										<STRONG>餐食 :</STRONG>
									</TD>
									<TD>
										<SPAN/>
									</TD>
									<TD align="middle"/>
									<TD/>
								</TR>
							</TBODY>
						</TABLE>
					</DIV>
				</xsl:for-each>
			</xsl:if>
			<!-- INFO航段 -->
			<xsl:if test="INFO != ''">
				<xsl:for-each select="INFO/LEGS/LEG">
					<DIV>

						<TABLE style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; width:698px; word-wrap:break-word;word-break:break-all" cellSpacing="0" cellPadding="3" align="center" bgColor="#f0f0f0">
							<TBODY>
								<TR>
									<TD align="middle" width="84px">
										<STRONG>日期 :</STRONG>
									</TD>
									<TD width="265px">
										<SPAN>
										<xsl:choose>
										<xsl:when test ="DEPDATE != '' and /Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE != ''">
										<xsl:value-of select="user:GetDate(DEPDATE,0,/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE,1)"/>
										</xsl:when>
										<xsl:when test ="DEPDATE != '' and normalize-space(/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE) = ''">
										<xsl:value-of select="user:GetDate(DEPDATE,0,/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE,0)"/>
										</xsl:when>
										</xsl:choose>
										</SPAN>
									</TD>
									<TD align="middle" width="84px">
										<STRONG>经停 :</STRONG>
									</TD>
									<TD width="265px">
										<SPAN>
											<xsl:value-of select="../../STOPS"/>
										</SPAN>
									</TD>
								</TR> 
								<TR>
									<TD align="middle">
										<STRONG>航班 :</STRONG>
									</TD>
									<TD>
										<SPAN>
											<xsl:value-of select="../../AIRLINE"/>
											<xsl:value-of select="../../FLIGHTNO"/>
										</SPAN>  -  <SPAN>
											<xsl:value-of select="/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDBY"/>
										</SPAN>
									</TD>
									<TD align="middle">
										<STRONG>状态 :</STRONG>
									</TD>
									<TD>
										<SPAN>
										<xsl:if test = "/Response/ITINERARY/SEGMENTS/SEGMENT/INFO/SEGSTATUS != ''">
											<xsl:value-of select="user:GetStatus(/Response/ITINERARY/SEGMENTS/SEGMENT/INFO/SEATSTATUS)"/>
										</xsl:if>
										</SPAN>
									</TD>
									<!--<TD align="middle">
										<STRONG>机型 :</STRONG>
									</TD>
									<TD>
										<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
									</TD>-->
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>舱位 :</STRONG>
									</TD>
									<TD>
										<SPAN>
											<xsl:value-of select="../../CLASS"/>
										</SPAN>
										<SPAN/>
									</TD>

								</TR>
								<TR>
									<TD align="middle">
										<STRONG>起飞 :</STRONG>
									</TD>
									<TD colSpan="2">
										<SPAN>
										<xsl:if test = "DEPTIME != ''">
											<xsl:value-of select="user:GetTime(DEPTIME)"/>
										</xsl:if>
										</SPAN> (当地时间)   <SPAN>
											<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										</SPAN>
										<SPAN>
											<xsl:value-of select="ORIGIN"/>
										</SPAN>
										<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										<SPAN>
											<xsl:value-of select="ORI_TERMINAL"/>
										</SPAN>
									</TD>
									<TD id="departureCityWeather" align="left">(天气信息)</TD>
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>到达 :</STRONG>
									</TD>
									<TD colSpan="2">
										<SPAN>
										
										<xsl:choose>
										<xsl:when test = "ARRTIME != ''">
											<xsl:value-of select="user:GetTime(ARRTIME)"/>
										</xsl:when>
										<xsl:otherwise>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
										</xsl:otherwise>
										</xsl:choose>
										
										</SPAN> (当地时间)   <SPAN>
											<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										</SPAN>
										<SPAN>
											<xsl:value-of select="DEST"/>
										</SPAN>
										<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
										<SPAN>
											<xsl:value-of select="DEST_TERMINAL"/>
										</SPAN>
									</TD>
									<TD id="arrivalCityWeather" align="left">(天气信息)</TD>
								</TR>
								<TR>
									<!--<TD align="middle">
										<STRONG>飞行 :</STRONG>
									</TD>
									<TD>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
									</TD>-->
						
								</TR>
								<TR>
									<TD align="middle">
										<STRONG>行李 :</STRONG>
									</TD>
									<TD>
										<SPAN>
											<xsl:value-of select="BAGGAGE"/>
										</SPAN>
									</TD>
									<TD align="middle">
										<STRONG>餐食 :</STRONG>
									</TD>
									<TD>
										<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
									</TD>
									<TD align="middle"/>
									<TD/>
								</TR>
							</TBODY>
						</TABLE>
					</DIV>
				</xsl:for-each>
			</xsl:if>
		</xsl:for-each>

		<!--票价信息-->
		<br/>
		<br/>
		<BR/>
		<PRE>
			<FONT style="FONT-SIZE: 12pt">以上机票的价格为：<SPAN>
					<xsl:value-of select="/Response/ITINERARY/FARES/FARE/TOTALFARE/CURRENCY"/>
				</SPAN>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
				<SPAN>
					<xsl:value-of select="/Response/ITINERARY/FARES/FARE/TOTALFARE/AMOUNT"/>
				</SPAN>(含税)</FONT>
		</PRE>
		<BR/>
		<DIV>
			<STRONG>限制条件：</STRONG>
			<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			<SPAN>
				<xsl:value-of select="/Response/ITINERARY/TICKETS/TICKETINFO/ER"/>
			</SPAN>
		</DIV>
		<BR/>
		<DIV>
		<xsl:if test = "normalize-space(/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE) = ''">
			<BR/>
			<STRONG>出票时限：</STRONG>
			<SPAN>
			<xsl:if test = "/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE != ''">
				<!--<xsl:value-of select="user:GetDate(/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE,1,/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE)"/>-->
			</xsl:if>
			</SPAN>
			<BR/>
			<FONT style="FONT-SIZE: 12pt">
				<PRE>
					<STRONG>提醒您注意：</STRONG>
					<BR/>  您尚未出票，请核对姓名，行程日期时间。请在<SPAN>
					<xsl:if test = "/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE != ''">
						<!--<xsl:value-of select="user:GetDate(/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE,2,/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE)"/>-->
					</xsl:if>
					</SPAN>之前出票！<BR/>  请注意出票时限，此价格在出票时限后会有变更。</PRE>
			</FONT>
		</xsl:if>
		</DIV>
		<BR/>
		<FONT style="FONT-SIZE: 12pt">
			<PRE>
				<STRONG>免责申明：</STRONG>
				<BR/>  该内容仅供参考不作为值机依据。如遇航班号、起飞时间、舱位、机型等行程信息发生变更，<br/>  请以航空公司实际公示信息为准，对此给乘机人造成的损失本公司不承担任何责任。</PRE>
		</FONT>
		<BR/>
		<DIV>
			<SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman">
				<B>须知：</B>
				<xsl:for-each select="/Response/ITINERARY/NOTICE/LINE">
					<LI>
						<xsl:value-of select="."/>
					</LI>
				</xsl:for-each>
				<BR/>
				<xsl:for-each select="/Response/ITINERARY/ADVERT/LINE">
					<BR/>
					<LI>
						<xsl:value-of select="."/>
					</LI>
				</xsl:for-each>
			</SPAN>
		</DIV>
		<br/>
		<br/>
		<xsl:if test = "/Response/ITINERARY/AGENTINFO/CONTACTINFO/PHONE != ''">
			<FONT style="FONT-SIZE: 12pt">
			  若您在旅行过程中有任何需要解决的问题，请随时拨打我们的24小时免费电话 <xsl:value-of select="/Response/ITINERARY/AGENTINFO/CONTACTINFO/PHONE"/>
				
			</FONT>
		</xsl:if>
		<BR/>
		<BR/>
		<BR/>
		<DIV align="center">
			<STRONG>祝您旅途愉快！</STRONG>

			<BR/>

		</DIV>                    
	</html>
</xsl:template>
</xsl:stylesheet>


