<?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]="(Sun)";
	weekday[1]="(Mon)";
	weekday[2]="(Tue)";
	weekday[3]="(Wed)";
	weekday[4]="(Thu)";
	weekday[5]="(Fri)";
	weekday[6]="(Sat)";
	strWeek = weekday[TickDate.getDay()];
	var strDate = strDepArrDay;
	strDate += strDepArrMonth;
	strDate += ",";
	strDate += TickDate.getFullYear();
	strDate += strWeek;
	if(flag == 2)
	{
		strDate = strDepArrDay;
		strDate += strDepArrMonth;
		strDate += ",";
		strDate += TickDate.getFullYear(); 
		return strDate;
	}
	return strDate;
   }
   function Segment(nodelist){
		strTemp = nodelist.nextNode().xml;
		if(strTemp.match("&lt;NORMAL>"))
			return "Normal segment";
		else if(strTemp.match("&lt;OPEN>"))
			return "OPEN segment";
		else if(strTemp.match("&lt;ARNK>"))
			return "ARNK segment";
		else if(strTemp.match("&lt;INFO>"))
			return "INFO segment";

	}
	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 "-hr.-min.";
		}
		istart = strDepTemp.indexOf(">") + 1;
		iend = strDepTemp.lastIndexOf("&lt;/"); 
		strDepTemp = strDepTemp.substring(istart,iend);

		if(strArrTemp.indexOf("&lt;/") &lt;=0)
		{
			return "-hr.-min.";
		}
		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 += "hr.";
		strTime +=strMinte;
		strTime += "min.";
		return strTime;
	}
	function GetLeg(nodelist)
	{
		strTemp = nodelist.nextNode().xml;
		strOldTemp = strTemp;
		istart = strTemp.indexOf(">") + 1;
		iend = strTemp.indexOf("/") - 1;
		strTemp = strTemp.substring(istart,iend);
		if(strOldTemp.indexOf("--") > 0)
		{
			strTemp1 = strTemp.substring(0,3);
			strTemp2 = strTemp.substring(5);
			strTemp = strTemp1 + " (" + strTemp2 + ") ";
		}
		return strTemp;
	}
	function GetIdCard(nodelist)
	{
		strTemp = nodelist.nextNode().xml.toUpperCase();
		if(strTemp.match("NI"))
		{
			return "Identity Card";
		}
		if(strTemp.match("PP"))
		{
			return "Passport";
		}
		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 "Confirmed";
		}
		else
		{
			return "UnConfirmed";
		}
	}
	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>
		<div style="font-family: Arial;font-size: 12pt">
			<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/>
							
								<DIV style="DISPLAY: inline;font-family: Arial;font-size: 12pt">
									<BR/>Tel :<SPAN>
										<xsl:value-of select="/Response/ITINERARY/AGENTINFO/CONTACTINFO/PHONE"/>
									</SPAN>
									<BR/>Fax :<SPAN>
										<xsl:value-of select="/Response/ITINERARY/AGENTINFO/CONTACTINFO/FAX"/>
									</SPAN>
									<BR/>Agent :<SPAN>
										<xsl:value-of select="/Response/ITINERARY/AGENTINFO/NAME"/>
									</SPAN>
								</DIV>
						<br/>
						<br/>
						</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>
						<TD/>
					</TR>
				</TBODY>
			</TABLE>
			<BR/>
			<DIV align="center">
				<FONT style="FONT-WEIGHT: bold; FONT-SIZE: 16pt">
					<STRONG>Itinerary</STRONG>
				</FONT>
			</DIV>
			
				<div style="font-family: Arial;font-size: 12pt">Dear traveller,thank you for booking with us. 
				<br/>Please kindly find the flight schedule as well as other information:</div>
			<br/>
			<STRONG> Itinerary for </STRONG>:<SPAN>
			<xsl:if test = "/Response/ITINERARY/PASSENGERLIST/PASSENGER/NAME != ''">
				<xsl:value-of select="user:getName(/Response/ITINERARY/PASSENGERLIST/PASSENGER/NAME)"/>
			</xsl:if>
			</SPAN>
			<BR/>
			<BR/>
			<STRONG>Booking Reference </STRONG>: <SPAN>
				<xsl:value-of select="/Response/ITINERARY/PNRNO"/>
			</SPAN>
			<BR/>
			<BR/>
			<STRONG>PassengerInfo:</STRONG><p/>
			<br/>
			<DIV>
				<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="middle">
							<TD width="185px" height="22">
								<STRONG>Name</STRONG>
							</TD>
							<TD width="90px" height="22">
								<STRONG>Cert Type</STRONG>
							</TD>
							<TD width="150px" height="22">
								<STRONG>Cert No</STRONG>
							</TD>
							<TD width="150px" height="22">
								<STRONG>FQCard No</STRONG>
							</TD>
						</TR>
					</TBODY>
				</TABLE>
				<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>SegmentInfo: </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">Itinerary<SPAN>
									<xsl:value-of select="position()"/>
								</SPAN>
								<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
								<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>Date </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>Stopover </STRONG>
										</TD>
										<TD width="265px">
											<SPAN>
												<xsl:value-of select="../../STOPS"/>
											</SPAN>
										</TD>
									</TR> 
									<TR>
										<TD align="middle">
											<STRONG>Flight No. </STRONG>
										</TD>
										<TD>
											<FONT style="FONT-SIZE: 11pt">
												<SPAN>
													<xsl:value-of select="../../AIRLINE"/>
													<xsl:value-of select="../../FLIGHTNO"/>
												</SPAN>  -  <SPAN>
													<xsl:value-of select="/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDBY"/>
												</SPAN>
											</FONT>
										</TD>
										<TD align="middle">
											<STRONG>Status </STRONG>
										</TD>
										<TD>
											<SPAN>
											<xsl:if test = "/Response/ITINERARY/SEGMENTS/SEGMENT/NORMAL/SEATSTATUS != ''">
												<xsl:value-of select="user:GetStatus(/Response/ITINERARY/SEGMENTS/SEGMENT/NORMAL/SEATSTATUS)"/>
											</xsl:if>
											</SPAN>
										</TD>
										<!--<TD align="middle">
											<STRONG>Aerocraft </STRONG>
										</TD>
										<TD>
											<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
										</TD>-->
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Class </STRONG>
										</TD>
										<TD>
											<SPAN>
												<xsl:value-of select="../../CLASS"/>
											</SPAN>
											<SPAN/>
										</TD>
									
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Dep. </STRONG>
										</TD> 
										<TD colSpan="2">
											<SPAN>
											<xsl:if test = "DEPTIME != ''">
												<xsl:value-of select="user:GetTime(DEPTIME)"/>
											</xsl:if>
											</SPAN> (Local time)   <SPAN>
											<xsl:if test = "ORIGIN != ''">
												<xsl:value-of select="user:GetLeg(ORIGIN)"/>
											</xsl:if>
											</SPAN> 
											<SPAN>
												<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
											</SPAN>
											<SPAN>
												<xsl:value-of select="ORI_TERMINAL"/>
											</SPAN>
										</TD>
										<TD id="departureCityWeather" align="left">(Weather info)</TD>
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Arr. </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> (Local time)   <SPAN>
											<xsl:if test = "DEST != ''">
												<xsl:value-of select="user:GetLeg(DEST)"/>
											</xsl:if>
											</SPAN>
											<SPAN>
												<SPAN>
													<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
												</SPAN>
											</SPAN>
											<SPAN>
												<xsl:value-of select="DEST_TERMINAL"/>
											</SPAN>
										</TD>
										<TD id="arrivalCityWeather" align="left">(Weather info)</TD>
									</TR>
									<TR>
										<!--<TD align="middle">
											<STRONG>Duration </STRONG>
										</TD>
										<TD>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
										</TD>-->
							
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Baggage </STRONG>
										</TD>
										<TD>
											<SPAN>
												<xsl:value-of select="BAGGAGE"/>
											</SPAN>
										</TD>
										<TD align="middle">
											<STRONG>Meal </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>Date </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>Stopover </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>Flight No. </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>Status </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>Aerocraft </STRONG>
										</TD>
										<TD>
											<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
										</TD>-->
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Class </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>Dep. </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> (Local time)   <SPAN>
											<xsl:if test = "ORIGIN != ''">
												<xsl:value-of select="user:GetLeg(ORIGIN)"/>
											</xsl:if>
											</SPAN>
											<SPAN>
												<SPAN>
													<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
												</SPAN>
											</SPAN>
											<SPAN>
												<xsl:value-of select="ORI_TERMINAL"/>
											</SPAN>
										</TD>
										<TD id="departureCityWeather" align="left">(Weather info)</TD>
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Arr. </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> (Local time)   <SPAN>
											<xsl:if test = "DEST != ''">
												<xsl:value-of select="user:GetLeg(DEST)"/>
											</xsl:if>
											</SPAN>
											<SPAN>
												<SPAN>
													<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
												</SPAN>
											</SPAN>
											<SPAN>
												<xsl:value-of select="DEST_TERMINAL"/>
											</SPAN>
										</TD>
										<TD id="arrivalCityWeather" align="left">(Weather info)</TD>
									</TR>
									<TR>
										<!--<TD align="middle">
											<STRONG>Duration </STRONG>
										</TD>
										<TD>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
										</TD>-->
										
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Baggage :</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>Meal </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>Date </STRONG>
										</TD>
										<TD width="265px">
											<SPAN>
									
											</SPAN>
										</TD>
										<TD align="middle" width="84px">
											<STRONG>Stopover </STRONG>
										</TD>
										<TD width="265px">
											<SPAN>
											
											</SPAN>
										</TD>
									</TR> 
									<TR>
										<TD align="middle">
											<STRONG>Flight No. </STRONG>
										</TD>
										<TD>
											<SPAN>
												
											</SPAN>    <SPAN>
												
											</SPAN>
										</TD>
										<TD align="middle">
											<STRONG>Status </STRONG>
										</TD>
										<TD>
											<SPAN>
												
											</SPAN>
										</TD>
										<!--<TD align="middle">
											<STRONG>Aerocraft </STRONG>
										</TD>
										<TD>
											
										</TD>-->
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Class </STRONG>
										</TD>
										<TD>
											<SPAN>
												
											</SPAN>
											<SPAN/>
										</TD>
										
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Dep. </STRONG>
										</TD>
										<TD colSpan="2">
											<SPAN>
										
											</SPAN>  (Local time)   <SPAN>
											<xsl:if test = "ORIGIN != ''">
												<xsl:value-of select="user:GetLeg(ORIGIN)"/>
											</xsl:if>
											</SPAN>
											<SPAN>
												<SPAN>
													<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
												</SPAN>
											</SPAN>
											<SPAN>
											
											</SPAN>
										</TD>
										<TD id="departureCityWeather" align="left">(Weather info)</TD>
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Arr. </STRONG>
										</TD>
										<TD colSpan="2">
											<SPAN>
											
											</SPAN>  (Local time)   <SPAN>
											<xsl:if test = "DEST != ''">
												<xsl:value-of select="user:GetLeg(DEST)"/>
											</xsl:if>
											</SPAN>
											<SPAN>
												<SPAN>
													<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
												</SPAN>
											</SPAN>
											<SPAN>
											
											</SPAN>
										</TD>
										<TD id="arrivalCityWeather" align="left">(Weather info)</TD>
									</TR>
									<TR>
										<!--<TD align="middle">
											<STRONG>Duration </STRONG>
										</TD>
										<TD>
											<SPAN>
											<xsl:if test = "DEPTIME != ''">
											
											</xsl:if>
											</SPAN>
										</TD>-->
										
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Baggage </STRONG>
										</TD>
										<TD>
											<SPAN>
											
											</SPAN>
										</TD>
										<TD align="middle">
											<STRONG>Meal </STRONG>
										</TD>
										<TD>
											
										</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>Date </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>Stopover </STRONG>
										</TD>
										<TD width="265px">
											<SPAN>
												<xsl:value-of select="../../STOPS"/>
											</SPAN>
										</TD>
									</TR> 
									<TR>
										<TD align="middle">
											<STRONG>Flight No. </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>Status </STRONG>
										</TD>
										<TD>
											<SPAN>
											<xsl:if test = "/Response/ITINERARY/SEGMENTS/SEGMENT/INFO/SEATSTATUS != ''">
												<xsl:value-of select="user:GetStatus(/Response/ITINERARY/SEGMENTS/SEGMENT/INFO/SEATSTATUS)"/>
											</xsl:if>
											</SPAN>
										</TD>
										<!--<TD align="middle">
											<STRONG>Aerocraft </STRONG>
										</TD>
										<TD>
											<SPAN><xsl:value-of select="user:setGlobalStr()"/></SPAN>
										</TD>-->
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Class </STRONG>
										</TD>
										<TD>
											<SPAN>
												<xsl:value-of select="../../CLASS"/>
											</SPAN>
											<SPAN/>
										</TD>
							
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Dep. </STRONG>
										</TD>
										<TD colSpan="2">
											<SPAN>
											<xsl:if test = "DEPTIME != ''">
												<xsl:value-of select="user:GetTime(DEPTIME)"/>
											</xsl:if>
											</SPAN> (Local time)   <SPAN>
											<xsl:if test = "ORIGIN != ''">
												<xsl:value-of select="user:GetLeg(ORIGIN)"/>
											</xsl:if>
											</SPAN>
											<SPAN>
												<SPAN>
													<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
												</SPAN>
											</SPAN>
											<SPAN>
												<xsl:value-of select="ORI_TERMINAL"/>
											</SPAN>
										</TD>
										<TD id="departureCityWeather" align="left">(Weather info)</TD>
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Arr. </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> (Local time)   <SPAN>
											<xsl:if test = "DEST != ''">
												<xsl:value-of select="user:GetLeg(DEST)"/>
											</xsl:if>
											</SPAN>
											<SPAN>
												<SPAN>
													<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
												</SPAN>
											</SPAN>
											<SPAN>
												<xsl:value-of select="DEST_TERMINAL"/>
											</SPAN>
										</TD>
										<TD id="arrivalCityWeather" align="left">(Weather info)</TD>
									</TR>
									<TR>
										<!--<TD align="middle">
											<STRONG>Duration </STRONG>
										</TD>
										<TD>
										<SPAN>
										<xsl:value-of select="user:setGlobalStr()"/>
										</SPAN>
										</TD>-->
										
									</TR>
									<TR>
										<TD align="middle">
											<STRONG>Baggage :</STRONG>
										</TD>
										<TD>
											<SPAN>
												<xsl:value-of select="BAGGAGE"/>
											</SPAN>
										</TD>
										<TD align="middle">
											<STRONG>Meal </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/>
			<DIV style="font-family: Arial;font-size: 12pt">
				<STRONG>Air Fare :</STRONG>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
				<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>(Include tax)
			</DIV>
			<BR/>
			<DIV>
				<STRONG>EI: </STRONG>
				<SPAN>
					<xsl:value-of select="/Response/ITINERARY/TICKETS/TICKETINFO/ER"/>
				</SPAN>
			</DIV>
			<BR/>
			<xsl:if test = "normalize-space(/Response/ITINERARY/TICKETS/TICKETINFO/ISSUEDDATE) = ''">
			<DIV>
				<BR/>
				<STRONG>Ticketing Deadline :</STRONG>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
				<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/>
				<BR/>
				<BR/>
			</DIV>
			<DIV style="font-family: Arial;font-size: 12pt">
				<STRONG>Note :</STRONG>
			</DIV>
			<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
			<SPAN>Your ticket has not been issued yet.  Please verify your name, itinerary date and time,and complete the<BR/>  payment process to issue your ticket before <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>. There is a time limit for the issuance of your ticket,<BR/>  and the fare is subject to change after this time limit passes.<BR/>
			</SPAN>
			</xsl:if>
			<BR/>
			<BR/>
			
			<DIV style="font-family: Arial;font-size: 12pt">
				<STRONG>Liability Disclaimer:</STRONG>
			</DIV>
			<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>This content will only serve as a reference. In case of flight information change,the ontice of airlines<BR/> shall prevail. We are not reaponsibility to the loss of passengers occur with flight information change.<BR/>   
			<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>(The above contents may be translated into other languages,but the Chinese version shall always prevail)
			<BR/>
			<BR/>   
			<BR/>
			<DIV>
				<DIV style="font-family: Arial;font-size: 12pt">
					<B>Noticeㄩ</B>
				<xsl:for-each select="/Response/ITINERARY/NOTICE/LINE">
					<LI>
						<xsl:value-of select="."/>
					</LI>
				</xsl:for-each>
				</DIV>
				<BR/>
				<xsl:for-each select="/Response/ITINERARY/ADVERT/LINE">
					<BR/>
					<LI>
						<xsl:value-of select="."/>
					</LI>
				</xsl:for-each>
			</DIV>
			<BR/>
			<br/>
			<xsl:if test = "/Response/ITINERARY/AGENTINFO/CONTACTINFO/PHONE != ''">
				<FONT style="FONT-SIZE: 12pt">
					  Should you have any further information, please feel free to contact us at <xsl:value-of select="/Response/ITINERARY/AGENTINFO/CONTACTINFO/PHONE"/>
				
				</FONT>
			</xsl:if>
			<BR/>
			<BR/>
			<DIV align="center">
					<STRONG>Have a nice trip!</STRONG>
			</DIV>
			<BR/>

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