function $id(id){return document.getElementById(id);};function ShowMsg(){document.writeln("<div id=\"msgdiv\" style=\"position:absolute;display:none;border:6px solid #FDFDFD;\"><\/div>");document.writeln("<div id=\"overdiv\" style=\"position:absolute;display:none;\">");document.writeln("<\/div>");this.ok_callback=function(){};this.cancel_callback=function(){};this.msgobjname="";this.show=function(msgtitle,sc,ec,fno,t){var tempobj1=$id("msgdiv");var tempobj2=$id("overdiv");var msgobj=this.msgobjname;var scstring="";var ecstring="";tempobj2.style.filter="alpha(opacity=75)";tempobj2.style.MozOpacity=75/100;tempobj2.style.backgroundColor="#CCCCCC";tempobj2.style.display='';tempobj2.style.zIndex=100;with(document.documentElement){var bodywidth=(scrollWidth>clientWidth)?scrollWidth:clientWidth;var bodyheith=(scrollHeight>clientHeight)?scrollHeight:clientHeight;};tempobj2.style.height=bodyheith+"px";tempobj2.style.width=bodywidth+"px";tempobj2.style.left=0;tempobj2.style.top=0;tempobj1.style.display="none";tempobj1.style.display='';if(t=="1"){tempobj1.style.left=(document.documentElement.clientWidth)/5+"px";tempobj1.style.top=(document.documentElement.scrollTop+(document.documentElement.clientHeight)/10)+"px";tempobj1.style.width=750+"px";tempobj1.style.height=655+"PX";}else if(t=="2"){tempobj1.style.left=(document.documentElement.clientWidth)/4+"px";tempobj1.style.top=(document.documentElement.scrollTop+(document.documentElement.clientHeight)/5)+"px";tempobj1.style.width=700+"px";tempobj1.style.height=400+"PX";}else if(t=="3"){tempobj1.style.left=(document.documentElement.clientWidth)/4+"px";tempobj1.style.top=(document.documentElement.scrollTop+(document.documentElement.clientHeight)/5)+"px";tempobj1.style.width=600+"px";tempobj1.style.height=300+"PX";}else if(t=="4"){tempobj1.style.left=(document.documentElement.clientWidth)/3+"px";tempobj1.style.top=(document.documentElement.scrollTop+(document.documentElement.clientHeight)/3)+"px";tempobj1.style.width=500+"px";tempobj1.style.height=155+"PX";scstring=sc.split("|")[0];ecstring=ec.split("|")[0];sc=sc.split("|")[1];ec=ec.split("|")[1];}else if(t=="5"){tempobj1.style.left=(document.documentElement.clientWidth)/3.5+"px";tempobj1.style.top=(document.documentElement.scrollTop+(document.documentElement.clientHeight)/3)+"px";tempobj1.style.width=680+"px";tempobj1.style.height=155+"PX";};tempobj1.style.zIndex=200;tempobj1.style.backgroundColor="#CDDAF1";var OutStr;OutStr="<div style=\"font-weight:bolder;text-align:left;height:20px;padding:5px 0 0 5PX;font-size:14px; color:#FFFFFF;background-color:#6088D2;cursor:move\" ><span style='width:95%; float:left;' canmove=\"true\" forid=\"msgdiv\">"+msgtitle+"</span><span><img src='/v1/images/hit33.jpg' onmouseover=\"this.style.cursor='pointer'\" onclick=\""+msgobj+".cancel()\" title='关闭并返回'></span></div>";if(t=="1"){OutStr=OutStr+"<div style=\"height:630PX;text-align:left;font-size:12px;background-color:#EEF7FF; border:1px solid #6088D2;  \">"+"<p style='color:#C0490A;margin:0'><iframe id=\"vfrm\" width=\"100%\" height=\"100%\" frameborder=\"0\" ></p>"+"</div>";}else if(t=="3"){OutStr=OutStr+"<div style=\"height:275PX;line-height:375px;text-align:center;font-size:12px;background-color:#EEF7FF; border:1px solid #6088D2;  \">"+"<iframe id=\"showsubclass\" width=\"100%\" height=\"100%\" frameborder=\"0\" ></div>";}else if(t=="4"){OutStr=OutStr+"<div style=\"height:130PX;text-align:left;font-size:12px;background-color:#FFF; border:1px solid #6088D2;  \">";OutStr=OutStr+"<div style=\"height:28PX;line-height:28px;text-align:left;padding:0 0 0 10px; border:1px solid #999;margin:5px;background-color:#FFF;font-weight:bolder;\">我们将为您查询 从 "+scstring+" 至 "+ecstring+" 的特惠票价</div>";OutStr=OutStr+"<div style=\"height:auto;text-align:left;padding:10px 0 5px 10px;margin:5px;background-color:#FFF;font-weight:bolder;\"><div style=\" border-bottom:1px solid #999;padding-bottom:10px;\">出发日期：<input name=\"sdvalue\" type=\"text\" value=\"yyyy-mm-dd\" onfocus=\"this.value='';this.style.color='#000000'\" onblur=\"if(this.value == '') {this.value='yyyy-mm-dd';this.style.color='#C1C1C1'}\" onclick=\"MyCalendar.SetDate(this)\" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;回程日期：<input name=\"edvalue\" type=\"text\" value=\"yyyy-mm-dd\" onfocus=\"this.value='';this.style.color='#000000'\" onblur=\"if(this.value == '') {this.value='yyyy-mm-dd';this.style.color='#C1C1C1'}\" onclick=\"MyCalendar.SetDate(this)\"></div>";OutStr=OutStr+"<div style=\"padding:10px 0 10px 0;text-align:center;\"><input name=\"btnsearchbysales\" type=\"button\" value=\"查询\" class=\"btn\" onclick=\""+msgobj+".btnsearch('"+sc+"','"+ec+"')\" >&nbsp;&nbsp;&nbsp;&nbsp;<input name=\"btnsearchbysales\" type=\"button\" value=\"取消\" onclick=\""+msgobj+".cancel()\" class=\"btn\"></div>";OutStr=OutStr+"</div></div>";}else if(t=="5"){OutStr=OutStr+"<div style=\"height:130PX;text-align:left;font-size:12px;background-color:#FFF; border:1px solid #6088D2;  \">";OutStr=OutStr+"<div style=\"height:28PX;line-height:28px;text-align:left;padding:0 0 0 10px;margin:5px;background-color:#FFF;font-weight:bolder;\">1、很抱歉，我们将暂时关闭国际机票网上预订功能，目前系统进一步完善中，将在近期重新推出，敬请期待。<BR>2、请直接联系客服预订。<div style=\"text-align:center;margin-top:20px\"><input name=\"btnsearchbysales\" type=\"button\" value=\"确定\" onclick=\""+msgobj+".cancel()\" class=\"btn\"></div></div>";OutStr=OutStr+"</div>";}else if(t=="2"){OutStr=OutStr+"<div style=\"height:373PX;text-align:left;font-size:12px;background-color:#EEF7FF; border:1px solid #6088D2;  \">"+"<fieldset style='border:none; margin:12px 0 0 0'>"+"	<label style='float:left;width:160px;text-align:right;font-size:14px;'>姓名：</label>"+"		<input name=\"username\" id=\"username\" style=\"width: 300px;float:left;\" maxlength=\"20\"  /><span style=\"color:red\">*</span>"+"	</fieldset>"+"<fieldset style='border:none; margin:12px 0 0 0'>"+"	<label style='float:left;width:160px;text-align:right;font-size:14px;'>手机号码：</label>"+"		<input name=\"usermobile\" id=\"usermobile\" style=\"width: 300px;float:left;\"  maxlength=\"20\"  /><span style=\"color:red\">*</span>"+"	</fieldset>"+"<fieldset style='border:none; margin:12px 0 0 0'>"+"	<label style='float:left;width:160px;text-align:right;font-size:14px;'>联系电话：</label>"+"		<input name=\"usertel\" id=\"usertel\" style=\"width: 300px;float:left;\" maxlength=\"20\"   />"+"	</fieldset>"+"<fieldset style='border:none; margin:12px 0 0 0'>"+"	<label style='float:left;width:160px;text-align:right;font-size:14px;'>电子邮箱：</label>"+"		<input name=\"useremail\" id=\"useremail\" style=\"width: 300px;float:left;\"  maxlength=\"30\"  />"+"	</fieldset>"+"<fieldset style='border:none; margin:12px 0 0 0'>"+"	<label style='float:left;width:160px;text-align:right;font-size:14px;'>留言类型：</label>"+"		<input name=\"msgtype\" id=\"msgtype1\" type=\"radio\" value=\"咨询\" onclick=\"javascrpt:$('msgtypes').value=this.value\" checked /><label for=\"msgtype1\">咨询</label>"+"		<input name=\"msgtype\" id=\"msgtype2\" type=\"radio\" value=\"投诉\"  onclick=\"javascrpt:$('msgtypes').value=this.value\" /><label for=\"msgtype2\">投诉</label>"+"		<input name=\"msgtype\" id=\"msgtype3\" type=\"radio\" value=\"建议\"  onclick=\"javascrpt:$('msgtypes').value=this.value\" /><label for=\"msgtype3\">建议</label>"+"		<input name=\"msgtypes\" id=\"msgtypes\" type=\"hidden\" value=\"咨询\"  />"+"	</fieldset>"+"<fieldset style='border:none; margin:12px 0 0 0'>"+"	<label style='float:left;width:160px;text-align:right;font-size:14px;'>留言内容：</label>"+"		<textarea name=\"msg\" style=\"width:400px; height:100px\"></textarea><span style=\"color:red\">*</span>"+"	</fieldset>"+"			<fieldset style=\"text-align:left;font-size:12px; margin:15px 0 0 0; border:none;\">"+"			<input type=\"submit\" name=\"SubmitLogin\" id=\"id_login\" value=\"提交留言\" class=\"btn\" onclick=\""+msgobj+".ok(this)\" style='margin:0 0 0 160px;' /> "+"			<span id='retloginmsg' style='color:red; padding:0 0 0 25px;'></span>"+"		</fieldset>	"+"			<fieldset style=\"text-align:left;font-size:12px; margin:15px 0 0 0; border:none; \">"+"			<span style='padding-left:100px; COLOR:#FF6600'>温馨提示：您还可以将留言发送至我们的短信平台：075583654777 （支持移动/联通/小灵通）</span>"+"		</fieldset>	"+"</div>";};tempobj1.innerHTML=OutStr;if(t=="1"){var iframe=$("vfrm");iframe.src="http://www.feeyo.com/vflight/opens/vflightsearch.html?dep="+sc+"&arr="+ec+"&fno="+fno+"&s=%B2%E9%D1%AF";}else if(t=="2"){$("username").focus();}else if(t=="3"){var iframe=document.getElementById("showsubclass");iframe.src="/tools/GetInterPolicy.aspx?md5value="+sc;};var md=false,mobj,ox,oy;document.onmousedown=function(ev){var ev=ev||window.event;var evt=ev.srcElement||ev.target;if(typeof(evt.getAttribute("canmove"))=="undefined"){return;};if(evt.getAttribute("canmove")){md=true;mobj=document.getElementById(evt.getAttribute("forid"));ox=mobj.offsetLeft-ev.clientX;oy=mobj.offsetTop-ev.clientY;};};document.onmouseup=function(){md=false;};document.onmousemove=function(ev){var ev=ev||window.event;if(md){mobj.style.left=(ev.clientX+ox)+"px";mobj.style.top=(ev.clientY+oy)+"px";};};};this.btnsearch=function(s,e){if(s!=""&&e!=""){var sd=document.getElementById("sdvalue").value;var ed=document.getElementById("edvalue").value;var ft=2;if(ed==""||ed=="yyyy-mm-dd"){ed="";ft=1;};if(sd!=""&&sd!="yyyy-mm-dd"){window.location.href="/international/ShowFareFirst.asp?ifromcity="+s+"&itocity="+e+"&istartdate="+sd+"&ienddate="+ed+"&iairkind="+ft;return;}else{alert("请选择出发日期。");document.getElementById("sdvalue").focus();return;};};alert("参数错误，请重新选择。");this.cancel();};this.ok=function(obj){obj.disabled=true;document.getElementById("retloginmsg").innerHTML="正在处理...";var username=$id("username").value;var usermobile=$id("usermobile").value;var usertel=$id("usertel").value;var useremail=$id("useremail").value;var msgtype=$id("msgtypes").value;var msg=$id("msg").value;var para="username="+username+"&usermobile="+usermobile+"&usertel="+usertel+"&useremail="+useremail+"&msgtype="+msgtype+"&msg="+msg+"&saction=add";new Ajax.Request("/member/addMsgbynet.asp",{method:'post',parameters:para,onComplete:showResponse});function showResponse(originalRequest){var reqstr=originalRequest.responseText;var tmpreqstr=new Function("return "+reqstr);reqstr=tmpreqstr();if(reqstr.status){$id("retloginmsg").innerHTML=reqstr.msg;}else{$id("retloginmsg").innerHTML=reqstr.msg;obj.disabled=false;};};};this.cancel=function(){$id('msgdiv').style.display='none';$id('overdiv').style.display='none';this.cancel_callback();};};var ShowMsgo=new ShowMsg();ShowMsgo.msgobjname="ShowMsgo";ShowMsgo.ok_callback=function(){};ShowMsgo.cancel_callback=function(){};function r(md5){ShowMsgo.show('查看限制条件',md5,'','','3');};var objid="";function rd(id,sc,ec,sd,ed,flt,ft,md5){objid=id;if(document.getElementById("otherflight"+objid).innerHTML==""){var pars="sc="+sc+"&ec="+ec+"&sd="+sd+"&ed="+ed+"&air="+flt+"&ft="+ft+"&md5value="+md5;new Ajax.Request("/tools/GetInterSubClass.aspx",{method:'get',parameters:pars,onComplete:showResponsebyrd});}else{document.getElementById("otherflight"+objid).style.display=(document.getElementById("otherflight"+objid).style.display=="none")?"":"none";};};function showResponsebyrd(originalRequest){var reqstr=originalRequest.responseText;document.getElementById("otherflight"+objid).innerHTML=reqstr;document.getElementById("otherflight"+objid).style.display="";};function showtime(){if(document.getElementById("loadingID")!=null){document.getElementById("loadingID").innerHTML+="国际机票价格与行程计算较为复杂，查询会稍有些延迟，请您耐心等待。"};};function selectAir(n){if(n==1){document.iQueryForm.ienddate.disabled=true;document.iQueryForm.ienddate.style.background="#E6E6E6";}else{document.iQueryForm.ienddate.disabled=false;document.iQueryForm.ienddate.style.background="#FFFFFF";};};function SubmitForm(){var patternDate=/^(\d{4})-(\d{2})-(\d{2})$/;with(document.iQueryForm){if(itocity.value==ifromcity.value){alert("去程和回程的目的地不能相同，请重新选择！");return;};if(itocity.value==""){alert("请选择目的城市！");return;};if(istartdate.value=="yyyy-mm-dd"||istartdate.value==""){alert("请选择您要出发的日期");istartdate.focus();return;};if(!patternDate.test(istartdate.value)){alert("您填写的日期格式不正确，应该是yyyy-mm-dd");istartdate.focus();return;};if(istartdate.value<(new Date()).getShortDateStr()){alert("您选择的出发日期必须大于当前日期，请重新设置！");istartdate.focus();return;};if(iairkind[1].checked){if(ienddate.value=="yyyy-mm-dd"||ienddate.value==""){alert("请选择您要返回的日期");ienddate.focus();return;};if(!patternDate.test(ienddate.value)){alert("回程日期格式不正确，正确格式为：yyyy-mm-dd , 请检查后重新填写!");ienddate.focus();return;};if(ienddate.value<istartdate.value){alert("回程日期不能早于出发日期，请重新填写！");ienddate.focus();return;};};};document.iQueryForm.submit();};Date.prototype.getShortDateStr=function(){var str=this.getFullYear().toString();str+="-";if(this.getMonth()<9)str+="0";str+=(this.getMonth()+1).toString();str+="-";if(this.getDate()<10)str+="0";str+=this.getDate().toString();return str;};function AddFavorite(sURL,sTitle){try{window.external.addFavorite(sURL,sTitle);}catch(e){try{window.sidebar.addPanel(sTitle,sURL,"");}catch(e){alert("对不起,您的浏览器无法使用此功能，请使用Ctrl+D进行添加。");};};};function selectPricByElseCity(city){$id("ifromcity").value=city;document.iQueryForm.submit();};function btnsubmit(v1,v2){document.getElementById("v1").value=v1;document.getElementById("v2").value=v2;document.getElementById("frmsubmit").submit();};function on(originalRequest){var reqstr=originalRequest.responseText.split("!!!!!~");airlineslist=reqstr[1].split(',');airlinesnumlist=reqstr[2].split(',');airlinesnamelist=reqstr[3].split(',');miniprice=reqstr[5];$("loadingdata").innerHTML=reqstr[0];if(reqstr[1]!=""){$("totalairline").innerHTML=airlineslist.length;$("totalairpricenum").innerHTML=reqstr[4];$("totalairlines").innerHTML=reqstr[4];setTimeout(changeminiprice,100);setTimeout(g,500);$("transferplan01").innerHTML=reqstr[4];$("transferplan0").innerHTML=reqstr[6].split(",")[0];$("transferplan1").innerHTML=reqstr[6].split(",")[1];};var ahref=document.getElementsByTagName("a");for(var i=0;i<ahref.length;i++){if(ahref[i].cmd){ahref[i].onclick=function(){x(this.cmd,this.values);};}};var ipt=document.getElementsByTagName("input");for(var i=0;i<ipt.length;i++){if(ipt[i].cmd){ipt[i].onclick=function(){x(this.cmd,this.values);};}};};function g(){var str="";var num=0;for(var i=0;i<airlineslist.length;i++){str+="<li style='background:url(/v1/images/airPic_gj/"+airlineslist[i]+".gif) no-repeat left; '><a href=\"###\" onclick=\"javascript:swapair('"+airlineslist[i]+"')\">"+airlineslist[i]+"--"+airlinesnamelist[i]+"(<span>"+airlinesnumlist[i]+"</span>)</a></li>";};$("airlineslist").innerHTML+=str;};function swapair(a){var ul=document.getElementsByTagName("ul");for(var i=0;i<ul.length;i++){if(ul.item(i).aircode){if(ul.item(i).aircode==a){$("divflightplane"+ul.item(i).vid).style.display="";}else if(a=="0"||a=="1"||a=="01"){(a=="01")?$("divflightplane"+ul.item(i).vid).style.display="":(ul.item(i).transfer==a)?$("divflightplane"+ul.item(i).vid).style.display="":$("divflightplane"+ul.item(i).vid).style.display="none";}else{$("divflightplane"+ul.item(i).vid).style.display=(a=="ALL")?"":"none";};};};};function changeminiprice(){if(miniprice!=""&&miniprice!=undefined){var para="v="+miniprice+"&rng="+Math.random();new Ajax.Request("changepara.asp",{method:'get',parameters:para});};};function x(c,v){if(c=="qtax"){$("btntax"+v+"0").style.display="none";$("btntax"+v+"1").style.display="";new Ajax.Request("/tools/GetInterAirDataQtax.aspx",{method:'get',parameters:"md5value="+$("flightplane"+v).s0+"&o="+v,onComplete:uptax});}else if(c=="qrule"){window.open("/tools/GetInterPolicyV3.aspx?md5value="+$("flightplane"+v).s3,"查看限制条件","height=600, width=600, top=0, left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=n o, status=no");}else if(c=="showflight"){$("flightdata"+v).style.display=($("flightdata"+v).style.display=="")?"none":"";}else if(c=="submitorder"){objform=$("flightplane"+v);var seg=eval("("+objform.s2.replace(/(~)/g,"\"").replace(/(`)/g,":").replace(/(!)/g,"{").replace(/(\|)/g,"}")+")");var segment="";if(seg.s.segment.length==undefined){segment=seg.s.segment.dep+"["+seg.s.segment.arr+"["+seg.s.segment.air+"["+seg.s.segment.flightno+"["+seg.s.segment.depairport+"["+seg.s.segment.arrairport+"["+seg.s.segment.depdate+"["+seg.s.segment.arrdate+"["+seg.s.segment.deptime+"["+seg.s.segment.arrtime+"["+seg.s.segment.flytime+"["+seg.s.segment.plane+"["+seg.s.segment.seat+"["+seg.s.segment.stop;}else{for(var i=0;i<seg.s.segment.length;i++){var tmpseg=seg.s.segment[i];segment=(segment=="")?tmpseg.dep+"["+tmpseg.arr+"["+tmpseg.air+"["+tmpseg.flightno+"["+tmpseg.depairport+"["+tmpseg.arrairport+"["+tmpseg.depdate+"["+tmpseg.arrdate+"["+tmpseg.deptime+"["+tmpseg.arrtime+"["+tmpseg.flytime+"["+tmpseg.plane+"["+tmpseg.seat+"["+tmpseg.stop:segment+"]"+tmpseg.dep+"["+tmpseg.arr+"["+tmpseg.air+"["+tmpseg.flightno+"["+tmpseg.depairport+"["+tmpseg.arrairport+"["+tmpseg.depdate+"["+tmpseg.arrdate+"["+tmpseg.deptime+"["+tmpseg.arrtime+"["+tmpseg.flytime+"["+tmpseg.plane+"["+tmpseg.seat+"["+tmpseg.stop;};};$("price").value=objform.price;$("iprice").value=objform.iprice;$("itax1").value=objform.tax1;$("itax2").value=objform.tax2;$("airline").value=objform.aircode;$("flightdata").value=objform.s1;$("segment").value=segment;$("rulestr").value=objform.s3;$("taxstr").value=objform.s0;$("frmsubmit").submit();};};function uptax(Req){var req=Req.responseText;if(req!=""){var arrreq=req.split(",");$("btntax"+arrreq[2]+"0").style.display="";$("btntax"+arrreq[2]+"1").style.display="none";if(arrreq[0]!="0"&&arrreq[0]!=""){$("tax"+arrreq[2]).innerHTML="&yen;"+arrreq[0];$("flightplane"+arrreq[2]).tax1=+arrreq[0];$("flightplane"+arrreq[2]).tax2=+arrreq[1];}else{alert("Q税失败，需要客服协助查询。");};};};

