
document.writeln('<table border="0" width="940" height="170" cellspacing="0" cellpadding=0 style ="padding-left: 0px;">');
document.writeln('<tr><td height="170" width="400" valign="top" align="left" style ="padding-top: 1px;padding-left: 0px;">');
document.write ('<style>.focusPic {OVERFLOW: hidden; WIDTH: 480px; POSITION: relative; HEIGHT: 172px}');
document.write ('.focusPicNum {Z-INDEX: 99; right: 0px; POSITION: absolute; TOP: 150px;MARGIN: 3px}</style>');
function IsNav()
{
return ( navigator.appName=="Netscape" ); 
}
function IsIE()
{
return ( navigator.appName=="Microsoft Internet Explorer" ); 
}
var imgUrl=new Array();
var imgLink=new Array();
//第1幅图
imgUrl[1]="/images/AD/071031-505x180.jpg"; 
imgLink[1]="http://www.baidu2.cn/index.htm";
//第2幅图
imgUrl[2]="/images/AD/3000point.jpg"; 
imgLink[2]="http://www.baidu2.cn/index.htm";
//第3幅图
imgUrl[3]="/images/AD/071031-505x180.jpg"; 
imgLink[3]="http://www.baidu2.cn/index.htm";
//第4幅图
imgUrl[4]="/images/AD/20070531_jiudian_top.gif"; 
imgLink[4]="http://www.baidu2.cn/index.htm";
imgUrl[5]="/images/AD/071130-505x180.jpg"; 
imgLink[5]="http://www.baidu2.cn/index.htm";
var num_pic=5 //图片数不超过4个
var focusPicNumSrc="http://icons.elong.com/banner/cn/images/index_0601/"
var time1 = 0; 
var time2 = 8;
var timeout1 = time1*1000;
var timeout2 = time2*1000;
var nn;
nn=1;
var curFileNum = 1;
setTimeout('change_img()',timeout1);
function change_img(){
if(nn>num_pic) nn=1;
setTimeout('setFocus2('+nn+')',timeout1);
nn++;
tt=setTimeout('change_img()',timeout2);
}
function setFocus2(i){
curFileNum = i;
selectLayer1(i);
if(IsIE())
{
document.images.imgInit.filters.revealTrans.Transition=6;
document.images.imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[i];
}
function setFocus1(i){
nn = i;
ln=i;
curFileNum = i;
selectLayer1(i);
setFocus2(i);
}
function selectLayer1(i){
for (a=1;a<num_pic+1;a++ )
{
document.images['fi_'+a].src=focusPicNumSrc+'num_0'+a+'off.gif';
}
document.images['fi_'+i].src=focusPicNumSrc+'num_0'+i+'on.gif';
}
function goUrl(){
ln=nn;
if (ln ==1)
{
jumpUrl=imgLink[ln];
}else
{
jumpUrl=imgLink[ln-1];
}
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '') 
window.open(jumpUrl,jumpTarget);
else
location.href=jumpUrl;
}
}
function playTran(){
if (document.all)
document.images.imgInit.filters.revealTrans.play();
}
function GetObj(objName){ 
if(document.getElementById){ 
return eval('document.getElementById("' + objName + '")'); 
}else if(document.layers){ 
return eval("document.layers['" + objName +"']"); 
}else{ 
return eval('document.all.' + objName); 
} 
} 
document.write ('<DIV class=focusPic id=focusPic>');
document.write('<DIV class=focusPicNum>');
for (i=1;i<num_pic+1;i++ )
{
document.write('<A href=javascript:setFocus1('+i+');><IMG height=13 src='+focusPicNumSrc+'/num_0'+i+'off.gif width=21 hspace=2 border=0 name=fi_'+i+'></A>');
}
document.write('</DIV>');
document.write('<a id=PicLink href="javascript:goUrl()"><img src="'+imgUrl[1]+'" width=500 name=imgInit height="172" border="0" style="FILTER: revealTrans(duration=2,transition=6)"></a>');
document.images.imgInit.src=imgUrl[1];
document.writeln('</td>');
document.writeln('<td height="170" width="230" valign="top" align="left">');
document.writeln('<div style="border-left:1px #368AB9 solid;border-right:1px #368AB9 solid;border-bottom:1px #368AB9 solid;border-top:1px #FFFFFF solid;PADDING-TOP: 1px;background:#368AB9;">');
var eLong_Affiliate_MemberID = 4210281;
var eLong_Hotel_City_Default = '北京';
var eLong_Hotel_City_Disable = '';
var eLong_Width = 250;
var eLong_Height = 169;
var eLong_Hotel_Price = 'true';
var eLong_Hotel_Star = 'true';
var eLong_Hotel_Date = 'true';
var eLong_Hotel_HotCity = 'true';
var eLong_Hotel_Target = '_blank';
var strFormat = "^[0-9]{1,}$";
var reg = new RegExp(strFormat);
if(!reg.test(eLong_Width))
{
eLong_Width = "";
}
if(!reg.test(eLong_Height))
{
eLong_Height = "";
}
if(eLong_Width == "")
{
eLong_Width = 200;
}
if(eLong_Width < 200)
{
eLong_Width = 200;
}
var arrHotelCity = new Array(
new Array( "0101", "北京", "" ),
new Array( "0201", "上海", "" ),
new Array( "0301", "天津", "" ),
new Array( "0401", "重庆", "" ),
new Array( "1301", "安徽", "A" ),
new Array( "1301", "合肥", "" ),
new Array( "1302", "黄山", "" ),
new Array( "1304", "芜湖", "" ),
new Array( "1305", "蚌埠", "" ),
new Array( "1306", "淮南", "" ),
new Array( "3301", "澳门", "A" ),
new Array( "1401", "福建", "F" ),
new Array( "1401", "厦门", "" ),
new Array( "1402", "福州", "" ),
new Array( "1403", "泉州", "" ),
new Array( "1404", "武夷山", "" ),
new Array( "1406", "莆田", "" ),
new Array( "1408", "漳州", "" ),
new Array( "1409", "龙岩", "" ),
new Array( "2801", "甘肃", "G" ),
new Array( "2801", "兰州", "" ),
new Array( "2803", "敦煌", "" ),
new Array( "2001", "广东", "G" ),
new Array( "2001", "广州", "" ),
new Array( "2002", "汕头", "" ),
new Array( "2003", "深圳", "" ),
new Array( "2004", "珠海", "" ),
new Array( "2005", "佛山", "" ),
new Array( "2007", "东莞", "" ),
new Array( "2008", "澄海", "" ),
new Array( "2009", "茂名", "" ),
new Array( "2010", "惠州", "" ),
new Array( "2011", "中山", "" ),
new Array( "2012", "顺德", "" ),
new Array( "2013", "肇庆", "" ),
new Array( "2014", "湛江", "" ),
new Array( "2015", "番禺", "" ),
new Array( "2016", "潮州", "" ),
new Array( "2017", "南海", "" ),
new Array( "2018", "增城", "" ),
new Array( "2019", "花都", "" ),
new Array( "2101", "广西", "G" ),
new Array( "2101", "桂林", "" ),
new Array( "2102", "南宁", "" ),
new Array( "2103", "北海", "" ),
new Array( "2104", "玉林", "" ),
new Array( "2401", "贵州", "G" ),
new Array( "2401", "贵阳", "" ),
new Array( "2201", "海南", "H" ),
new Array( "2201", "三亚", "" ),
new Array( "2202", "海口", "" ),
new Array( "2204", "博鳌", "" ),
new Array( "0501", "河北", "H" ),
new Array( "0501", "石家庄", "" ),
new Array( "0502", "承德", "" ),
new Array( "0503", "秦皇岛", "" ),
new Array( "0505", "邢台", "" ),
new Array( "0506", "唐山", "" ),
new Array( "0512", "保定", "" ),
new Array( "0514", "衡水", "" ),
new Array( "1001", "黑龙江", "H" ),
new Array( "1001", "哈尔滨", "" ),
new Array( "1002", "牡丹江", "" ),
new Array( "1004", "大庆", "" ),
new Array( "1005", "齐齐哈尔", "" ),
new Array( "1701", "河南", "H" ),
new Array( "1701", "郑州", "" ),
new Array( "1702", "洛阳", "" ),
new Array( "1703", "开封", "" ),
new Array( "1704", "新乡", "" ),
new Array( "1801", "湖北", "H" ),
new Array( "1801", "武汉", "" ),
new Array( "1803", "宜昌", "" ),
new Array( "1804", "襄樊", "" ),
new Array( "1807", "十堰", "" ),
new Array( "1808", "武穴", "" ),
new Array( "1901", "湖南", "H" ),
new Array( "1901", "长沙", "" ),
new Array( "1902", "株州", "" ),
new Array( "1903", "张家界", "" ),
new Array( "1904", "岳阳", "" ),
new Array( "1101", "江苏", "J" ),
new Array( "1101", "南京", "" ),
new Array( "1102", "苏州", "" ),
new Array( "1103", "常州", "" ),
new Array( "1104", "扬州", "" ),
new Array( "1105", "无锡", "" ),
new Array( "1106", "徐州", "" ),
new Array( "1107", "南通", "" ),
new Array( "1108", "镇江", "" ),
new Array( "1110", "连云港", "" ),
new Array( "1111", "张家港", "" ),
new Array( "1113", "江阴", "" ),
new Array( "1501", "江西", "J" ),
new Array( "1501", "南昌", "" ),
new Array( "1502", "九江", "" ),
new Array( "0901", "吉林", "J" ),
new Array( "0901", "长春", "" ),
new Array( "0902", "吉林", "" ),
new Array( "0801", "辽宁", "L" ),
new Array( "0801", "大连", "" ),
new Array( "0802", "沈阳", "" ),
new Array( "0803", "鞍山", "" ),
new Array( "0806", "丹东", "" ),
new Array( "0809", "盘锦", "" ),
new Array( "0701", "内蒙古", "N" ),
new Array( "0701", "呼和浩特", "" ),
new Array( "0702", "包头", "" ),
new Array( "2901", "宁夏", "N" ),
new Array( "2901", "银川", "" ),
new Array( "3001", "青海", "Q" ),
new Array( "1601", "山东", "S" ),
new Array( "1601", "青岛", "" ),
new Array( "1602", "济南", "" ),
new Array( "1603", "潍坊", "" ),
new Array( "1604", "烟台", "" ),
new Array( "1605", "威海", "" ),
new Array( "1606", "淄博", "" ),
new Array( "1611", "临沂", "" ),
new Array( "1613", "蓬莱", "" ),
new Array( "1614", "泰安", "" ),
new Array( "0601", "山西", "S" ),
new Array( "0601", "太原市", "" ),
new Array( "0602", "大同", "" ),
new Array( "2701", "陕西", "S" ),
new Array( "2701", "西安", "" ),
new Array( "2702", "宝鸡", "" ),
new Array( "2301", "四川", "S" ),
new Array( "2301", "成都", "" ),
new Array( "2302", "绵阳", "" ),
new Array( "2303", "乐山", "" ),
new Array( "2305", "自贡", "" ),
new Array( "2306", "雅安", "" ),
new Array( "2307", "都江堰", "" ),
new Array( "2308", "宜宾", "" ),
new Array( "2309", "南充", "" ),
new Array( "2310", "峨眉山", "" ),
new Array( "2311", "九寨沟", "" ),
new Array( "2312", "德阳", "" ),
new Array( "3401", "台湾", "T" ),
new Array( "3201", "香港", "X" ),
new Array( "3101", "新疆", "X" ),
new Array( "3101", "乌鲁木齐", "" ),
new Array( "3102", "克拉玛依", "" ),
new Array( "3103", "伊犁", "" ),
new Array( "2601", "西藏", "X" ),
new Array( "2601", "拉萨", "" ),
new Array( "2501", "云南", "Y" ),
new Array( "2501", "昆明", "" ),
new Array( "2503", "丽江县", "" ),
new Array( "2505", "大理", "" ),
new Array( "1201", "浙江", "Z" ),
new Array( "1201", "杭州", "" ),
new Array( "1202", "宁波", "" ),
new Array( "1203", "温州", "" ),
new Array( "1204", "金华", "" ),
new Array( "1205", "绍兴", "" ),
new Array( "1206", "永康", "" ),
new Array( "1207", "义乌", "" ),
new Array( "1209", "嘉兴", "" ),
new Array( "1212", "诸暨", "" ),
new Array( "1224", "台州", "" ),
new Array( "1226", "临海", "" ),
new Array( "1230", "丽水", "" ),
new Array( "1231", "慈溪", "" ),
new Array( "1232", "普陀山", "" ),
new Array( "1233", "千岛湖", "" ),
new Array( "1234", "海宁", "" ),
new Array( "1235", "衢州", "" ),
new Array( "1236", "嵊州", "" ),
new Array( "1237", "瑞安", "" )
);
var arrHotelCityRcmmd = new Array(
new Array( "0101", "北京" ),
new Array( "0201", "上海" ),
new Array( "2001", "广州" ),
new Array( "2003", "深圳" ),
new Array( "1201", "杭州" ),
new Array( "1101", "南京" ),
new Array( "2301", "成都" ),
new Array( "1801", "武汉" ),
new Array( "1601", "青岛" ),
new Array( "0801", "大连" ),
new Array( "0401", "重庆" ),
new Array( "0301", "天津" ),
new Array( "1102", "苏州" ),
new Array( "1202", "宁波" ),
new Array( "2701", "西安" ),
new Array( "1001", "哈尔滨" ),
new Array( "2201", "三亚" ),
new Array( "2501", "昆明" ),
new Array( "0802", "沈阳" ),
new Array( "3201", "香港" )
);
var isCityExist;
var strOptnText;
if (typeof(eLong_Hotel_City_Disable) == "undefined")
{
var eLong_Hotel_City_Disable = "";
}
if (typeof(eLong_Hotel_City_Default) == "undefined")
{
var eLong_Hotel_City_Default = "北京";
}
else if (eLong_Hotel_City_Default == null || eLong_Hotel_City_Default == "")
{
eLong_Hotel_City_Default = "北京";
}
else if (eLong_Hotel_City_Default != "北京")
{
isCityExist = false;
for (i = 0; i < arrHotelCity.length; i ++)
{ 
if (eLong_Hotel_City_Default == arrHotelCity[i][1])
{
isCityExist = true;
break;
}
}
if (!isCityExist)
{
eLong_Hotel_City_Default = "北京";
}
}
//有效性检查
var theDate=new Date()
var theTime=theDate.getFullYear()+"-"+(theDate.getMonth()+1)+"-"+theDate.getDate();
function CheckName(Name) {
var ErrStr;
var ErrChar;
var ArryErrStr;
ErrChar="!@#$%^&*()_+|-=\\~`;'[]{}\"':;,./<>?～！@#￥％^&×（）……＋|－＝、〔〕｛｝：“；‘《》？，。、0123456789";
ErrStr="虚拟,傻冒,先生,小姐,代订";
ArryErrStr = ErrStr.split(",");
//是否含有非法字符
for(var k=0;k<Name.length;k++){
if(ErrChar.indexOf(Name.charAt(k))>-1){
return false;
}
}
//是否含有非法字符串
for (k=0; k<ArryErrStr.length; k++){
if (Name.indexOf(ArryErrStr[k])>-1){
return false;
}
}
return true;
}
//时间检查
function isDateString(str) {
var reg=/^\d{4}-[0-1]?\d{1}-[0-3]?\d{1}$/;
return reg.test(str);
}
function IsDate(DateString , Dilimeter) 
{ 
if (DateString==null) return false; 
if (Dilimeter=='' || Dilimeter==null) 
Dilimeter = '-'; 
var tempy=''; 
var tempm=''; 
var tempd=''; 
var tempArray; 
if (!isDateString(DateString))
return false;
if ( DateString.length<8 || DateString.length>10) 
return false; 
tempArray = DateString.split(Dilimeter); 
if (tempArray.length!=3) 
return false; 
if (tempArray[0].length==4) 
{ 
tempy = tempArray[0]; 
tempd = tempArray[2]; 
} 
else 
{ 
tempy = tempArray[2]; 
tempd = tempArray[1]; 
} 
tempm = tempArray[1]; 
var tDateString = tempy + '/'+tempm + '/'+tempd+' 8:0:0';//加八小时是因为我们处于东八区 
var tempDate = new Date(tDateString); 
if (isNaN(tempDate)) 
return false; 
if (((tempDate.getUTCFullYear()).toString()==tempy) && (tempDate.getMonth()==parseInt(tempm)-1) && (tempDate.getDate()==parseInt(tempd))) 
{ 
return true; 
} 
else 
{ 
return false; 
} 
} 
function CheckDate(strDate1,strDate2) {
return(stringToDate(strDate1, true)<=stringToDate(strDate2, true))
}
function CheckDate1(strDate1,strDate2) {
return(stringToDate(strDate1, true)<stringToDate(strDate2, true))
}
function stringToDate(sDate, bIgnore)
{ var bValidDate, year, month, day
var iaDate = new Array(3)
if (bIgnore) bValidDate = true
else bValidDate = isDateString(sDate)
if (bValidDate)
{ iaDate = sDate.toString().split("-")
year = parseFloat(iaDate[0])
month = parseFloat(iaDate[1]) - 1
day=parseFloat(iaDate[2])
return (new Date(year,month,day))
}
else return (new Date(1900,1,1))
}
function compareDate(strDate1,strDate2) {
var tmp1=strDate1.split('-');
var tmp2=strDate2.split('-');
var date1=eval('new Date('+tmp1[0]+','+tmp1[1]+','+tmp1[2]+')');
var date2=eval('new Date('+tmp2[0]+','+tmp2[1]+','+tmp2[2]+')');
if ((date2.valueOf()-date1.valueOf())>=20*24*60*60*1000)
{
return true;
}
else
{
return false;
}
}
function compareDate1(strDate1,strDate2) {
var tmp1=strDate1.split('-');
var tmp2=strDate2.split('-');
var date1=eval('new Date('+tmp1[0]+','+tmp1[1]+','+tmp1[2]+')');
var date2=eval('new Date('+tmp2[0]+','+tmp2[1]+','+tmp2[2]+')');
if ((date2.valueOf()-date1.valueOf())>=60*24*60*60*1000)
{
return true;
}
else
{
return false;
}
}
function chkHotelForm(objForm)
{
if (! isDateString(objForm.CheckInDate.value)) {
alert('日期格式不正确，请重新填写！(如：yyyy-mm-dd)');
objForm.CheckInDate.focus();
return false;
}
if (! isDateString(objForm.CheckOutDate.value)) {
alert('日期格式不正确，请重新填写！(如：yyyy-mm-dd)');
objForm.CheckOutDate.focus();
return false;
}
if (! IsDate(objForm.CheckInDate.value)) {
alert('无效的日期，请重新填写！');
objForm.CheckInDate.focus();
return false;
}
if (! IsDate(objForm.CheckOutDate.value)) {
alert('无效的日期，请重新填写！');
objForm.CheckOutDate.focus();
return false;
}
if (! CheckDate(theTime,objForm.CheckInDate.value)) {
alert('入住日期不能小于当前日期！');
objForm.CheckInDate.focus();
return false;
}
if (! CheckDate(theTime,objForm.CheckOutDate.value)) {
alert('离店日期不能小于当前日期！');
objForm.CheckOutDate.focus();
return false;
} 
if (! CheckDate1(objForm.CheckInDate.value,objForm.CheckOutDate.value)) {
alert('离店日期必须大于入住日期！');
objForm.CheckInDate.focus();
return false;
}
if (compareDate(objForm.CheckInDate.value,objForm.CheckOutDate.value))
{
alert('如果您需要在酒店入住20天以上，请和艺龙酒店预订中心联系：8008101010或01064329999，我们会竭诚为您服务。');
objForm.CheckInDate.focus();
return false;
}
if (compareDate1(theTime,objForm.CheckInDate.value))
{
alert('如果您需要预定晚于或等于'+objForm.CheckInDate.value+'号的酒店，请您致电艺龙预订中心010-64329999、8008101010，我们会竭诚为您服务');
objForm.CheckInDate.focus();
return false;
}
return true;
}
function compareFlyDate(strDate1,strDate2) {
var tmp1=strDate1.split('-');
var tmp2=strDate2.split('-');
var date1=eval('new Date('+tmp1[0]+','+tmp1[1]+','+tmp1[2]+')');
var date2=eval('new Date('+tmp2[0]+','+tmp2[1]+','+tmp2[2]+')');
if ((date2.valueOf()-date1.valueOf())>=0)
{
return true;
}
else
{
return false;
}
}
var strHtml = '';
strHtml +='<link rel="stylesheet" href="http://travel.elong.com/AP/affiliate/profile/images/ap.css" type="text/css">';
strHtml += '<img src="http://travel.elong.com/hotels/search.aspx-campaign_id=4210281&Ad_Category=3&Ad_BizScope=1" height=0 width=0>';
strHtml +='<table width="' + eLong_Width + '" height="' + eLong_Height + '" border="0" cellspacing="0" cellpadding="3">';
strHtml +='<form id="ya" name="ya" action="http://travel.elong.com/hotels/search.aspx" method="post"';
if(eLong_Hotel_Date == "true")
{
strHtml +=' onSubmit="return chkHotelForm(this)"';
}
strHtml +=' target="' + eLong_Hotel_Target + '">';
strHtml +=' <tr bgcolor="#368AB9">';
strHtml +=' <td colspan="3" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
strHtml +=' <tr >';
strHtml +=' <td style="font-size:12px;"><b><font style="color:#FFFFFF;font-size:12px;">全国酒店</font><font color="#FF0000">2-7</font><font color="#FFFFFF">折入住</font></b></td>';
strHtml +=' </tr>';
strHtml +=' </table></td>';
strHtml +=' </tr>';
strHtml +=' <tr bgcolor="#EFF9FF" >';
strHtml +=' <td width="20%" style="font-size:12px;" align=center>城市</td>';
strHtml +=' <td colspan=2 width=80% >';
strHtml +='<select name="cityid" style="width:100%;height:16px;font-size:12px;" >';
for (i = 0; i < arrHotelCity.length; i ++)
{
if (eLong_Hotel_City_Disable == "" || eLong_Hotel_City_Disable.indexOf(arrHotelCity[i][1]) < 0 || arrHotelCity[i][0] == "0901")
{ 
if ( arrHotelCity[i][2].length > 0 ){
strOptnText = arrHotelCity[i][2] + "－" + arrHotelCity[i][1];
}
else
{
strOptnText = "&nbsp;" + arrHotelCity[i][1];
}
if (eLong_Hotel_City_Default == arrHotelCity[i][1] && arrHotelCity[i][0] != "0901")
{
strHtml +=' <option value="' + arrHotelCity[i][0] + '" selected>' + strOptnText + '</option>';
}
else
{
strHtml +=' <option value="' + arrHotelCity[i][0] + '">' + strOptnText + '</option>';
}
}
}
strHtml +='</select>';
strHtml +='<input type="hidden" value="0" name="srh_type">';
strHtml +='<input type="hidden" name="campaign_id" value="'+eLong_Affiliate_MemberID+'">';
strHtml += '<input type="hidden" name="Ad_Category" value="3">';
strHtml += '<input type="hidden" name="Ad_BizScope" value="1">';
strHtml +=' </td>';
//strHtml +=' <td width="24">&nbsp;</td>';
strHtml +=' </tr>';
if(eLong_Hotel_Price == "true")
{
strHtml +=' <tr bgcolor="#EFF9FF">';
strHtml +=' <td style="font-size:12px;" align=center>价格</td>';
strHtml +=' <td colspan=2><select name="price" style="width:100%" >';
strHtml +='<option value="-1" selected>不限</option>';
strHtml +='<option value="1201">1200元以上</option>';
strHtml +='<option value="1200">801-1200元</option>';
strHtml +='<option value="800">501-800元</option>';
strHtml +='<option value="500">401-500元</option>';
strHtml +='<option value="400">301-400元</option>';
strHtml +='<option value="300">201-300元</option>';
strHtml +='<option value="200">200元以下</option>';
strHtml +=' </select></td>';
//strHtml +=' <td>&nbsp;</td>';
strHtml +=' </tr>';
}
strHtml +=' <tr bgcolor="#EFF9FF">';
if(eLong_Hotel_Star == "true")
{
strHtml +=' <td style="font-size:12px;" align=center>星级</td>';
strHtml +=' <td width=60% colspan=2>';
strHtml +=' <select name="Star" style="width:100%" >';
strHtml +='<option value="-1" selected>不限</option>';
strHtml +='<option value="5">5星级</option>';
strHtml +='<option value="4">4星级</option>';
strHtml +='<option value="3">3星级</option>';
strHtml +='<option value="2">2星级</option>';
strHtml +='<option value="1">1星级</option>';
strHtml +='<option value="0">经济型酒店</option>';
strHtml +='<option value="10">公寓式酒店</option>';
strHtml +='</select></td>';
//strHtml +='<td width="24px"><input type="submit" name="Submit" value="查询">';
strHtml +=' </td>';
}
else
{
//strHtml +='<td colspan=3><input type="submit" name="Submit" value="查询">';
//strHtml +=' </td>';
}
strHtml +=' </tr>';
if(eLong_Hotel_Date == "true")
{
strHtml +=' <tr bgcolor="#EFF9FF" border="0">';
strHtml +=' <td border="0" align=center><font style="font-size:12px;">日期</font></td>';
strHtml +=' <td width=80% nowrap >'
strHtml +='<input name="CheckInDate" type="text" id="arrive_date" size="9" style="width:47%" value="yyyy-mm-dd"> - ';
strHtml +='<input type="text" name="CheckOutDate" id="leave_date" style="width:47%;" size="9" value="yyyy-mm-dd"></td>';
strHtml +='<td><input type="submit" name="Submit" value="查询"></td>';
strHtml +=' </tr>';}
else
{
strHtml +=' <tr bgcolor="#EFF9FF" border="0" align=left>';
strHtml +='<td colspan=3><input type="submit" name="Submit" value="查询"></a>';
strHtml +=' </tr>';
}
if(eLong_Hotel_HotCity == "true")
{
strHtml +=' <tr bgcolor="#EFF9FF"><td style="font-size:12px;" colspan=3>热点城市：';
var count = 0;
for (i = 0; i < arrHotelCityRcmmd.length; i ++)
{
if (eLong_Hotel_City_Disable == "" || eLong_Hotel_City_Disable.indexOf(arrHotelCityRcmmd[i][1]) < 0 )
{ 
strHtml +='<a href="http://travel.elong.com/AP/findhotel.asp?campaign_id='+eLong_Affiliate_MemberID+'&city_id=' +arrHotelCityRcmmd[i][0]+ '" target="_blank" class="ctlnks">' + arrHotelCityRcmmd[i][1] + '</a>&nbsp;';
count ++;
var no = eLong_Width/60;
if(eLong_Width == "")
{
no = 4
}
if (count >= no)
{
break;
}
else if (count == 4)
{
//strHtml +=' <br>';
}
}
}
strHtml +='<a href="travel.elong.com/AP/city_list.asp-campaign_id='+eLong_Affiliate_MemberID+'" target="_blank"><font color="#000000" style="text-decoration:none">...</font></a> ';
strHtml +=' </td></tr>';
}
strHtml +=' </form>';
strHtml += '<input type="hidden" id="hidMemberID" value="4210281">';
strHtml +='</table>';
//取当天日期
if(eLong_Hotel_Date == "true")
{
strHtml += '<script language="JavaScript">';
strHtml += 'var arriveDate = new Date()\;';
strHtml += 'var leaveDate = new Date()\;';
strHtml += 'leaveDate.setDate(leaveDate.getDate() + 2)\;';
strHtml += 'var theArriveTime=arriveDate.getFullYear()+"-"+(arriveDate.getMonth()+1)+"-"+arriveDate.getDate()\;';
strHtml += 'var theLearveTime=leaveDate.getFullYear()+"-"+(leaveDate.getMonth()+1)+"-"+(leaveDate.getDate())\;';
strHtml += 'document.getElementById("arrive_date").value = theArriveTime\;';
strHtml += 'document.getElementById("leave_date").value = theLearveTime\;';
strHtml += '</script>';
}
document.writeln(strHtml);
document.writeln('</div>');
document.writeln('</td>');
document.writeln('<td height="170" width="240" valign="top" align="left">');
var eLong_Affiliate_MemberID = 4210281;
var eLong_Flight_City_Default = 'PEK';
var eLong_Flight_City_Disable = '';
var eLong_Width = 205;
var eLong_Height = 170;
var eLong_Hotel_Target = '_blank';
var strFormat = "^[0-9]{1,}$";
var reg = new RegExp(strFormat);
if(!reg.test(eLong_Width))
{
eLong_Width = "";
}
if(!reg.test(eLong_Height))
{
eLong_Height = "";
}
if(eLong_Width == null)
{
eLong_Width = 200;
}
else if(eLong_Width < 200)
{
eLong_Width = 200;
}
var arrFlightCity = new Array( 
new Array( "AKU", "阿克苏", "Akesu", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "AAT", "阿勒泰", "Ataile", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "AKA", "安康", "Ankang", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "AQG", "安庆", "Anqing", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "BSD", "保山", "Baoshan", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "BAV", "包头", "Baotou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "BHY", "北海", "Beihai", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "PEK", "北京", "Beijing", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CGQ", "长春", "Changch", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CSX", "长沙", "Changsha", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CIH", "长治", "Changzhi", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CGD", "常德", "Changde", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CZX", "常州", "Changzh", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CHG", "朝阳", "Chaoyang", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CTU", "成都", "Chengdu", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CIF", "赤峰", "Chifeng", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CKG", "重庆", "Chongq", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "DAX", "达县", "Daxian", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "DLU", "大理", "Dali", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "DLC", "大连", "Dalian", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "DDG", "丹东", "Dandong", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "DIG", "迪庆", "Diqing", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "DNH", "敦煌", "Dunh", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "ENH", "恩施", "Enshi", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "FOC", "福州", "Fuzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "KOW", "赣州", "Ganzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "GOQ", "格尔木", "Germu", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CAN", "广州", "Guangzh", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "KWL", "桂林", "Guilin", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "KWE", "贵阳", "Guiyang", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HRB", "哈尔滨", "Haerbin", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HAK", "海口", "Haikou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HLD", "海拉尔", "Hailaer", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HGH", "杭州", "Hangzhou", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HFE", "合肥", "Hefei", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HTN", "和田", "Hetian", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HEK", "黑河", "Heihe", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HET", "呼和浩特", "Huheht", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "TXN", "黄山", "Huangsh", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HYN", "黄岩", "Huangyan", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JIL", "吉林", "Jilin", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "TNA", "济南", "Jinan", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JMU", "佳木斯", "Jiamusi", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JGN", "嘉峪关", "Jiayg", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JNZ", "锦州", "Jinzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JJN", "晋江", "Jinj", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JDZ", "景德镇", "Jingdzh", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JIU", "九江", "Jiujiang", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JZH", "九寨沟", "Jiuzhg", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "KHG", "喀什", "Keshi", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "KRY", "克拉玛依", "Kelmy", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "KCA", "库车", "Kuche", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "KMG", "昆明", "Kunming", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LXA", "拉萨", "Lasa", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LHW", "兰州", "Lanzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LJG", "丽江", "Lijiang", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LYG", "连云港", "Lianyg", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LYI", "临沂", "Linyi", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LZH", "柳州", "Liuzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LYA", "洛阳", "Luoyang", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LDG", "罗定", "Luoding", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LZO", "泸州", "Luzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "MIG", "绵阳", "Mianyang", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "LUM", "芒市", "Mangshi", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "MXZ", "梅县", "Meixian", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "MDG", "牡丹江", "Mudanj", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "KHN", "南昌", "Nanchang", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "NAO", "南充", "Nanchong", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "NKG", "南京", "Nanjing", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "NNG", "南宁", "Nanning", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "NTG", "南通", "Nantong", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "NNY", "南阳", "Nanyang", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "NGB", "宁波", "Ningbo", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "NDG", "齐齐哈尔", "Qiqihr", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "IQM", "且末", "Qiemo", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SHP", "秦皇岛", "Qinhd", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "TAO", "青岛", "Qingdao", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JUZ", "衢州", "Quzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SYX", "三亚", "Sanya", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SHS", "沙市", "Shashi", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SWA", "汕头", "Shantou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SHA", "上海", "ShangHai", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SHA1", "上海(虹桥)", "SH(SHA)", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "PVG", "上海(浦东)", "SH(PVG)", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SHE", "沈阳", "Shenyang", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SZX", "深圳", "Shenzhen", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SJW", "石家庄", "Shijiazh", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SYM", "思芋", "Siyu", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "SZV", "苏州", "Suzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "TCG", "塔城", "Tacheng", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "TYN", "太原", "Taiyuan", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "TSN", "天津", "Tianjin", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "TGO", "通辽", "Tongliao", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "WXN", "万州", "Wanzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "WEH", "威海", "Weihai", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "WEF", "潍坊", "Weifang", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "WNZ", "温州", "Wenzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HLH", "乌兰浩特", "Wulht", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "URC", "乌鲁木齐", "Wulumuqi", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "WUH", "武汉", "Wuhan", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "WUX", "无锡", "Wuxi", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "WUZ", "梧州", "Wuzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "WUS", "武夷山", "Wuyishan", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "XIY", "西安", "XiAn", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "XIC", "西昌", "Xichang", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "XNN", "西宁", "Xining", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "JHG", "西双版纳", "Xishbn", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "XIL", "锡林浩特", "Xilinht", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "XMN", "厦门", "Xiamen", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "XFN", "襄樊", "Xiangfan", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "XUZ", "徐州", "Xuzhou", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "YNT", "烟台", "Yantai", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "YNJ", "延吉", "Yanji", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "YIN", "伊宁", "Yining", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "YBP", "宜宾", "Yibin", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "YIH", "宜昌", "Yichang", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "YIW", "义乌", "Yiwu", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "INC", "银川", "Yinchuan", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "ZHA", "湛江", "Zhanj", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "DYG", "张家界", "Zhangjj", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "ZAT", "昭通", "Zhaotong", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "CGO", "郑州", "Zhengzh", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "HSN", "舟山", "Zhoushan", "&nbsp;&nbsp;&nbsp;&nbsp;" ),
new Array( "ZUH", "珠海", "Zhuhai", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" )
)
var isCityExist;
var strOptnText;
var eLong_Flight_City_Arrive = "SHA";
if (typeof(eLong_Flight_City_Default) == "undefined")
{
var eLong_Flight_City_Default = "PEK";
}
else if (eLong_Flight_City_Default == null || eLong_Flight_City_Default == "")
{
eLong_Flight_City_Default = "PEK";
}
else if (eLong_Flight_City_Default != "PEK")
{
isCityExist = false;
for (i = 0; i < arrFlightCity.length; i ++)
{ 
if (eLong_Flight_City_Default == arrFlightCity[i][0])
{
isCityExist = true;
break;
}
}
if (!isCityExist)
{
eLong_Flight_City_Default = "PEK";
}
}
var strHtml = "";
strHtml += '<html>';
strHtml += '<head>';
strHtml += '<title>机票搜索</title>';
strHtml += '<meta http-equiv="Content-Type" content="text/html; charset=gb2312">';
<!--
//有效性检查
//var theDate=new Date()
//var theTime=theDate.getFullYear()+"-"+(theDate.getMonth()+1)+"-"+theDate.getDate();
function CheckName(Name) {
var ErrStr;
var ErrChar;
var ArryErrStr;
ErrChar="!@#$%^&*()_+|-=\\~`;'[]{}\"':;,./<>?～！@#￥％^&×（）……＋|－＝、〔〕｛｝：“；‘《》？，。、0123456789";
ErrStr="虚拟,傻冒,先生,小姐,代订";
ArryErrStr = ErrStr.split(",");
//是否含有非法字符
for(var k=0;k<Name.length;k++){
if(ErrChar.indexOf(Name.charAt(k))>-1){
return false;
}
}
//是否含有非法字符串
for (k=0; k<ArryErrStr.length; k++){
if (Name.indexOf(ArryErrStr[k])>-1){
return false;
}
}
return true;
}
//时间检查
function isDateString(str) {
var reg=/^\d{4}-[0-1]?\d{1}-[0-3]?\d{1}$/;
return reg.test(str);
}
function IsDate(DateString , Dilimeter) 
{ 
if (DateString==null) return false; 
if (Dilimeter=='' || Dilimeter==null) 
Dilimeter = '-'; 
var tempy=''; 
var tempm=''; 
var tempd=''; 
var tempArray; 
if (!isDateString(DateString))
return false;
if ( DateString.length<8 || DateString.length>10) 
return false; 
tempArray = DateString.split(Dilimeter); 
if (tempArray.length!=3) 
return false; 
if (tempArray[0].length==4) 
{ 
tempy = tempArray[0]; 
tempd = tempArray[2]; 
} 
else 
{ 
tempy = tempArray[2]; 
tempd = tempArray[1]; 
} 
tempm = tempArray[1]; 
var tDateString = tempy + '/'+tempm + '/'+tempd+' 8:0:0';//加八小时是因为我们处于东八区 
var tempDate = new Date(tDateString); 
if (isNaN(tempDate)) 
return false; 
if (((tempDate.getUTCFullYear()).toString()==tempy) && (tempDate.getMonth()==parseInt(tempm)-1) && (tempDate.getDate()==parseInt(tempd))) 
{ 
return true; 
} 
else 
{ 
return false; 
} 
} 
function CheckDate(strDate1,strDate2) {
return(stringToDate(strDate1, true)<=stringToDate(strDate2, true))
}
function CheckDate1(strDate1,strDate2) {
return(stringToDate(strDate1, true)<stringToDate(strDate2, true))
}
function stringToDate(sDate, bIgnore)
{ var bValidDate, year, month, day
var iaDate = new Array(3)
if (bIgnore) bValidDate = true
else bValidDate = isDateString(sDate)
if (bValidDate)
{ iaDate = sDate.toString().split("-")
year = parseFloat(iaDate[0])
month = parseFloat(iaDate[1]) - 1
day=parseFloat(iaDate[2])
return (new Date(year,month,day))
}
else return (new Date(1900,1,1))
}
function compareDate(strDate1,strDate2) {
var tmp1=strDate1.split('-');
var tmp2=strDate2.split('-');
var date1=eval('new Date('+tmp1[0]+','+tmp1[1]+','+tmp1[2]+')');
var date2=eval('new Date('+tmp2[0]+','+tmp2[1]+','+tmp2[2]+')');
if ((date2.valueOf()-date1.valueOf())>=20*24*60*60*1000)
{
return true;
}
else
{
return false;
}
}
function compareDate1(strDate1,strDate2) {
var tmp1=strDate1.split('-');
var tmp2=strDate2.split('-');
var date1=eval('new Date('+tmp1[0]+','+tmp1[1]+','+tmp1[2]+')');
var date2=eval('new Date('+tmp2[0]+','+tmp2[1]+','+tmp2[2]+')');
if ((date2.valueOf()-date1.valueOf())>=60*24*60*60*1000)
{
return true;
}
else
{
return false;
}
}
function chkHotelForm(objForm)
{
//if (objForm.raCityName.value=="") {
// alert("请输入城市！");
// objForm.raCityName.focus();
// return false;
// }
// if (objForm.raCityName.value!=""){
// if (CheckName(objForm.raCityName.value)==false){
// objForm.raCityName.focus();
// alert("城市名称中含有非法字符！");
// return false;
// }
// } 
if (! isDateString(objForm.CheckInDate.value)) {
alert('日期格式不正确，请重新填写！(如：yyyy-mm-dd)');
objForm.CheckInDate.focus();
return false;
}
if (! isDateString(objForm.CheckOutDate.value)) {
alert('日期格式不正确，请重新填写！(如：yyyy-mm-dd)');
objForm.CheckOutDate.focus();
return false;
}
if (! IsDate(objForm.CheckInDate.value)) {
alert('无效的日期，请重新填写！');
objForm.CheckInDate.focus();
return false;
}
if (! IsDate(objForm.CheckOutDate.value)) {
alert('无效的日期，请重新填写！');
objForm.CheckOutDate.focus();
return false;
}
if (! CheckDate(theTime,objForm.CheckInDate.value)) {
alert('入住日期不能小于当前日期！');
objForm.CheckInDate.focus();
return false;
}
if (! CheckDate(theTime,objForm.CheckOutDate.value)) {
alert('离店日期不能小于当前日期！');
objForm.CheckOutDate.focus();
return false;
} 
if (! CheckDate1(objForm.CheckInDate.value,objForm.CheckOutDate.value)) {
alert('离店日期必须大于入住日期！');
objForm.CheckInDate.focus();
return false;
}
if (compareDate(objForm.CheckInDate.value,objForm.CheckOutDate.value))
{
alert('如果您需要在酒店入住20天以上，请和艺龙酒店预订中心联系：8008101010或01064329999，我们会竭诚为您服务。');
objForm.CheckInDate.focus();
return false;
}
if (compareDate1(theTime,objForm.CheckInDate.value))
{
alert('如果您需要预定晚于或等于'+objForm.CheckInDate.value+'号的酒店，请您致电艺龙预订中心010-64329999、8008101010，我们会竭诚为您服务');
objForm.CheckInDate.focus();
return false;
}
// if (objForm.HotelName.value!=""){
// if (CheckName(objForm.HotelName.value)==false){
// objForm.HotelName.focus();
// alert("酒店名称中含有非法字符！");
// return false;
// }
// } 
return true;
}
function compareFlyDate(strDate1,strDate2) {
var tmp1=strDate1.split('-');
var tmp2=strDate2.split('-');
var date1=eval('new Date('+tmp1[0]+','+tmp1[1]+','+tmp1[2]+')');
var date2=eval('new Date('+tmp2[0]+','+tmp2[1]+','+tmp2[2]+')');
if ((date2.valueOf()-date1.valueOf())>=0)
{
return true;
}
else
{
return false;
}
}
function chkAirForm1(objForm) {
if (objForm.DEPART_CITY.value==objForm.DEST_CITY.value) 
{
alert('出发城市不能与目的城市相同！');
return false;
}
if (! isDateString(objForm.FLY_DATE.value)) 
{
alert('日期格式不正确，请重新填写！(如：yyyy-mm-dd)');
objForm.FLY_DATE.focus();
return false;
}
if (! CheckDate(theTime,objForm.FLY_DATE.value)) 
{
alert('出发日期不能小于当前日期！');
objForm.FLY_DATE.focus();
return false;
}
/* if ( parseInt(objForm.ADULT_NUM.value) < parseInt(objForm.INFANT_NUM.value) )
{
alert("婴儿票不占座位，一个成人只能携带一个婴儿。如超过一名婴儿，超过人数请购买儿童票，谢谢。");
objForm.INFANT_NUM.focus();
return false;
}*/
return true;
}
function chkAirForm2(objForm) {
if (objForm.DEPART_CITY.value==objForm.DEST_CITY.value) {
alert('出发城市不能与目的城市相同！');
return false;
}
if (! isDateString(objForm.FLY_DATE.value)) {
alert('日期格式不正确，请重新填写！(如：yyyy-mm-dd)');
objForm.FLY_DATE.focus();
return false;
}
if (! CheckDate(theTime,objForm.FLY_DATE.value)) 
{
alert('出发日期不能小于当前日期！');
objForm.FLY_DATE.focus();
return false;
}
if (! isDateString(objForm.RETURN_DATE.value)) {
alert('日期格式不正确，请重新填写！(如：yyyy-mm-dd)');
objForm.RETURN_DATE.focus();
return false;
}
if (! compareFlyDate(objForm.FLY_DATE.value,objForm.RETURN_DATE.value)) {
alert('出发日期不能晚于返程日期！');
return false;
}
/* if ( parseInt(objForm.ADULT_NUM.value) < parseInt(objForm.INFANT_NUM.value) )
{
alert("婴儿票不占座位，一个成人只能携带一个婴儿。如超过一名婴儿，超过人数请购买儿童票，谢谢。");
objForm.INFANT_NUM.focus();
return false;
}*/
return true;
}
function chkAirForm3(objForm) {
if (objForm.DEPART_CITY.value==objForm.DEST_CITY.value) {
alert('出发城市不能与目的城市相同！');
return false;
}
if (objForm.DEST_CITY.value==objForm.DEST_CITY2.value) {
alert('到达城市1不能与到达城市2相同！');
return false;
}
if (! isDateString(objForm.FLY_DATE.value)) {
alert('日期格式不正确，请重新填写！(如：yyyy-mm-dd)');
objForm.FLY_DATE.focus();
return false;
}
if (! CheckDate(theTime,objForm.FLY_DATE.value)) 
{
alert('出发日期1不能小于当前日期！');
objForm.FLY_DATE.focus();
return false;
}
if (! isDateString(objForm.FLY_DATE2.value)) {
alert('日期格式不正确，请重新填写！(如：yyyy-mm-dd)');
objForm.FLY_DATE2.focus();
return false;
}
if (! compareFlyDate(objForm.FLY_DATE.value,objForm.FLY_DATE2.value)) {
alert('出发日期1不能晚于出发日期2！');
return false;
}
/*if ( parseInt(objForm.ADULT_NUM.value) < parseInt(objForm.INFANT_NUM.value) )
{
alert("婴儿票不占座位，一个成人只能携带一个婴儿。如超过一名婴儿，超过人数请购买儿童票，谢谢。");
objForm.INFANT_NUM.focus();
return false;
}*/
return true;
}
function showAir(index)
{
for(i=1;i<=3;i++)
{
if(i==index)
{document.getElementById("air"+i+"Table").style.display="block";
document.forms["airSelect"].elements[i-1].checked=true;}
else
document.getElementById("air"+i+"Table").style.display="none";
}
}
strHtml += '<body><center>';
strHtml += '<img src="travel.elong.com/campaign/AdCounter/ExposalCounter.aspx-campaign_id=4210281&Ad_Category=3&Ad_BizScope=3" height=0 width=0>';
strHtml += '<table border="0" width="' + eLong_Width + '" height="' + eLong_Height + '" cellpadding="2" cellspacing="0" style="font-size: 12px;border:1px #368AB9 solid;">';
strHtml += '<form name="airsearch1" action="http://travel.elong.com/flights/tsearch.aspx?" method="get" onSubmit="return chkAirForm1(this)" target="' + eLong_Hotel_Target + '">';
strHtml += '<input type="hidden" name="g" value="result">';
strHtml += '<input type="hidden" name="campaign_id" value="4210281">';
strHtml += '<input type="hidden" name="FLY_TYPE" value="0">';
strHtml += '<input type="hidden" name="Ad_Category" value="3">';
strHtml += '<input type="hidden" name="Ad_BizScope" value="3">';
strHtml += '<tr height=26>';
strHtml += ' <td bgcolor="#368AB9" style="color:white;font-size:12px;font-weight:bolder;" colspan=2>&nbsp;全国低价机票预订</td>';
strHtml += '</tr>';
strHtml += '<tr height="28" bgcolor="#EFF9FF">';
strHtml += ' <td width="40%" align=center>出发城市：</td><td width=60%><select name="DEPART_CITY" id="city01" size="1" style="width:90%;">';
for (i = 0; i < arrFlightCity.length; i ++)
{ 
if (eLong_Flight_City_Default == arrFlightCity[i][0])
{
strHtml +=' <option value="' + arrFlightCity[i][0] + '" selected>'+ arrFlightCity[i][1] + '</option>';
}
else
{
strHtml +=' <option value="' + arrFlightCity[i][0] + '">' + arrFlightCity[i][1] + '</option>';
}
}
strHtml += '</select>';
strHtml += ' </td>';
strHtml += ' </tr>';
strHtml += ' <tr height="29" bgcolor="#EFF9FF">';
strHtml += ' <td width="20%" align=center>到达城市：</td><td><select name="DEST_CITY" id="city02" size="1" style="width:90%;">';
for (i = 0; i < arrFlightCity.length; i ++)
{ 
if (eLong_Flight_City_Arrive == arrFlightCity[i][0])
{
strHtml +=' <option value="' + arrFlightCity[i][0] + '" selected>' + arrFlightCity[i][1] + '</option>';
}
else
{
strHtml +=' <option value="' + arrFlightCity[i][0] + '">' + arrFlightCity[i][1] + '</option>';
}
}
strHtml += ' </select></td>';
strHtml += ' </tr>';
strHtml += ' <tr height="29" bgcolor="#EFF9FF">';
strHtml += ' <td width=20% align=center>航空公司：</td><td ><select name="AIR_CORP" size="1" style="width: 90%;">';
strHtml += ' <option value="" selected="selected">所有</option>';
strHtml += ' <option value="CA">中国国际航空公司</option>';
strHtml += ' <option value="MU">东方航空公司</option>';
strHtml += ' <option value="CZ">南方航空公司</option>';
strHtml += ' <option value="HU">海南航空公司</option>';
strHtml += ' <option value="FM">上海航空公司</option>';
strHtml += ' <option value="MF">厦门航空公司</option>';
strHtml += ' <option value="ZH">深圳航空公司</option>';
strHtml += ' <option value="3U">四川航空公司</option>';
strHtml += ' <option value="SC">山东航空公司</option>';
strHtml += ' <option value="NX">中国澳门航空公司</option>';
strHtml += ' <option value="AA">亚美利加航空公司</option>';
strHtml += ' <option value="AC">加拿大航空公司</option>';
strHtml += ' <option value="AM">墨西哥航空公司</option>';
strHtml += ' <option value="BA">英国航空公司</option>';
strHtml += ' <option value="CO">美国大陆航空公司</option>';
strHtml += ' <option value="CX">中国香港国泰航空公司</option>';
strHtml += ' <option value="DL">美国三角航空公司</option>';
strHtml += ' <option value="JL">日本航空有限公司</option>';
strHtml += ' <option value="LH">德国汉莎航空公司</option>';
strHtml += ' <option value="NH">全日本航空公司</option>';
strHtml += ' <option value="NW">美国西北航空公司</option>';
strHtml += ' <option value="NZ">新西兰航空公司</option>';
strHtml += ' <option value="QF">快达航空公司</option>';
strHtml += ' <option value="SR">瑞士航空公司</option>';
strHtml += ' <option value="TN">澳大利亚航空公司</option>';
strHtml += ' <option value="UA">美国联合航空公司</option>';
strHtml += ' <option value="AF">法国航空公司</option>';
strHtml += ' <option value="AZ">意大利航空公司</option>';
strHtml += ' <option value="GA">印尼鹰航空公司</option>';
strHtml += ' <option value="KA">中国香港港龙航空公司</option>';
strHtml += ' <option value="KE">大韩航空公司</option>';
strHtml += ' <option value="MH">马来西亚航空公司</option>';
strHtml += ' <option value="OZ">韩亚航空公司</option>';
strHtml += ' <option value="TG">泰国国际航空公司</option>';
strHtml += ' <option value="VN">越南航空公司</option>';
strHtml += ' <option value="SQ">新加坡航空公司</option>';
strHtml += ' <option value="JS">朝鲜航空公司</option>';
strHtml += ' <option value="SK">北欧航空公司</option>';
strHtml += ' <option value="CI">中国台湾中华航空公司</option>';
strHtml += ' <option value="BR">中国台湾长荣航空公司</option>';
strHtml += ' <option value="GE">中国台湾复兴航空公司</option>';
strHtml += ' <option value="US">美国和众国航空公司</option>';
strHtml += ' <option value="KL">荷兰皇家航空公司</option>';
strHtml += ' <option value="AI">印度航空公司</option>';
strHtml += ' <option value="AY">芬兰航空公司</option>';
strHtml += ' <option value="CP">加拿大国际航空公司</option>';
strHtml += ' <option value="EK">阿联酋航空公司</option>';
strHtml += ' <option value="ET">埃塞俄比亚航空公司</option>';
strHtml += ' <option value="GF">海湾航空公司</option>';
strHtml += ' <option value="HP">美国西部航空公司</option>';
strHtml += ' <option value="AS">美国阿拉斯加航空公司</option>';
strHtml += ' <option value="IB">西班牙航空公司</option>';
strHtml += ' <option value="SU">俄罗斯航空公司</option>';
strHtml += ' <option value="TW">美国环球航空公司</option>';
strHtml += ' <option value="AN">安捷航空公司</option>';
strHtml += ' <option value="PR">菲律宾航空公司</option>';
strHtml += ' <option value="WN">美国西南航空公司</option>';
strHtml += ' <option value="JD">日本航空系统公司</option>';
strHtml += ' <option value="MS">埃及航空公司</option>';
strHtml += ' <option value="PK">巴基斯坦航空公司</option>';
strHtml += ' <option value="RG">巴西瓦力格航空公司</option>';
strHtml += ' <option value="VP">圣保罗航空公司</option>';
strHtml += ' <option value="LO">波兰航空公司</option>';
strHtml += ' <option value="KU">科威特航空公司</option>';
strHtml += ' <option value="PL">秘鲁航空公司</option>';
strHtml += ' <option value="SA">南非航空公司</option>';
strHtml += ' <option value="SV">沙特阿拉伯航空公司</option>';
strHtml += ' <option value="LA">智利航空公司</option>';
strHtml += ' <option value="LY">以色列航空公司</option>';
strHtml += ' <option value="MI">胜安航空公司</option>';
strHtml += ' <option value="BI">文莱皇家航空公司</option>';
strHtml += ' <option value="OM">蒙古航空公司</option>';
strHtml += ' <option value="9W">喷气机航空公司</option>';
strHtml += ' <option value="PG">曼谷航空公司</option>';
strHtml += ' <option value="RA">尼泊尔航空公司</option>';
strHtml += ' <option value="UL">斯里兰卡航空公司</option>';
strHtml += ' <option value="DI">德英航空公司</option>';
strHtml += ' <option value="IJ">自由航空公司</option>';
strHtml += ' <option value="BD">不列颠内陆航空公司</option>';
strHtml += ' <option value="LX">克罗斯航空公司</option>';
strHtml += ' <option value="OS">奥地利航空公司</option>';
strHtml += ' <option value="PE">欧洲航空公司</option>';
strHtml += ' <option value="VO">蒂罗林航空公司</option>';
strHtml += ' <option value="SN">比利时航空公司</option>';
strHtml += ' <option value="TP">葡萄牙航空公司</option>';
strHtml += ' <option value="MA">匈牙利航空公司</option>';
strHtml += ' <option value="JY">泽西欧洲航空公司</option>';
strHtml += ' <option value="DM">梅尔斯克航空公司</option>';
strHtml += ' <option value="LG">卢森堡航空公司</option>';
strHtml += ' <option value="EI">爱尔兰航空公司</option>';
strHtml += ' <option value="JP">亚得利亚航空公司</option>';
strHtml += ' <option value="OK">捷克航空公司</option>';
strHtml += ' <option value="JU">南斯拉夫航空公司</option>';
strHtml += ' <option value="TK">土耳其航空公司</option>';
strHtml += ' <option value="NY">冰岛航空公司</option>';
strHtml += ' <option value="JG">希腊航空公司</option>';
strHtml += ' <option value="OA">奥林匹克航空公司</option>';
strHtml += ' <option value="OU">克罗地亚航空公司</option>';
strHtml += ' <option value="CY">塞浦路斯航空公司</option>';
strHtml += ' <option value="KM">马尔它航空公司</option>';
strHtml += ' <option value="6U">乌克兰航空公司</option>';
strHtml += ' <option value="RM">摩尔多瓦航空公司</option>';
strHtml += ' <option value="PS">乌克兰国际航空公司</option>';
strHtml += ' <option value="TE">立陶宛航空公司</option>';
strHtml += ' <option value="HY">乌滋别克斯坦航空公司</option>';
strHtml += ' <option value="GL">格林兰岛航空公司</option>';
strHtml += ' <option value="TZ">环美航空公司</option>';
strHtml += ' <option value="EH">厄瓜多尔航空公司</option>';
strHtml += ' <option value="HA">夏维夷航空公司</option>';
strHtml += ' <option value="QX">地平线航空公司</option>';
strHtml += ' <option value="VX">哥伦比亚中央航空公司</option>';
strHtml += ' <option value="CM">巴拿马航空公司</option>';
strHtml += ' <option value="AR">阿根廷航空公司</option>';
strHtml += ' <option value="FQ">阿鲁巴航空公司</option>';
strHtml += ' <option value="QA">加勒比航空公司</option>';
strHtml += ' <option value="QR">卡塔尔航空公司</option>';
strHtml += ' <option value="PC">斐济航空公司</option>';
strHtml += ' <option value="ZL">黑泽尔顿航空公司</option>';
strHtml += ' <option value="PX">新几内亚航空公司</option>';
strHtml += ' <option value="NF">维加斯航空公司</option>';
strHtml += ' <option value="IE">所罗门航空公司</option>';
strHtml += ' <option value="SB">喀里多尼亚国际航空公司</option>';
strHtml += ' <option value="UU">奥斯特拉尔航空公司</option></select>';
strHtml += ' </td>';
strHtml += ' </tr>';
strHtml += ' <tr height="29" bgcolor="#EFF9FF">';
strHtml += ' <td align=center>出发日期：</td><td><input name="FLY_DATE" id="flydate" type="text" style="width:80%;" maxlength="10" value="yyyy-mm-dd"></td>';
strHtml += ' </tr>';
strHtml += ' <tr height="29" bgcolor="#EFF9FF" nowrap>';
strHtml += ' <td align=center>出发时间：</td><td nowrap><select name="FLY_TIME" style="width:82;">';
strHtml += ' <option value="">全天</option>';
strHtml += ' <option value="00-00-06-00">00:00-06:00</option>';
strHtml += ' <option value="06-00-08-00">06:00-08:00</option>';
strHtml += ' <option value="08-00-12-00">08:00-12:00</option>';
strHtml += ' <option value="12-00-16-00">12:00-16:00</option>';
strHtml += ' <option value="16-00-21-00">16:00-21:00</option>';
strHtml += ' <option value="21-00-23-59">21:00-23:59</option>';
strHtml += ' </select>';
strHtml += ' <input type=submit style="font-size:12px;color:#FFFFFF;background-color:#008F14;height:20px;border-width:0px;" value="搜索">';
strHtml += ' </td>';
strHtml += ' </tr>';
strHtml += '</form>';
strHtml += '<input type="hidden" id="hidMemberID" value="4210281"> ';
strHtml += '</table>';
//取当天日期
strHtml += '<script language="JavaScript">';
strHtml += 'var theDate = new Date()\;';
strHtml += 'var theTime=theDate.getFullYear()+"-"+(theDate.getMonth()+1)+"-"+theDate.getDate()\;';
strHtml += 'document.getElementById("flydate").value = theTime\;';
strHtml += '</script>';
document.write(strHtml);
document.writeln('</td></tr></table>');