var tt=new Date();

/*tuna_090501.js*/
var $Ctrip="Copyright(C) Ctrip.COM 2008.All Rights Reserved.\nNot to be reused without permission.\nCreated by Chu Chengdong, Tian Guofa UI group, IT department.\nLast modified by Chu Chengdong, Tian Guofa, UI group, IT department. 2009\/06\/12";var _=window;var __=_.document;var ___=__.documentElement;var Ctrip={module:{}};var $$={};with(navigator){with(userAgent){$$.browser={IE:!!match(/MSIE/),IE6:!!appVersion.match(/MSIE 6\.0/i),Moz:match(/Mozilla/i)&&!match(/compatible|WebKit/i),Opera:!!match(/Opera/i),Safari:!!match(/Mac|Safari/i)}}}var $topWin=window;(function(){try{while(true){var a=$topWin.parent;if(a&&a!=$topWin&&a.$Ctrip)$topWin=a;else return}}catch(e){}})();window.onerror=function(a,c,d){$trackEvent('normal-error','normal',$error(a,c,d),$tunaVersion());return false};$extend(Array.prototype,new function(){this.each=function(a){for(var c=0,d=this.length;c<d;c++)if((a?a(this[c],c):this[c]())===false)return false;return true};this.random=function(){if(!this.length)return null;return this[Math.floor(Math.random()*this.length)]};this.randomize=function(){for(var a=0,c=this.length;a<c;++a){var d=Math.floor(Math.random()*c);var f=this[a];this[a]=this[d];this[d]=f}return this};if($$.browser.IE)this.map=function(func){var g=[];for(var i=0,j=this.length;i<j;i++)g.push(func(this[i]));return g}});$extend(Number.prototype,new function(){this.parseCur=function(a){var c=this.toFixed(a||2),d=/(\d)(\d{3}[,\.])/;while(d.test(c))c=c.replace(d,"$1,$2");c=c.replace(/^(-?)\./,"$10.");return a===0?c.replace(/\..*$/,""):c}});$extend(String.prototype,new function(){this.replaceWith=function(d){return this.replace(/\{\$(\w+)\}/g,function(a,c){if(c in d)return d[c];else return a})};this.trim=function(){return this.replace(/^\s+|\s+$/g,'')};this.isEmail=function(){var a=/^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/;return a.test(this)};this.isDateTime=function(a){var c=a===false?this:this.parseStdDate(false);if(!c)return false;var d=c.match(/^((19|20)\d{2})-(\d{1,2})-(\d{1,2})$/);if(!d)return false;for(var f=1;f<5;f++)d[f]=parseInt(d[f],10);if(d[3]<1||d[3]>12||d[4]<1||d[4]>31)return false;var g=new Date(d[1],d[3]-1,d[4]);return g.getDate()==d[4]?g:null};this.toReString=function(){return this.replace(/([\.\\\/\+\*\?\[\]\{\}\(\)\^\$\|])/g,"\\$1")};this.isChinaIDCard=function(){var a=this.toLowerCase().match(/./g);if(this.match(/^\d{17}[\dx]$/i)){var c=0,d=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];for(var f=0;f<17;f++)c+=parseInt(a[f],10)*d[f];if("10x98765432".charAt(c%11)!=a[17])return false;return!!this.replace(/^\d{6}(\d{4})(\d{2})(\d{2}).+$/,"$1-$2-$3").isDateTime()}if(this.match(/^\d{15}$/))return!!this.replace(/^\d{6}(\d{2})(\d{2})(\d{2}).+$/,"19$1-$2-$3").isDateTime();return false};this.parseStdDate=function(a){var c="January|1@February|2@March|3@April|4@May|5@June|6@July|7@August|8@September|9@October|10@November|11@December|12";var d=this.replace(/[ \-,\.\/]+/g,"-").replace(/(^|-)0+(?=\d+)/g,"$1");if($$.status.version=="en")d=d.replace(/[a-z]{3,}/i,function(d){return(_t_re=c.match(new RegExp("(^|@)"+d+"[^\\|]*\\|(\\d+)","i")))?_t_re[2]:d});d=d.replace(/^([^-]{1,2}-[^-]{1,2})-([^-]{4})$/,"$2-$1");return a===false||d.isDateTime(false)?d:null};this.parseEngDate=function(){var a=this.parseStdDate();if(!a)return null;var c=a.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);return"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec".split("|")[parseInt(c[2])-1]+"-"+c[3]+"-"+c[1]}});$extend(Date.prototype,new function(){this.dateValue=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate())};this.addDate=function(a){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+a)};this.toStdString=function(){return this.getFullYear()+"-"+(this.getMonth()+1)+"-"+this.getDate()};this.toEngString=function(){return"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec".split("|")[this.getMonth()]+"-"+this.getDate()+"-"+this.getFullYear()}});$extend(Function.prototype,new function(){this.bind=function(a){var c=this;var d=[].slice.call(arguments,1);return function(){return c.apply(a,d.concat([].slice.call(arguments,0)))}};this.pass=function(){var a=[].slice.call(arguments,0);a.unshift(null);return this.bind.apply(this,a)};this.delay=function(a){return setTimeout(this,a)}});$$.cookie={domain:null,path:null,expires:null};$$.history={load:function(){setTimeout($$.history.load,200)}};_.__.write("<div id=\"jsContainer\"><div id=\"jsHistoryDiv\" style=\"display:none;\">"+($$.browser.IE?"":"<iframe id=\"jsHistoryFrame\" name=\"jsHistoryFrame\" onload=\"$$.history.load();\" src=\"about:blank\"><\/iframe>")+"<\/div><textarea id=\"jsSaveStatus\" style=\"display:none;\"><\/textarea><div id=\"tuna_jmpinfo\" style=\"visibility:hidden;position:absolute;z-index:120;overflow:hidden;\"><\/div><div id=\"tuna_alert\" style=\"display:none;position:absolute;z-Index:999;overflow:hidden;\"><\/div><\/div>");$$.status=new function(){this.domReady=false;this.load=false;this.busy=0;this.dealt={};this.regEventCount=0;this.regEventHash={};this.charset=(((_.__.charset?_.__.charset:_.__.characterSet)||"").match(/^(gb2312|big5|utf-8)$/gi)||"gb2312").toString().toLowerCase();this.version={"gb2312":"zh-cn","big5":"zh-tw","utf-8":"en"}[this.charset];var a=$topWin.__.getElementsByTagName("script");this.debug=false;this.debugEvent=false;this.alertDiv=_.__.getElementById("tuna_alert");this.container=_.__.getElementById("jsContainer");this.saveStatus=_.__.getElementById("jsSaveStatus");this.back=false;this.pageValue={data:{}};this.globalValue={};this.today=new Date().toStdString()};$$.history={isFirefox2:/Firefox\/2\.0\.0\.\d+/.test(navigator.userAgent),enabled:false,callback:{},info:{"#":["#","","",""]},current:"#",blank:"blank.html",div:_.__.getElementById("jsHistoryDiv"),frame:_.frames["jsHistoryFrame"],iframe:null,isReady:false,count:0,init:function(){if(_.$$.history.frame)return;this.div.innerHTML="<iframe id=\"jsHistoryFrame\" name=\"jsHistoryFrame\" src=\""+this.blank+"\" onload=\"$$.history.load();\"><\/iframe>";this.frame=_.frames["jsHistoryFrame"];this.iframe=$("jsHistoryFrame")},load:function(){this.isReady=true;$r("domReady",function(){var f=0;setInterval(function(){var a=(_.$$.history.isFirefox2?_:_.$$.history.frame).location.hash.replace(/^#/,"")||"#";if(a!=_.$$.history.current){if(f<1)f++;else{_.$$.history.current=a;var c=_.$$.history.info[a];if(c){$t("[history]返回标志:"+c[0]+"/"+a,"green",c.join("\t"));var d=_.$$.history.callback[c[0]];if(typeof d=="function")d.apply(c[0],c.slice(1))}if($$.browser.Opera)_.$saveHistory()}}else f=0},100)});$t("[history]初始化完成","green");var g=(_.$$.history.isFirefox2?_:_.$$.history.frame).location.hash.replace(/^#/,"")||"#";$t("[history]返回标志:"+g,"green");this.load=function(){}}};$$.module={iframe:[],list:{},tab:{},selectAll:{},address:{source:{}},calendar:{},init:[]};$$.string={"zh-cn":{weekday:"日一二三四五六",display:"@▲|▼@显示|隐藏@"},"zh-tw":{weekday:"日一二三四五六",display:"@▲|▼@顯示|隱藏@"},"en":{weekday:"SMTWTFS",display:"@Show|Hidden@"}}[$$.status.version];$$.access={};function $extend(a){for(var c=1;c<arguments.length;c++){var d=arguments[c];for(var f in d)if(d.hasOwnProperty(f))a[f]=d[f]}return a}function $merge(){return $extend.apply(null,[{}].concat([].slice.call(arguments,0)))}function $type(a){var c=typeof a;if(c!='object'&&c!='function')return c;if(a==null)return'null';var d={'array':Array,'boolean':Boolean,'date':Date,'regexp':RegExp,'string':String,'number':Number,'function':Function};for(var f in d)if((a instanceof d[f])||a.constructor==d[f])return f;return c}function $keys(a,c){var d=[];for(var f in a)if(c||a.hasOwnProperty(f))d.push(f);return d}function $values(a,c){var d=[];for(var f in a)if(c||a.hasOwnProperty(f))d.push(a[f]);return d}function $items(a,c){var d=[];for(var f in a)if(c||a.hasOwnProperty(f))d.push([f,a[f]]);return d}function $class(g,i){var j=arguments.callee;var k=function(){};if(i){k.prototype=new i();k.prototype.constructor=i}var n=function(){var a=arguments.callee.caller;if(a==j||a==n.create)return;if(this.initialize)this.initialize.apply(this,arguments)};n.prototype=new k();$extend(n.prototype,g||{},{constructor:n,proto:n.prototype,base:k.prototype});$extend(n,{create:function(a){var c=new n();if(c.initialize)c.initialize.apply(c,a);return c},subclass:function(a){return j(a,n)},implement:function(d,f){if($type(d)=='string'){n.prototype[d]=f}else{[].slice.call(arguments).each(function(c){if($type(c)=='function')c=new c();$items(c,true).each(function(a){n.prototype[a[0]]=a[1]})})}}});return n}function $pageSize(a){var c={docWidth:___.scrollWidth,docHeight:___.scrollHeight,winWidth:___.clientWidth,winHeight:___.clientHeight,scrollLeft:$$.browser.Safari?__.body.scrollLeft:___.scrollLeft,scrollTop:$$.browser.Safari?__.body.scrollTop:___.scrollTop};if($$.browser.Safari){var d=___.$getStyle();c.docWidth+=parseInt(d.marginLeft)+parseInt(d.marginRight);c.docHeight+=parseInt(d.marginTop)+parseInt(d.marginBottom)}c.docWidth=Math.max(c.docWidth,c.winWidth);c.docHeight=Math.max(c.docHeight,c.winHeight);if(a){var f=a=='win';c.left=f?c.scrollLeft:0;c.top=f?c.scrollTop:0;if($$.browser.Mozilla){var d=___.$getStyle();c.left-=parseInt(d.borderLeftWidth)+parseInt(d.marginLeft);c.top-=parseInt(d.borderTopWidth)+parseInt(d.marginTop)}c.width=f?c.winWidth:Math.max(c.docWidth,c.winWidth);c.height=f?c.winHeight:Math.max(c.docHeight,c.winHeight)}return c}function $animate(i,j,k){if(!i||!i.style)return;i=i.style;var k=$extend({fps:40,duration:400,callback:function(){},reverse:false,fn:function(a){return Math.sin(a*Math.PI/2)}},k||{});var n=$keys(j);var o=n.map(function(a){return/(width|height|left|top)\b/i.test(a)?'px':''});var m=new Date();var s=function(){var a=new Date()-m;if(a>k.duration)a=k.duration;for(var c=0;c<n.length;c++){var d=j[n[c]];var f=k.fn(a/k.duration);var g=k.reverse?d[1]+(d[0]-d[1])*f:d[0]+(d[1]-d[0])*f;if(o[c]=='px')g=Math.round(g);i[n[c]]=g+o[c]}if(a==k.duration){clearInterval(r);if(k.callback)setTimeout(k.callback,Math.round(1000/k.fps))}};var r=setInterval(s,Math.round(1000/k.fps));s();return r}function $animate2(n,o){var o=$merge({fps:40,duration:400,callback:function(){},reverse:false,fn:function(a){return Math.sin(a*Math.PI/2)}},o||{});var m=new Date;var s=function(){var a=new Date-m;if(a>o.duration)a=o.duration;var c=o.fn(a/o.duration);for(var d=0;d<n.length;d++){var f=n[d][0];var g=n[d][1];for(var i in g){var j=g[i];var k=o.reverse?j[1]+(j[0]-j[1])*c:j[0]+(j[1]-j[0])*c;if(j[2]=='px'||j[3])k=Math.round(k);f[i]=k+j[2]}}if(a==o.duration){clearInterval(r);if(o.callback)setTimeout(o.callback,Math.round(1000/o.fps))}return arguments.callee};var r=setInterval(s(),Math.round(1000/o.fps));return r}function $fixE(a){a=_.event||a||arguments.callee.caller.arguments[0];$(a.$target=a.target?(a.target.nodeType&&a.target.nodeType==3?a.target.parentNode:a.target):a.srcElement);return a}function $stopEvent(a,c){a=$fixE(a);c=c||0;if(c>=0)a.preventDefault?a.stopPropagation():(a.cancelBubble=true);if(c!=0)a.preventDefault?a.preventDefault():(a.returnValue=false)}function $getUid(){return"uid_"+(new Date()).getTime()+Math.random().toString().substr(2,5)}function $c(a){if(a.constructor==Array)return $(__.createTextNode(a.join("\n")));else return $(__.createElement(a))}var $createElement=$c;function $toJson(c){if(c===null)return'null';if(typeof c=='undefined')return'undefined';switch(c.constructor){case Object:var d=[],f;for(var g in c)d.push($toJson(g)+":"+$toJson(c[g]));return"{"+d.join(",")+"}";case Array:return"["+c.map(function(a){return $toJson(a)}).join(",")+"]";case String:return"\""+c.replace(/([\n\r\\\/\'\"])/g,function(a){return{"\n":"\\n","\r":"\\r"}[a]||"\\"+a})+"\"";case Date:return"new Date("+c.getTime()+")";case Number:case Boolean:case Function:case RegExp:return c.toString();default:return"null"}}function $fromJson(a){var c;var d=null;try{d=eval("("+a+")")}catch(e){$trackEvent('tuna-error','$fromJson',$error(e),$tunaVersion())};return d}function $pageValue(){return $pageValue.get.apply(_,arguments)}$pageValue.set=function(a,c,d){d=d||$$.history.current;if(!(d in $$.status.pageValue.data))$$.status.pageValue.data[d]={};$$.status.pageValue.data[d][a]=c;if($$.browser.Opera)$savePageValue()};$pageValue.get=function(a,c){var d=$$.status.pageValue.data[c||$$.history.current];return d&&a in d?d[a]:null};$pageValue.del=function(a,c){var d=$$.status.pageValue.data[c||$$.history.current];if(d){delete d[a];if($$.browser.Opera)$savePageValue()}};function $savePageValue(){$$.status.saveStatus.value=$toJson($$.status.pageValue)}function $saveHistory(){var a=[];for(var c in $$.history.info){var d=$$.history.info[c];if(d.constructor==Array&&d.length==4){var f=[c];for(var g=0;g<d.length;g++)f.push(escape(d[g]||""));a.push(escape(f.join("|")))}}$$.status.pageValue["historyInfo"]=a.join("|");$$.status.pageValue["historyCount"]=$$.history.count;if($$.history.frame)$$.status.pageValue["lastHistory"]=$$.history.frame.location.href;$savePageValue()}function $globalValue(){}function $getQuery(a){var c=(location.search||"").match(new RegExp("[\\?&]"+a+"=([^&]+)","i"));return c?unescape(c[1]):null}function $loadJs(d,f,g,i){var j=arguments.callee;var k=j.queue||(j.queue={});var n=null;if(!(d in k)){k[d]=[];if(g){n=m();k[d].push(g)}}else{if(g){if(k[d]){n=m();k[d].push(g)}else{g()}}return}var o=document.createElement('script');o.type='text/javascript';o.charset=f||$$.status.charset;o.onload=o.onreadystatechange=function(){if(o.readyState&&o.readyState!='loaded'&&o.readyState!='complete')return;if(n)clearTimeout(n);o.onreadystatechange=o.onload=null;while(k[d].length)k[d].shift()();k[d]=null};o.src=d;__.getElementsByTagName('head')[0].appendChild(o);function m(){var a=k[d];var c=a.length;if(g&&i){return setTimeout(function(){if(g(true)!==true)a.splice(c,1)},i)}}}function $loadCss(a,c){if($$.browser.IE)__.createStyleSheet(a).charset=c||_.$$.status.charset;else{var d=_.__.createElement("link");with(d){type="text\/css";rel="stylesheet";href=a}__.$("head")[0].appendChild(d)}}function $getCookie(a,c){var d=__.cookie.match(new RegExp("(?:^|;)\\s*"+encodeURIComponent(a)+"=([^;]+)"));if(c===false)return d?d[1]:null;if(d&&c)d=d[1].match(new RegExp("(?:^|&)\\s*"+encodeURIComponent(c)+"=([^&]+)"));return d?decodeURIComponent(d[1]):null}function $delCookie(a,c){if(c){var d=$getCookie(a,false);if(d===null)return;d=d.replace(new RegExp("(^|&)\\s*"+encodeURIComponent(c)+"=[^&]+"),"").replace(/^\s*&/,"");if(d){__.cookie=encodeURIComponent(a)+"="+d;return}}var f=new Date();f.setTime(f.getTime()-1);__.cookie=encodeURIComponent(a)+"=;expires="+f}function $setCookie(a,c,d){if(!d){d=c;c=null}var f=($$.cookie.domain?"; domain="+$$.cookie.domain:"")+"; path="+($$.cookie.path||"/")+($$.cookie.expires?"; expires="+new Date((new Date()).getTime()+$$.cookie.expires*3600000).toGMTString():"");if(c){var g=$getCookie(a,false)||"";if(g)g=(g+"&").replace(new RegExp("(^|&)\\s*"+encodeURIComponent(c)+"=[^&]+&"),"$1");__.cookie=encodeURIComponent(a)+"="+g+encodeURIComponent(c)+"="+encodeURIComponent(d)+f}else __.cookie=encodeURIComponent(a)+"="+encodeURIComponent(d)+f}function $init(a){if(a)$topWin.$$.module.init.push(a);else $topWin.$$.module.init.each()}function $parserRe(d){var f=[];var g=/<[^>]+\smod=[\'\"]?([\w|]+)[^>]+/g;var i=/\sid=[\'\"]?([^\s>'"]+)/i;var j=null;var k=null;var n=null;(d&&d.innerHTML?d:__.body).innerHTML.replace(g,function(a,c){try{if(c=="jmpInfo"){}else if((k=a.match(i))&&(n=$(k[1]))){if(c in Ctrip.module)new Ctrip.module[c](n);else f.push(n)}}catch(e){$t("parserRe函数错误:"+func.toString().slice(0,50)+"...","red");$trackEvent('tuna-error','$parserRe',$error(e),$tunaVersion())};return""});var o=setInterval(function(){var a=f.shift();if(a)$topWin.$d(a);else clearInterval(o)},50)}function $d(c){($(c).getAttribute("mod")||"").replace(/\w+/ig,function(a){if(Ctrip.module[a]){new Ctrip.module[a](c)}else{$t("错误:元素["+(c.id||c.tagName)+"]引用未知模块["+a+"]","red");$trackEvent('tuna-error','$d',[c.id||c.tagName,a].join('; '),$tunaVersion())}})}var $dealElement=$d;function $i(i){var j=$$.access[i];if(j)return j;else{j=new function(){var f=[],g=[];this.get=function(){var a=j.value;for(var c=0;c<f.length;c++){var d=f[c].call(a);if(typeof d!='undefined')a=d}return a};this.set=function(a){for(var c=0;c<g.length;c++){var d=g[c].call(a);if(typeof d!='undefined')a=d}return j.value=a};this.regGet=function(a){if(!a)f=[];else f.push(a);return};this.regSet=function(a){if(!a)g=[];else g.push(a);return}}}return $$.access[i]=j}function $fixElement(f){function g(a,c,d){if('attachEvent'in a)a.attachEvent('on'+c,d);else a.addEventListener(c,d)}function i(a){a=a.getElementsByTagName('input');for(var c=0;c<a.length;c++)if(/checkbox|radio/.test(a[c].type))return a[c];return null}function j(a){if(!a)a=window.event;return a.srcElement||a.target}function k(a){var c=a._for;if(c){a.htmlFor=c.id||(c.id=$getUid());a._for=null}var d=a.style;d.borderBottom='#aaa 1px dashed';d.paddingBottom='0px';d.color='#1E1A75'}function n(a){var c=a.style;c.borderBottom='';c.paddingBottom='';c.color=''}f=f&&f.nodeType?f:_.__;if($$.browser.IE6){var o=f.getElementsByTagName("label");for(var m=0;m<o.length;m++){var s=i(o[m]);if(s&&/checkbox|radio/.test(s.type))(function(lbl,box){lbl._for=box;g(lbl,'mouseover',function(){k(lbl)});g(lbl,'mouseout',function(){n(lbl)})})(o[m],s)}}if($$.browser.IE){var r=f.getElementsByTagName("select");for(var m=0;m<r.length;m++)r[m].onmousewheel=function(){return false}}}function $removeTextNode(a){if(!a)return;var c=a.firstChild,d;while(c){d=c.nextSibling;if(c.nodeType==3){if(!c.nodeValue.trim())a.removeChild(c)}else $removeTextNode(c);c=d}return a}function $ajax(d,f,g,i){var j=["MSXML2.XMLHTTP","Microsoft.XMLHTTP"],k;try{k=new XMLHttpRequest()}catch(e){for(var n=0;n<j.length;n++)try{k=new ActiveXObject(j[n]);break}catch(e){}}if(!k){$trackEvent('tuna-error','$ajax','xmlObj creation failure',$tunaVersion());return}k.open(f?"POST":"GET",d||location.href,!!g);k.setRequestHeader("Content-Type","application\/x-www-form-urlencoded");k.setRequestHeader("If-Modified-Since",new Date(0));function o(){if($$.history.enabled&&i){$$.history.init();var c="ajaxHistory_"+$$.history.count++;$$.history.current=c;(function(){if($$.history.isReady){var a=$$.history.info[c]=[i,k.status==200?k.responseText:null,d,f];if($$.history.isFirefox2)location.hash=c;else $$.history.frame.location.href=$$.history.blank+($$.browser.IE?"?"+!($$.history.count%2):"")+"#"+c;if($$.browser.Opera)$saveHistory();$t("[history]增加历史:"+a[0]+"/"+c,"green",a.slice(1).join("\n"))}else setTimeout(arguments.callee,50)})()}return(k.status==200?(/xml/i.test(k.getResponseHeader("content-type"))?k.responseXML:k.responseText):null)}if(g)k.onreadystatechange=function(){if(k.readyState==4){var m=o();if(g(m)===true){setTimeout(function(){$ajax(d,f,g)},1000)}}};k.send(f||"");return g?k:o()}function $showDebug(a){var c=a.keyCode||a.charCode;if($$.status.debug&&c==192){var d=$getDebug();if(d&&(d=d.frameElement))d.style.display=d.style.display==""?"none":""}}function $getDebug(){var a=$topWin.frames["Ctrip_debug"];if(a)return a;with(a=$topWin.$c("iframe")){frameBorder=0;id=name="Ctrip_debug";with(style){border="1px solid red";width="600px";height="300px";position=$$.browser.IE6?"absolute":"fixed";bottom=right="10px";background="white"}}$topWin.$$.status.container.appendChild(a);if($$.browser.IE6)$topWin.$r("scroll",function(){with($("Ctrip_debug").style){zoom=1;zoom=0}});with((a=$getDebug()).document){open();write("<style>body{margin:0;padding:0;font-family:Arial;font-size:12px;overflow:scroll;}div{border-bottom:1px solid #CCC;}<\/style><body><\/body>");close()}$topWin.__.$r("keydown",$showDebug);return a}function $t(a,c,d){if(!$topWin.$$.status.debug)return;if(_!=$topWin)return $topWin.$t(a,c);var f=$getDebug();var g=new Date().getTime()%(1E7);var i="<font id=\"msg_"+g+"\"> "+a+"<\/font>";var j=f.document.createElement("div");if(c)j.style.color=c||"black";if(d)j.title=d;j.innerHTML="<font style=\"color:blue;\">"+g+"<\/font> "+i;with(f.document.body){if(firstChild)insertBefore(j,firstChild);else appendChild(j)}return a}function $alert(a,c,d,f,g){a=$(a);var i=$("alertInfo"),j=$("alertTable"),k=1;i.innerHTML=c;$topWin.$$.status.alertDiv.style.display="";$topWin.$$.status.alertDiv.$setPos(a,f||"tl",g||"tr");$topWin.$$.status.alertDiv.$setIframe();a.className+=" pubGlobal_checkinfo_input01";if(d!==false)a.$setDisplay();function n(){a.className=a.className.replace("pubGlobal_checkinfo_input01","");$topWin.$$.status.alertDiv.style.display="none";$topWin.$$.status.alertDiv.$clearIframe();a.$ur("onblur",n);__.body.$ur("onmousedown",n);a.clearAlert=null;$alert.element=null}if(a.disabled)k=0;else setTimeout(function(){try{a.focus()}catch(e){k=0}},0);if(k)a.$r("onblur",n);else __.body.$r("onmousedown",n);$alert.element=a;a.clearAlert=n}function $toQuery(a,c){var d=[];for(var f in a)if(a.hasOwnProperty(f))d.push([f,c?c(a[f]):a[f]].join('='));return d.join('&')}function $fromQuery(a,c){var d=a.split('&');var f={};for(var g=0;g<d.length;g++){var i=d[g].split('=');if(i.length>1)f[i[0]]=c?c(i.slice(1).join('=')):i.slice(1).join('=')}return f}function $trackEvent(c,d,f,g){var i=(arguments.callee._cnt||(arguments.callee._cnt={tuna_total:0,other_total:0}));if(c=='tuna-error'){if(i.tuna_total>=20)return;var j=c+'.'+d;if(i[j]&&i[j]>=5)return;i[j]=(i[j]||0)+1;++i.tuna_total}else{if(i.other_total>=80)return;++i.other_total}var k=['http://www.',/\.ctrip\.com$/.test(document.domain)?'ctrip':'dev.sh.ctriptravel','.com/rp/uiServer2.asp'].join('');var n=$toQuery({'action':'event','p':window.UIMonitor2&&window.UIMonitor2.bi&&window.UIMonitor2.bi.pageview_id||'','u':document.URL,'c':c,'l':f,'a':d,'v':g,'t':new Date*1},function(a){return encodeURIComponent(escape(a))});new Image().src=k+'?'+n}function $error(a){if(!a)return"";var c,d,f,g;if(a.message){if($$.browser.Opera){var i=transErrMessage(a.message);c="";d=this.transed[2];f=this.transed[1];g=this.transed[3].match(/.+((?:file:|http:)[^\s]+?)\s+.+/i)[1]}else{c=a.name||'';d=a.message||"";f=a.lineNumber||a.line||"";g=a.fileName||a.sourceURL||""}}else if(!a.message&&(arguments[2]||arguments[2]==0)){d=a;c="";f=arguments[2];g=arguments[1]}return[c,d,f,g].join('|')}function transErrMessage(a){var c=[];c=a.match(/Statement[^\d]+(\d+)\:([\s\S]+)Backtrace\:([\s\S]+)/);return c}function $tunaVersion(){var a=arguments.callee;if(!a._val){a._val=-1;for(var c=document.getElementsByTagName('script'),d=c.length-1;d>=0;d--){var f=c[d].src.match(/\/tuna_(\d+).js$/i);if(f){a._val=parseInt('20'+f[1]);a._offline=/\/webresint\.sh\.ctriptravel\.com\//i.test(c[d].src);a._english=/\/webresource\.english\.ctrip\.com\//i.test(c[d].src);break}}}return a._val}function $isOnline(){$tunaVersion();return!$tunaVersion._offline&&!$tunaVersion._english}function $webresourceUrl(a){$tunaVersion();var c=['ource.ctrip','ource.english.ctrip','int.sh.ctriptravel'];var d=$tunaVersion._offline?2:$tunaVersion._english?1:0;return'http://webres'+c[d]+'.com'+a}function $picUrl(a){$tunaVersion();var c=['.ctrip','.english.ctrip','int.sh.ctriptravel'];var d=$tunaVersion._offline?2:$tunaVersion._english?1:0;return'http://pic'+c[d]+'.com'+a}var c_linklist={};var c_allyes_text={};var c_allyes_delay=1000;var DOM=function(){if(!this||this.nodeType==3||this.$)return this;this.module={};this.module.event={};function y(a){return(a.toString().match(/function([^\{]+)/i)||["","anonymous"])[1].replace(/\(\)/,"").trim()||"anonymous"}function p(a){var c="["+a.event+"] ";c+=a.obj.tagName||{3:a.obj.nodeValue,9:"document"}[a.obj.nodeType||""]||"window";c+=a.obj.id?"#"+a.obj.id:(a.obj.name?"@"+a.obj.name:"");c+=" "+y(a.func);return c}function A(g){return function(a){a=$fixE(a);var c=g.module.event[a.type],d;for(var f=0;f<c.length;f++){if(c[f].enabled){try{d=c[f].func.call(g,a);if($topWin.$$.status.debugEvent)$t(p(c[f])+" ("+(typeof d=="undefined"?"无返回值":d.toString().slice(0,100))+")",null,c[f].func);if(d===false)break}catch(ex){$t(p(c[f])+" (执行错误)","red",c[f].func);$trackEvent('tuna-error','DOM.execEvent',$error(ex),$tunaVersion())}}else{c.splice(f,1);f--}}return d}}if(this.__)this.$=function(objId,flag){if(typeof objId=="object")return DOM.apply(objId);var w;if(flag){var l=___.innerHTML.match(new RegExp("\\sid=([\\\'\\\"]?)([\\w$]+?[_$]"+objId.toReString()+")\\1"),"g");if(l){for(var z=0;z<l.length;z++){w=$(l[z]);if(w)return w}}return $(objId)}else w=__.getElementById(objId);return w?$(w):null};else this.$=function(f){var g=this.getElementsByTagName(f);g.$each=function(a){var c;if(g.length!==undefined)for(var d=0;d<g.length&&(c=a.call(this,g[d],d))!==false;d++);else a.call(this,g,0);return c===false?0:1};for(var i=0;i<g.length;i++)$(g[i]);return g};if(this.nodeType==1){if(this.tagName=="INPUT"&&/^(text|hidden)$/i.test(this.type)||this.tagName=="TEXTAREA")this.isNull=function(){return!this.value.trim()};if(/^SELECT$/.test(this.tagName))this.$setValue=function(value){for(var z=0;z<this.options.length;z++){if(this.options[z].value==value){this.selectedIndex=z;return true}}return false}}if(!this.hasAttribute)this.hasAttribute=function(str){return typeof this.attributes[str]!="undefined"};this.$parentNode=function(a){var c=$(this.parentNode);if(a&&c&&c.tagName&&c.tagName.toLowerCase()!=a.toLowerCase())c=c.$parentNode(a);return c&&c.tagName?c:null};this.$firstChild=function(){return $(this.firstChild)};this.$lastChild=function(){return $(this.lastChild)};this.$childNodes=function(){var a=this.childNodes;for(var c=0;c<a.length;c++)$(a[c]);return a};this.$nSib=this.$nextSibling=function(){return $(this.nextSibling)};this.$pSib=this.$previousSibling=function(){return $(this.previousSibling)};this.$click=function(){if(this.click)this.click();else{var a=__.createEvent("MouseEvents");a.initMouseEvent("click",true,true,_,0,0,0,0,0,false,false,false,false,0,this);this.dispatchEvent(a)}};this.$getStyle=function(a){var c=this.currentStyle||_.getComputedStyle(this,null);return a?c[a]:c};this.$getPara=function(){var a,c=(a=this.getAttribute(arguments[0])||"").split(a.indexOf("")>-1?"":"|");for(var d=0;d<Math.max(arguments.length-1,c.length);d++)c[d]=c[d]||arguments[d+1]||"";return c};this.$r=this.$regEvent=function(i,j,k,n){n=n||50;if(arguments.length==3&&typeof k=="number"){n=k;k=null}var o=this;if(i.constructor!=Array)i=[i];if(j.constructor!=Array)j=[j];i.each(function(g){j.each(function(d){g=g.replace(/^(on)?/i,"");g=g=="DOMContentLoaded"?"domready":g.toLowerCase();if(g=="domready")o=_;var f={enabled:true,obj:o,event:g,func:d,hash:k,level:n,id:_.$$.status.regEventCount++};if(g=="domready"&&$$.status.domReady||g=="load"&&(o==_||o==__.body)&&$$.status.load)d();else{if(!(g in o.module.event)){o.module.event[g]=[];if(o.attachEvent)o.attachEvent("on"+g,A(o));else o.addEventListener(g,A(o),false)}o.module.event[g].push(f);o.module.event[g].sort(function(a,c){return(a.level-c.level)||(a.id-c.id)})}if(k){if(!(k in $$.status.regEventHash))$$.status.regEventHash[k]=[];$$.status.regEventHash[k].push(f)}})})};this.$ur=this.$unregEvent=function(g,i,j){var k=this;if(g.constructor!=Array)g=[g];if(i.constructor!=Array)i=[i];g.each(function(f){i.each(function(a){f=f.replace(/^(on)?/i,"");f=f=="DOMContentLoaded"?"domready":f.toLowerCase();if(f=="domready")k=_;if(f in k.module.event){var c=k.module.event[f];for(var d=0;d<c.length;d++){if(c[d].enabled&&c[d].func==a&&(!j||c[d].hash==j)){c[d].enabled=false;break}}if(!c.length){delete k.module.event[f];if(k.detachEvent)k.detachEvent(f,A);else k.removeEventListener(f,A,false)}}})})};this.$urh=this.$unregEventHash=function(a){var c=this;if(a in $$.status.regEventHash){var d=$$.status.regEventHash[a],f;while(f=d.shift())f.obj.$ur(f.event,f.func,a);delete $$.status.regEventHash[a]}};this.$getWin=function(){var a=this.ownerDocument;return a.parentWindow||a.defaultView};this.$g=this.$selNode=function(F){function D(n,o){var m=[],s=n.match(/^([\.\#]*)([a-zA-Z0-9\-_*]+)(.*)$/i);if(!s)return[];if(s[1]=="#"){var r=$(s[2]);if(r)m.push(r)}else if(s[1]==".")o.each(function(w){w.$("*").$each(function(a){if(new RegExp("\\b"+s[2]+"\\b").test(a.className))m.push($(a))})});else for(var u=0;u<o.length;u++){var r=o[u].$(s[2]);if(r)for(var h=0;h<r.length;h++)m.push(r[h])}s[3].replace(/\[([^!=]+)(=|!=)([^\]]*)\]/gi,function(f,g,i,j){var k=m.slice(0);m=[];k.each(function(a){g={"class":"className","for":"htmlFor"}[g]||g;var c=a[g]||a.getAttribute(g);var d;if(g=="className")d=new RegExp("\\b"+j+"\\b").test(c);else d=c==j;if((i=="=")==d)m.push($(a))})});return m}var M=[this==_?_.__.body:this],E=[],G=[];F.replace(/[^\[,]([^\[,]*(\[[^\]]*\])*)+/g,function(c){var d=M.slice(0);c.replace(/(#|\*)/gi," $1").replace(/([^\^ ])\.(\w+)/gi,"$1[className=$2]").trim().split(/\s+/g).each(function(a){d=D(a,d)});E=E.concat(d)});E.each(function(a){if(!a.__selNodeFlag__){a.__selNodeFlag__=true;G.push(a)}});G.each(function(a){a.__selNodeFlag__=false});return G.length==0?null:G};this.$getPos=function(){var f=this,g=this,i,j=[0,0],k,n={"thin":2,"medium":4,"thick":6};function o(){if(f==g)return;function d(a){var c=/^(none|hidden)$/i.test(g.$getStyle("border"+a+"Style"))?0:g.$getStyle("border"+a+"Width");return n[c]||parseInt(c,10)||0}j[0]+=d("Left");j[1]+=d("Top")}do{i=$(g).$getWin();if(g.tagName.match(/^(iframe|frameset)$/i))o();k=-1;do{j[0]+=g.offsetLeft-g.scrollLeft;j[1]+=g.offsetTop-($$.browser.Safari&&g==i.document.body?0:g.scrollTop);if($$.browser.IE)o();if(!$$.browser.IE6&&g.$getStyle("position")=="fixed")k=1}while(g.offsetParent&&g!=g.offsetParent&&(g=$(g.offsetParent))&&g!=_.___);if($$.browser.Safari){j[0]+=i.__.body.leftMargin||0;j[1]+=i.__.body.topMargin||0}if(k==1||i!=$topWin){j[0]+=i.___.scrollLeft*k;j[1]+=i.___.scrollTop*k}if(i==$topWin)break}while(g=i.frameElement);return j};this.$setPos=function(k,n,o){function m(g,i){function j(a,c,d,f){return d+{"l":0,"c":c.offsetWidth/2,"r":c.offsetWidth,"t":0,"m":c.offsetHeight/2,"b":c.offsetHeight}[a||"l"]*f}return j(n.match(g),this,j(o.match(g),k,s[i],1),-1)+"px"}var s=k.$getPos();n=n||"lt";o=o||"lb";this.style.left=m.call(this,/[lcr]/i,0);this.style.top=m.call(this,/[tmb]/i,1)};this.$setIframe=function(c){if(c!==true&&!$$.browser.IE6)return;if(this.module.iframe)f=this.module.iframe;else{function d(){for(var a=0;a<$topWin.$$.module.iframe.length;a++){if($topWin.$$.module.iframe[a].$getStyle("display")=="none")return $topWin.$$.module.iframe[a]}}var f=d();if(!f){f=$topWin.$c("iframe");with(f.style){width=height="0px";background="#FFF";position="absolute";display="none";zIndex=100}f.frameBorder=0;f.id=f.name=$getUid();$topWin.$$.status.container.appendChild(f);$topWin.$$.module.iframe.push(f);with($topWin.frames[f.id].document){open();write('<style>html,body{overflow:hidden}</style>');close()}}this.module.iframe=f}f.$setPos(this,"tl","tl");with(f.style){width=this.offsetWidth+"px";height=this.offsetHeight+"px";display=""}return f};this.$clearIframe=function(){var a=this.module.iframe;if(a){a.style.display="none";this.module.iframe=null}return a};function I(a,c,d){if(!a)return null;c=c||"n";var f=new RegExp(({1:"n",3:"t",8:"c"}[a.nodeType])||"o","i");return c.match(f)?a:d.call(a,c)}this.$nAbs=function(a){var c=this,d=c.firstChild||c.nextSibling;if(!d)do{c=c.parentNode;if(c==__.body)return null;d=c.nextSibling}while(!d);return $(I(d,a,arguments.callee))};this.$pAbs=function(a){if(this==__.body)return null;var c=this.previousSibling;if(c){while(c.lastChild)c=c.lastChild}else c=this.parentNode;return $(I(c,a,arguments.callee))};this.$focusNext=function(){if(!this.form)return;try{this.blur()}catch(e){};var a=this.form.elements,c;for(var d=0;d<a.length;d++){if(c){if(!$(a[d]).disabled&&a[d].$isDisplay())try{a[d].focus();return}catch(e){}}if(a[d]==this)c=true}};this.$setDisplay=function(){var a=this.$getPos();with($topWin.___){scrollLeft=a[0]-80;scrollTop=a[1]-80}};this.$isDisplay=function(){var a=this;do{if(a.tagName=="INPUT"&&a.type=="hidden"||a.$getStyle("display")=="none"||a.$getStyle("visibility")=="hidden")return false}while((a=a.$parentNode())&&a.nodeType==1);return true};return this};DOM.apply(_);DOM.apply(__);DOM.apply(___);DOM.apply($$.status.alertDiv);Ctrip.module.linklist=function(a){var c=a.getAttribute('mod_linklist_class');if(c===null)c='pubSidebar_linkmargin01';var d='<a class="'+c+'" href="{$link}" title="{$text}" target="{$target}">{$text}</a>';var f=a.getAttribute('mod_linklist_id');if(!f||!(f=window.c_linklist[f])||f.constructor!==Array)return;for(var g=0;g<f.length;g++){var i=f[g].split('|',2);f[g]=d.replaceWith({text:$s2t(i[0]),link:i[1],target:f[g].target||'_blank'})}a.innerHTML=f.join('')};Ctrip.module.allyes=function(f){var g=m("user")||m("mod_allyes_user");if(!g){var i=m('mod_allyes_buttons',window);var j=m('mod_allyes_text',window.c_allyes_text);if(!i&&!j)return}var k='<div class="base_ad140x60" style="height:{$height}px">{$iframe}<\/div>';var n='<div class="base_adtxt140">{$text}<\/div>';var o='<iframe marginheight="0" width="100%" height="100%" marginwidth="0" frameborder="0" scrolling="no" src="http:\/\/allyes.ctrip.com\/main\/adfshow?user={$user}&db=ctrip&border=0&local=yes"><\/iframe>';setTimeout(function(){if(g){if(g.indexOf('@')>-1)g=s(g.split('@'));f.innerHTML=o.replace('{$user}',g)}else{var a=[];if(i)a=i.map(function(b){b.button=b.button||';';return k.replace('{$height}',b.height).replace('{$iframe}',o.replace('{$user}',b.user))});if(j)a.push(n.replace('{$text}',$s2t(j)));f.innerHTML=a.join('')}},window.c_allyes_delay);function m(a,c){var d=f.getAttribute(a);if(!d)return null;if(c)return c[d]||null;else return d}function s(a){var c=/^(SearchFlights\.aspx|SearchHotels\.aspx|query\.asp)$/i;var d=location.pathname;d=d.slice(d.lastIndexOf('/')+1);return c.test(d)?a[0]:a[1]}};Ctrip.module.notice=function(a){var c;a.module.notice=new function(){this.enabled=true;this.tip=a.getAttribute("mod_notice_tip")||"";this.check=function(){if(a.module.notice.enabled){with(a){if(isNull()){style.color="gray";value=module.notice.tip}else style.color=""}}};this.isNull=a.isNull=function(){return a.value.trim()==""||a.value==a.module.notice.tip}};a.$r("focus",function(){c=true;if(a.module.notice.enabled){a.style.color="";if(a.value==a.module.notice.tip)a.value=""}},10);a.$r("blur",function(){c=false;a.module.notice.check()},90);if(a.form){var d=$(a.form);d.$r("submit",function(){if(a.isNull())a.value="";setTimeout(function(){if(!c)a.module.notice.check()},1)});if(!$$.browser.Opera)_.$r("beforeunload",a.module.notice.check)}a.module.notice.check()};Ctrip.module.tab=function(g){var i=_.$g(g.getAttribute("mod_tab_button")||"");var j=_.$g(g.getAttribute("mod_tab_panel")||"");var k=parseInt(g.getAttribute("mod_tab_select")||1,10);var n=((g.getAttribute("mod_tab_event")||"").match(/^mouseover$/i)||"click").toString();if(!i||!j)return;g.module.tab=new function(){this.funcListHash={};this.select=function(a){if(this.funcListHash[a-1])this.funcListHash[a-1]()};this.index=k};i.each(function(d,f){g.module.tab.funcListHash[f]=function(){i.each(function(a,c){a.className=a.className.replace(/_(no)?current/g,"_"+(f==c?"":"no")+"current");if(j[c])j[c].style.display=(f==c)?"":"none"});g.module.tab.index=f+1};d.$r(n,g.module.tab.funcListHash[f])});g.module.tab.select(k)};Ctrip.module.display=function(j){var k=j.$getPara("mod_display_panel"),n=[];k.each(function(a){a=_.$(a)||_.$selNode(a);if(a){if(a.length)a.each(function(a){n.push(a)});else n.push(a)}});j.$r("click",function(){(function(f){for(var g=0;g<f.childNodes.length;g++){with(f.childNodes[g]){if(nodeType==3){var i=new RegExp($$.string.display.match(/[^@]+/g).join("|"),"gi");nodeValue=nodeValue.replace(i,function(a){var c=new RegExp("@"+a+"\\|([^@]+)|([^@]+)\\|"+a+"@","i");var d=$$.string.display.match(c);return d[1]||d[2]})}else arguments.callee(f.childNodes[g])}}})(j);n.each(function(a){a.style.display=a.$getStyle("display")=="none"?"":"none"})})};Ctrip.module.selectAll=function(d){var f=$selNode(d.getAttribute("mod_selectAll_input")||"");if(!f)return;f.each(function(c){if(c!=d)c.$r("onclick",function(){d.checked=f.each(function(a){if(a!=d&&!a.checked)return false})})});d.$r("click",function(){f.each(function(a){a.checked=d.checked})})};Ctrip.module.validate=function(a){var c=_.$(a.getAttribute("mod_validate_true")||"");var d=_.$(a.getAttribute("mod_validate_false")||"");var f=a.getAttribute("mod_validate_function")||"";if(!f)return;var g=f.match(/^\/(.*?[^\\])\/([gmi]*?)$/);var i,j,k;f=a[f]||_[f];if(g||f){a.module.validate=new function(){this.check=function(){if(a.value||!c&&!d)k=!(j=f?f(a.value,a):a.value.match(new RegExp(g[1],g[2])));else j=k=false;if(c)c.style.display=j?"":"none";if(d)d.style.display=k?"":"none"}};a.$r("focus",function(){i=setInterval(a.module.validate.check,200)});a.$r("blur",function(){a.module.validate.check();clearInterval(i)})}};$$.module.jmpInfo=(function(){var r=function(a){var c=$(a).$getPos();return{x:c[0],y:c[1]}};var u=function(a,c){if(!a)return;var d=a.style,f,g;if(c){f=c.x+'px';g=c.y+'px'}else{f='-10000px';g='-10000px'}if(d.display!='block')d.display='block';if(d.left!=f)d.left=f;if(d.top!=g)d.top=g};var h={logging:false,coloring:false,animating:false,fading:false,current:null,next:null,popup:null,ani_box:null,log_box:null,timers:{show:300,hide:100,refresh:200},array:{},template:{},css_loaded:false,load_timeout:3000,template_dir:$webresourceUrl('/code/js/resource/jmpInfo_tuna/'),data_dir:$webresourceUrl('/code/js/resource/jmpInfo_tuna/'),common_callback:null,log:function(){if(!h.logging)return;var a=[].slice.call(arguments,0);if(window.console){console.log(a.join(' '))}else{if(!h.console_box)h.console_box=h.make_box({left:'50%',top:'0px',font:'normal 12px/16px verdana',color:'red',border:'1px solid gray',padding:'4px'});h.console_box.appendChild(document.createElement('div')).innerHTML=a.join(' ').replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/\r\n?|\n/g,'<br />')}},color:function(a,c){if(h.coloring){a.style.backgroundColor=c;a.style.borderColor=c=='red'?'#000':''}},init:function(){h.popup=$("tuna_jmpinfo")||$('z1');h.popup.style.visibility='visible';u(h.popup,null);document.documentElement.$r('mouseover',h.mouseover)},test:function(a){return a.getAttribute('mod')&&/(\||^)jmpInfo(\||$)/.test(a.getAttribute('mod'))},mouseover:function(a){var c=a||window.event;var d=c.target||c.srcElement;if(d==h.ani_box)return;if(h.current){if(h.parent_of(h.current,d)||h.parent_of(h.popup,d)){h.clear_timer('hide');h.color(h.current,'red');return}h.set_hide();h.set}if(h.next){if(h.parent_of(h.next,d))return;h.clear_timer('show');h.color(h.next,'')}h.next=null;if(h.test(d))h.set_show(d)},make_box:function(a){var c=document.createElement('div');var d=[];a=$merge({position:'absolute',left:'-1000px',top:'-1000px'},a);for(var f in a)d.push(f+':'+a[f]);c.style.cssText=d.join(';');return document.body.appendChild(c)},set_show:function(a){h.next=a;h.set_timer('show');h.color(h.next,'pink');h.getInfo(h.next);h.fire_event('before-show',h.next)},set_hide:function(a){h.set_timer('hide');h.color(h.current,'yellow');h.fire_event('before-hide',h.current)},set_timer:function(a,c){var d=h.timers;if(!d['h_'+a]){d['h_'+a]=(!c?setTimeout:setInterval)(h['fn_'+a],d[a]);if(c)h['fn_'+a]()}},clear_timer:function(a,c){var d=h.timers;d['h_'+a]=(!c?clearTimeout:clearInterval)(d['h_'+a])&&null},change_state:function(a){if(a){if(!h.next){h.log('fn_show: J.next is null');return}h.clear_timer('show');h.current=h.next;h.next=null;h.color(h.current,'red');h.set_timer('refresh',true);h.fire_event('show',h.current);h.popup.$setIframe()}else{if(!h.current){h.log('fn_hide: J.current is null');return}h.clear_timer('hide');h.clear_timer('refresh',true);if(h.fading)h.fade(true,h.popup,true);else if(h.animating)h.animate(true,r(h.popup),true);else u(h.popup,null);h.color(h.current,'');h.fire_event('hide',h.current);h.popup.$clearIframe();h.current=null}},fn_show:function(a){h.change_state(true)},fn_hide:function(a){h.change_state(false)},fn_refresh:function(){if(!h.current){h.log('J.current lost');return}var a=h.getInfo(h.current);if(a.ready){h.set_html(h.popup,h.makeHtml(a));var c=h.set_pos(h.current,h.popup,a.position);if(h.animating)h.animate(true,c);else if(h.fading)h.fade(true,h.popup)}},parent_of:function(a,c){if(!a||!c)return false;while(c&&a!=c)c=c.parentNode;return a==c},view_port:function(){var a=$pageSize('win');a.right=a.left+a.width;a.bottom=a.top+a.height;return a},animate:function(a,c,d){if(!h.ani_box)h.ani_box=h.ani_box=h.make_box({border:'1px solid #999'});if(a===true){if(!d==h.animate__)return;h.animate__=!d;h.popup.style.visibility='hidden';var f=r(h.current);$animate(h.ani_box,{left:[f.x,c.x],top:[f.y,c.y],width:[h.current.offsetWidth,h.popup.offsetWidth],height:[h.current.offsetHeight,h.popup.offsetHeight]},{duration:240,callback:h.animate,reverse:d})}else{h.popup.style.visibility='visible';u(h.ani_box,null)}},fade:function(a,c,d){if(a===true){if(!d==h.fade__)return;h.fade__=!d;$animate(c,{opacity:[0,1]},{duration:240,callback:d?h.fade:function(){},reverse:d})}else{u(h.popup,null)}},set_html:function(a,c){if(h.current_html==c)return;a.innerHTML=h.current_html=c;$parserRe(a);var d=a.style;d.overflow='visible';d.width='';d.width=a.scrollWidth+'px';d.height='';d.height=a.scrollHeight+'px'},set_pos:function(a,c,d){if(!a||!c){return null}if(!a.offsetWidth||!a.offsetHeight){u(c,null);if(c.$clearIframe)c.$clearIframe();return null}else{var f=h.calc_pos(a,c,d);u(c,f);if(c.$setIframe)c.$setIframe();return f}},calc_pos:function(a,c,d){if(d&&d.length==4){for(var f=0,g=[];f<d.length;f++){g[f]=/[lt]/.test(d[f])?0:/[rb]/.test(d[f])?1:0.5}var i=[{x:c.offsetWidth*g[0],y:c.offsetHeight*g[1]},{x:a.offsetWidth*g[2],y:a.offsetHeight*g[3]}];var j=r(a);return{x:j.x+i[1].x-i[0].x,y:j.y+i[1].y-i[0].y}}else{var j=r(a);var k=h.view_port();var n={x:a.offsetWidth,y:a.offsetHeight};var o={x:c.offsetWidth,y:c.offsetHeight};var m=['l','t','l','b'];if(j.x+o.x>k.right&&j.x+n.x-o.x>=k.left){m[0]='r';m[2]='r'}if(j.y+n.y+o.y>k.bottom&&j.y-o.y>=k.top){m[1]='b';m[3]='t'}return arguments.callee(a,c,m)}},fire_event:function(a,c){if(h.common_callback)h.common_callback(a,c);var d=h.getInfo(c).callback;if(d)d(a,c)},loadTemplate:function(c){var d=$$.module.jmpInfo.template;if(d.hasOwnProperty(c))return!!d[c];d[c]=false;if(c.charAt(0)=='#'){var f=document.$g(c);if(!f){h.log('template element '+c+' not found')}else{d[c]=h.htmlOf(f[0]);return true}}else{var g=h.template_dir+c+'.js';$loadJs(g,'gbk',function(a){if(a){h.log('J.loadTemplate timeout for '+g);return true}},h.load_timeout)}return false},loadData:function(c){if(!c)return true;var d=c.name;var f=$$.module.jmpInfo.array;if(f.hasOwnProperty(d))return!!f[d];f[d]=false;var g=h.data_dir+d+'_'+$$.status.charset+'.js';$loadJs(g,null,function(a){if(a){h.log('J.loadData timeout for '+g);return true}},h.load_timeout);return false},getInfo:function(a){var c={};var d=(a.getAttribute('mod_jmpInfo_page')||'default_normal').split('?');c.page=!/^#/.test(d[0])?d[0].replace(/\.asp$/i,'').toLowerCase():d[0];c.query=h.parseQuery(d.slice(1).join(''));c.ready=h.loadTemplate(c.page)&&h.loadData(c.query);var f=a.getAttribute('mod_jmpInfo_content')||'';c.content=f.split('|');var g=a.getAttribute('mod_jmpInfo_position')||'auto';if(g in h.posMap)g=h.posMap[g];c.position=/[ltrbcm]{4}/.test(g)?g.split(''):null;var i=a.getAttribute('mod_jmpInfo_callback');if(i&&typeof(window[i])=='function')c.callback=window[i];return c},posMap:{'align-center':'ctcb','align-left':'ltlb','corner-left':'ltrb','align-right':'rtrb','corner-right':'rtlb','above-align-left':'lblt','above-align-right':'rbrt'},parseQuery:function(a){if(!a)return null;var c=a.split('=');if(c.length<2)return null;return{name:c[0],value:c.slice(1).join('')}},queryData:function(a){var c=$$.module.jmpInfo.array[a.name];var d='@'+a.value+'|';var f=c.indexOf(d)+1;if(!f){h.log('queryData failure',a.name,a.value);return[]}return c.slice(f,c.indexOf('@',f)).split('|')},makeHtml:function(a){var c=$$.module.jmpInfo.template[a.page];var d=c.match(/<body.*?>([\s\S]+)<\/body>/i);c=(d?d[1]:c).replace(/<!--[\s\S]*?-->/g,'');var f={'para':a.content};if(a.query)f['array']=h.queryData(a.query);return h.fillContent(c,f)},fillContent:function(k,n){var o=$keys(n).join('|');var m='(<(\\w+)[^>]*)\\bid="('+o+')(\\d+)"([^>]*>)[\\s\\S]*?(<\\/\\2>)';var s=new RegExp(m,'gi');return k.replace(s,function(a,c,d,f,g,i,j){return c+i+(n[f][g-1]||'')+j})},htmlOf:function(a){if(!a||a.nodeType!=1)return'';a=a.cloneNode(true);a.removeAttribute('id');a.style.cssText=a.style.cssText.replace(/\bdisplay:\s*none;?/i,'');if('outerHTML'in a){return a.outerHTML.replace(/(<[^>]+\sid=)(\w+)/g,'$1"$2"')}else{var c=[];var d=a.attributes;for(var f=0;f<d.length;f++){if(d[f].name=='id')continue;c.push(d[f].name+'="'+d[f].value+'"')}var g=c.length?' '+c.join(' '):'';var i=a.tagName.toLowerCase();return'<'+i+g+'>'+a.innerHTML+'</'+i+'>'}}};$r('domReady',h.init);return h})();$r('domReady',function(){var a='#jsContainer div,#jsContainer dl,#jsContainer dt,#jsContainer dd,#jsContainer ol,#jsContainer ul,#jsContainer li{margin:0;padding:0;font-size:12px;list-style:none;}#jsContainer a{color:#0055AA; text-decoration:none;}#jsContainer a:hover{text-decoration:underline;}#jsContainer{font-size:12px;}/* calender */#tuna_calendar { position:absolute; z-index:1000; width:350px;  margin:0; *padding:0; padding:0;  font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; border:solid 1px #999999; }#tuna_calendar a { color:#0053AA; text-decoration:none }#tuna_calendar .today { font-weight:bold; color:#0053AA }#tuna_calendar .today:hover { background:#C8E3FC; text-decoration:underline }#tuna_calendar .current_day { border:1px solid #FFB533; background:#FFE6A6; margin:-1px; text-decoration:none; }#tuna_calendar .select_day { border:1px solid #FFB533; background:#FFF5D1; margin:-1px; }#tuna_calendar .selected_day { height:25px; background:url({$picserver}/common/un_tuna_calendar2.gif) -60px 0 no-repeat; color:#0053AA; text-decoration:underline; }#tuna_calendar .over_day, #tuna_calendar .blank_day, #tuna_calendar .limit_day { color:#999; cursor:default; }#tuna_calendar .enable_day:hover { z-index:9; background:#E8F4FF; border:1px solid #ACCCEF; margin:-1px; text-decoration:none; }#tuna_calendar .expired_day { background:url({$picserver}/common/un_tuna_calendar2.gif) 0 0 no-repeat; }#tuna_calendar dl { float:left; background:#fff; width:175px; overflow:hidden; }#tuna_calendar #calendar_month2 { margin-left:-1px; border-left:1px solid #ccc; }#tuna_calendar div { float:left; width:175px; color:#fff; font-weight:bold; height:23px; background:#67A1E2; }#tuna_calendar div span { font-weight:normal; color:#fff; cursor:pointer; text-align:center; width:40px; line-height:20px; *line-height:16px }#tuna_calendar dt { float:left; width:25px; height:20px; background:#E6E6E6; font-weight:normal; color:#999; line-height:20px; text-align:center; }#tuna_calendar dt.day0, #tuna_calendar dt.day6 { color:#999; }#tuna_calendar dd { float:left; width:24px; height:25px; border-right:1px solid #E6E6E6; background:#fff; font-size:14px; font-family:Tohoma, Arial, Helvetica, sans-serif; }#tuna_calendar dd a { position:absolute; overflow:hidden; display:block; text-align:center; height:24px; width:24px; line-height:24px; }#tuna_calendar .calendar_title01 label, #tuna_calendar .calendar_title02 label { float:left; width:140px; text-align:center; line-height:23px; }#tuna_calendar .calendar_title01 span { float:left; background:url({$picserver}/common/un_tuna_calendar2.gif) -150px 0 no-repeat; width:25px; height:23px; text-indent:-9999em; }#tuna_calendar .calendar_title02 span { float:right; background:url({$picserver}/common/un_tuna_calendar2.gif) -120px 0 no-repeat; width:25px; height:23px; text-indent:-9999em; }/*address*/address_hot li,.address_hot_abb,.address_hot_adress { margin:0; padding:0; list-style:none; }.address_hot_adress a { text-decoration:none; }#tuna_address {font-size: 12px;font-family: Arial, Simsun;}#tuna_address #address_warp {width: 220px;border: 1px solid #7F9DB9;background: #FFF;padding:0 0 4px;margin: 0;text-align: left;min-height:305px;}* html #tuna_address #address_warp {height:305px;}#tuna_address #address_message {display: block;line-height: 20px;padding: 2px 0 2px 9px;color: #666;font-family:"Simyou";word-wrap:break-word;word-break:break-all;background-color:#67a1e2; color:#fff; width:auto; border:none;}#tuna_address #address_list {padding: 0; margin:0;in-height:277px;}* html #tuna_address #address_list {height:277px;}#tuna_address #address_list span { width:110px; white-space:nowrap; overflow:hidden; margin: 0;padding: 0;	float: right;text-align: right; font:normal 10px/22px verdana; }#tuna_address #address_list a { height:22px; padding: 1px 9px 0 9px;border-top: 1px solid #FFF;border-bottom: 1px solid #FFF;cursor: pointer;line-height: 22px;color: #0055aa;display:block;text-decoration:none;min-height:22px; text-align:left; overflow:hidden;}* html #tuna_address #address_list a {height:22px;}#tuna_address #address_list a:hover {background: #e8f4ff;border-top: 1px solid #7F9DB9;border-bottom: 1px solid #7F9DB9;}#tuna_address .address_selected {background: #ffe6a6;color: #FFF;height:22px;}#tuna_address .address_pagebreak {padding:0;margin:0;display:none;line-height:25px;text-align:center;}#tuna_address .address_pagebreak a {color:#0055aa;font-family: Arial, Simsun, sans-serif;	text-decoration:underline;padding:0 4px 0 4px;margin:0;font-size:14px;}#tuna_address #address_arrowl,#tuna_address #address_arrowr {color:#0055aa;}#tuna_address a.address_current {color:black;text-decoration:none;}.address_hot{ background-color:#fff; width:283px; font-size:12px;}.address_hotcity{ padding-left:10px; height:24px; line-height:24px; color:#cee3fc; border:#2c7ecf solid 1px; border-width:1px 1px 0 1px; background-color:#67a1e2;}.address_hotcity strong{ color:#fff;}.address_hotlist{border:#999999 solid 1px; border-width:0 1px 1px 1px; padding:5px;overflow:hidden;}.address_hot_abb{ border-bottom:#5da9e2 solid 1px; height:20px;}.address_hot_abb li{ float:left; width:42px; height:20px; line-height:20px; text-align: center;list-style-type:none; color:#005daa; position:relative;zoom:1; cursor:pointer;} .address_hot_abb li .hot_selected{ width:42px;border:#5da9e2 solid 1px; border-width:1px 1px 0 1px; position:absolute;left:0; background-color:#fff; color:#000; font-weight:bold;}.address_hot_adress{ padding-top:4px;}.address_hot_adress li {float:left; width: 67px; height: 24px; overflow: hidden; }.address_hot_adress li a{ display:block;height:22px;line-height:22px;border:#fff solid 1px; padding-left: 5px; color:#000;}.address_hot_adress li a:hover{ background-color:#e8f4ff; border:#acccef solid 1px; text-decoration:none;}'.replaceWith({'picserver':$picUrl('')});if($$.browser.IE){var c=document.createStyleSheet();c.cssText=a}else{var c=document.createElement('style');c.type="text/css";c.innerHTML=a;document.getElementsByTagName('head')[0].appendChild(c)}});$$.string.address={"zh-cn":{b:"输入中文/拼音或↑↓选择.",i:"输入",j:"或↑↓选择.",k:"中文/拼音",e:"请输入至少两个字母或一个汉字.",h:"",o:"按拼音排序",s:"对不起, 找不到: ",l:"结果共",p:"项,←→翻页",a:",共"},"zh-tw":{b:"輸入中文/拼音或↑↓選擇.",i:"輸入",j:"或↑↓選擇.",k:"中文/拼音",e:"請輸入至少兩個字母或一個漢字.",h:"",o:"按拼音排序",s:"對不起, 找不到: ",l:"結果共",p:"項,←→翻頁",a:",共"},"en":{b:"Type or scroll to select.",i:"Input ",j:" or use up or down to select.",k:"English",e:"Please Input at least two character.",h:"",o:"sort by spelling",s:"No match",l:"Results ",p:",left or right to turn page",a:",All"}}[$$.status.version];$$.module.address.sourceMap={"hotel":["http://scriptres.ctrip.com/hoteladdress/HotelCityAddress{$charset}.aspx","utf-8"],"hotelAll":["http://scriptres.ctrip.com/hoteladdress/HotelCityAddress{$charset}.aspx","utf-8"]};(function(){var v={target:null,hotTarget:null,data:null,selectedValue:null,hotSelected:'热门',tabTagName:'span',tabListTagName:'ol',cityListTagName:'ul',cityTagName:'span',hotData:{},hotTemplate:{container:'<div class="address_hot" style="display:none;-moz-box-shadow:2px 2px 5px #333;-webkit-box-shadow:2px 2px 5px #333;" id="address_hot">{$text}</div>',title:'<div class="address_hotcity"><strong>热门城市</strong>{$text}</div>',hotlist:'<div class="address_hotlist">{$text}</div>',tags:'<ol class="address_hot_abb" style="{$style}">{$text}</ol>',tag:'<li><span {$className}>{$text}</span></li>',items:'<ul class="address_hot_adress layoutfix" {$display} type="{$type}">{$text}</ul>',item:'<li><a href="###" data="{$data}">{$text}</a></li>'},hotClassNames:{tagSelected:'hot_selected'}};function bi(){if(!ba(arguments[0],arguments[1])){arguments[0].className=arguments[0].className+" "+arguments[1]}};function bj(){if(ba(arguments[0],arguments[1])){var a=new RegExp('(\\s|^)'+arguments[1]+'(\\s|$)');arguments[0].className=arguments[0].className.replace(a,' ').split(" ").join(" ")}};function ba(){return arguments[0].className.match(new RegExp('(\\s|^)'+arguments[1]+'(\\s|$)'))};function Q(a,c){var d=a.match(/^[^\|]+/),f=c.match(/^[^\|]+/);return d>f?1:(d==f?0:-1)};function bk(){var a=$c("div");with(a.style){width="0px";height="0px"}a.innerHTML="<div id=\"tuna_address\" style=\"display:none;position:absolute;z-index:120;overflow:hidden;-moz-box-shadow:2px 2px 5px #333;-webkit-box-shadow:2px 2px 5px #333;\"><div id=\"address_warp\"><div id=\"address_message\">&nbsp;<\/div><div id=\"address_list\"><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><a class=\"a1\" href=\"###\"><span>&nbsp;<\/span>&nbsp;<\/a><\/div><div class=\"address_pagebreak\" id=\"address_p\"><a id=\"address_arrowl\" href=\"javascript:;\" name=\"p\">&lt;-<\/a><a id=\"address_p1\" href=\"javascript:;\" name=\"1\" class=\"address_current\">1<\/a><a id=\"address_p2\" href=\"javascript:;\" name=\"2\">2<\/a><a id=\"address_p3\" href=\"javascript:;\" name=\"3\">3<\/a><a id=\"address_p4\" href=\"javascript:;\" name=\"4\">4<\/a><a id=\"address_p5\" href=\"javascript:;\" name=\"5\">5<\/a><a id=\"address_arrowr\" href=\"javascript:;\" name=\"n\">-&gt;<\/a><\/div><\/div><\/div>";$("jsContainer").appendChild(a);B=$("tuna_address");$$.module.address.source["default"]="@@";bb=$("address_warp");R=$('address_message');T=$('address_list');S=[$('address_p'),$('address_p1'),$('address_p2'),$('address_p3'),$('address_p4'),$('address_p5')];U=$('address_arrowl');V=$('address_arrowr');x=T.getElementsByTagName("a");be=[];for(var c=0;c<x.length;c++)be[c]=x[c].cloneNode(true)}var B,bb,R,T,S,U,V,x,be,bf=0;Ctrip.module.address=function(m){function s(){var a=[];for(var c in v.hotData){bf++;a.push(v.hotTemplate.tag.replaceWith({text:c,className:v.hotSelected==c?"class="+v.hotClassNames.tagSelected:''}))}return a.join('')}function r(){var f=[];for(var g in v.hotData){var i=[];var j=v.hotData[g];i=j.replace(/@([^@]*)\|([^@]*)/g,function(a,c,d){return v.hotTemplate.item.replaceWith({data:[c,d].join("|"),text:d})});f.push(v.hotTemplate.items.replaceWith({text:i,display:v.hotSelected==g?"":"style='display:none'",type:g}))}return f.join('')}function u(){l.style.position="absolute";var a=w.$getPos();l.style.left=a[0]+'px';l.style.top=a[1]+w.offsetHeight+'px'}function h(){var a=l.getElementsByTagName(v.cityListTagName);for(var c=0;c<a.length;c++){if(a[c].style.display==""){return a[c]}}}function F(a){var c=l.getElementsByTagName(v.cityListTagName);for(var d=0;d<c.length;d++){if(c[d].getAttribute('type')==a){return c[d]}}}function D(a){var c=a.getElementsByTagName(v.cityTagName);for(var d=0;d<c.length;d++){if(ba(c[d],v.hotClassNames.tagSelected)){return c[d]}}}function M(){w.onmousedown=function(a){$stopEvent(a||window.event);$fixE(a);w.select();if(!l){createHotElement();y()}else{v.olObj=l.getElementsByTagName(v.tabListTagName)[0];E(v.olObj,v.olObj.getElementsByTagName('span')[0])}}}function E(a,c){var d=h();if(a&&d){h().style.display="none";v.hotSelected=c.innerText||c.textContent;F(v.hotSelected).style.display="";bj(D(a),v.hotClassNames.tagSelected);var f=c.tagName==v.cityTagName.toUpperCase()?c:c.getElementsByTagName(v.cityTagName)[0];bi(f,v.hotClassNames.tagSelected)}}function G(a,c){clearInterval(O);selectedValue=c.$target.getAttribute('data').split('|');focusTarget.value=selectedValue[1].trim();var d=focusTarget.getAttribute('mod_address_reference');if(d&&$(d)){$(d).value=selectedValue[0].trim()}z=0;l.style.display="none";setTimeout(function(){focusTarget.blur()},10)}function y(){l.onmousedown=function(a){a=$fixE(a);v.olObj=a.$target.$parentNode(v.tabListTagName);v.ulObj=a.$target.$parentNode(v.cityListTagName);if(v.olObj){$stopEvent(a||widow.event);E(v.olObj,a.$target);setTimeout(function(){focusTarget.focus();focusTarget.select()},1)}else if(v.ulObj){G(v.ulObj,a)}else{setTimeout(function(){focusTarget.focus();focusTarget.select()},1);$stopEvent(a||widow.event)}}}function p(){$(document.documentElement).$r("mousedown",function(){if(l){l.style.display="none"}}.bind(this))}function A(){var a=$('address_hot');if(!a){var c=v.hotTemplate.container.replaceWith({text:[v.hotTemplate.title.replaceWith({text:$$.module.address.source[q.source+"_keyWord"]||" （可直接输入城市或城市拼音）"}),v.hotTemplate.hotlist.replaceWith({text:[v.hotTemplate.tags.replaceWith({text:s(),style:bf>1?"":'display:none;'}),r()].join('')})].join('')});var d=document.createElement('div');d.innerHTML=c;l=d.removeChild(d.firstChild);document.body.appendChild(l);y();p();M()}else{l=a}}var w,l;var z=0,I,N=m.$getWin();var q=m.module.address={};var bg,O,t=null,C,J=[];q.ver=m.getAttribute('mod_address_ver');if(!B){bk()}(function(){if($$.module.address.source[q.source+"_hotData"]){w=m;v.hotData=$$.module.address.source[q.source+"_hotData"];A()}else{setTimeout(arguments.callee,10)}})();m.setAttribute("autoComplete","off");$r("beforeunload",function(){m.setAttribute("autoComplete","on")});q.focusNext=m.getAttribute("mod_address_focusNext");q.focusNext=/^(1|true)$/i.test(q.focusNext||"");q.reference=m.getAttribute("mod_address_reference");var H=m.getAttribute("mod_address_cookie");if(H){H=N.$(H);if(!H){var W=N.$c("input");with(W){type="hidden";id=name=H}H=W;m.parentNode.insertBefore(H,m)}}if(q.reference)q.reference=N.$(q.reference)||N.$(q.reference,true);var P=m.getAttribute("mod_address_suggest");var X=m.getAttribute("mod_address_cookieSuggest");q.suggest=[];if(X){q.suggest=X.match(/[^@]+@/gi);if(P)q.suggest._push(P.match(/[^@]+@/gi))}else if(P)q.suggest=P.match(/[^@]+@/gi);if(q.suggest.length>12)q.suggest=q.suggest.slice(0,12);q.source=m.getAttribute("mod_address_source")||"default";if(!$$.module.address.source[q.source]){$$.module.address.source[q.source]="@@";if($$.module.address.sourceMap[q.source])$loadJs($$.module.address.sourceMap[q.source][0].replace(/\{\$charset\}/gi,$$.status.charset),($$.module.address.sourceMap[q.source][1]||"").replace(/\{\$charset\}/gi,$$.status.charset)||$$.status.charset);else $loadJs($webresourceUrl("/code/js/resource/address_tuna/")+q.source+"_"+$$.status.charset+".js",$$.status.charset)}q.auto=m.getAttribute("mod_address_auto");q.auto=q.auto&&q.auto.match(/^(false|0)$/i)?false:true;q.redraw=function(){if(O)bc()};q.hook={};(m.getAttribute("mod_address_hook")||"").replace(/(on)?([^;:]+):([^;]+)/gi,function(a,c,d,f){q.hook[d.toLowerCase()]=N[f]});function Y(){isfocus=true;if(z){z=0;return}I=false;T.style.display=R.style.display=S[0].style.display="none";function d(c){x[c].onmousedown=function(a){Z(c);$stopEvent(a);if(x[c].outerHTML)x[c].outerHTML=x[c].outerHTML+' ';m.blur()}}B.onmousedown=function(){z=1};for(var f=0;f<x.length;f++)new d(f);U.onmousedown=V.onmousedown=L;for(var f=1;f<S.length;f++)S[f].onmousedown=L;if($$.module.address.source[q.source+"_hotData"]){C=m.value}else{C=null}if(t!==null){x[t].className="address_selected"}if(q.hook["focus"]){q.hook["focus"](m)}if($$.module.address.source[q.source+"_hotData"]){if(l&&l.style.display=="none"){var g=l.getElementsByTagName('ol')[0];E(g,g.getElementsByTagName('span')[0]);u();l.style.display="";w.select()}}setTimeout(bc,0);O=setInterval(bc,150);if($$.module.address.source[q.source+"_hotData"]){setTimeout(u,1)}}function L(a){z=1;if(a)$stopEvent(a);switch(this){case U:K.m_get(K.page-1);break;case V:K.m_get(K.page+1);break;default:K.m_get(parseInt(this.firstChild.nodeValue))}}var K=new function(){var g;this.page=1;this.pagelist;this.maxpage=1;this.m_get=function(a){if(!g||!a||a<1||a>this.maxpage)return null;this.page=a;this.pagelist=g.slice((a-1)*12,Math.min(a*12,g.length));for(var c=0;c<x.length;c++){if(c<this.pagelist.length){x[c].style.display="block";var d=this.pagelist[c].replace(/@/g,"").split("|");x[c].lastChild.nodeValue=d[1];x[c].firstChild.firstChild.nodeValue=d[0];J[c]=d}else{x[c].style.display="none";J[c]=null}}if(t!==null){if(t>=this.pagelist.length){x[t].className="";t=this.pagelist.length-1;x[t].className="address_selected"}}else{t=0;x[0].className="address_selected"}i.call(this);T.style.display=R.style.display="";if(!I){if(l&&l.style.display=="none"){B.style.display=""}else{B.style.display=""}var f=m.$getPos();if(B.offsetWidth+f[0]>___.offsetWidth)B.$setPos(m,"tr","br");else B.$setPos(m);B.$setIframe();I=true}bd.call(this)};this.m_set=function(a){g=a;this.maxpage=Math.ceil(a.length/12);this.page=1;this.m_get(1)};function i(){var a=this.maxpage<6||this.page<3?1:this.page>this.maxpage-2?this.maxpage-4:this.page-2;var c=Math.min(a+4,this.maxpage);var d;U.style.display=this.page==1?"none":"";V.style.display=this.page==this.maxpage?"none":"";for(var f=a;f<a+5;f++){d=S[f-a+1];if(f<=c){d.firstChild.nodeValue=f;d.className=f==this.page?"address_current":"";d.style.display=""}else d.style.display="none"}S[0].style.display=this.maxpage>1?"block":"none"}};function bd(){with(B.style){width=bb.offsetWidth+"px";height=bb.offsetHeight+"px"}B.$setIframe()}function bh(){if(q.suggest.length==0){B.style.display="none";if(t!==null){x[t].className="";t=null}return}K.m_set(q.suggest);R.lastChild.nodeValue=$$.status.version.match(/^zh-/)?$$.string.address.i+(m.module.notice?m.module.notice.tip:$$.string.address.k)+$$.string.address.j:$$.string.address.b}function bc(){focusTarget=m;var c=m.value.trim();if(c===C)return;C=c;c=c.replace(/([\(\)\\\[\]\.\+\?\*\|\^\$])/gi,"\\$1").replace(/@|\|/gi,"");if(!c){if(q.ver=="2"){l.style.display="";B.style.display="none"}else{bh()}bd();return}B.style.display="";var d=$$.module.address.source[q.source];var f=new RegExp("@([^\\|@]*\\|)?"+c+"[^@]*","gi");var g=new RegExp("@([^@]*\\|)?"+c+"[^@]*","gi");var i=new RegExp("@[^@]*"+c+"[^@]*","gi");var j=[],k=[],n=[];d=d.replace(f,function(a){j.push(a);return""});if(j)j.sort(Q);d=d.replace(g,function(a){k.push(a);return""});if(k)k.sort(Q);d=d.replace(i,function(a){n.push(a);return""});if(n)n.sort(Q);arr=j.concat(k).concat(n);if(!arr||!arr.length){R.lastChild.nodeValue=q.auto?($$.string.address.s+($$.status.version=="en"?"":m.value)):($$.string.address.h+m.value+", "+$$.string.address.o);if(!q.auto){B.style.display="none";if(t!==null){x[t].className="";t=null}}if(T.style.display=="none")bh();bd()}else{R.lastChild.nodeValue=$$.string.address.h+m.value+", "+$$.string.address.o;K.m_set(arr)}}function bl(a){if($$.module.address.source[q.source+"_hotData"]){setTimeout(function(){if(m.value.length){l.style.display="none"}},1)}var c=a?a.keyCode:event.charCode;var d="|"+c+"|";if(t==null){if("|13|".indexOf(d)!=-1){$stopEvent(a,1);if(q.focusNext)setTimeout(function(){m.$focusNext()},1)}return true}if("|13|".indexOf(d)!=-1){$stopEvent(a,1);Z(t);m.blur()}if("|33|37|109|188|219|".indexOf(d)!=-1){L.call(U);$stopEvent(a,1)}if("|34|39|61|190|221|".indexOf(d)!=-1){L.call(V);$stopEvent(a,1)}if("|38|40|".indexOf(d)!=-1){x[t].className="";t+=K.pagelist.length-39+c;t%=K.pagelist.length;x[t].className="address_selected";$stopEvent(a,1)}}function Z(a,c){z=2;m.value=J[a][1]||J[a][0];if(q.reference)q.reference.value=J[a][2];if(H)H.value=J.join("|");if(q.hook["change"])q.hook["change"](m);if(c!==false&&q.focusNext)setTimeout(function(){m.$focusNext()},1)}function bm(){isfocus=false;if(z==1){setTimeout(function(){m.focus()},1);return}clearInterval(O);O=null;B.$clearIframe();B.style.display="none";if(t!==null){if(m.value&&z!=2){if(q.auto)Z(t,false);else q.check()}x[t].className="";t=null}z=0;B.onmousedown=null}q.check=function(){var c=m.value.trim();if(m.isNull&&m.isNull())c="";var d;C=c;c=c.replace(/([\(\)\\\[\]\.\+\?\*\|\^\$])/gi,"\\$1").replace(/@|\|/gi,"");if(c){var f=$$.module.address.source[q.source];var g=q.auto?new RegExp("@([^\\|@]*\\|)?"+c+"[^@]*","gi"):new RegExp("@([^\\|@]*\\|)?"+c+"(\\|[^@]*)?(?=@)","gi");var i=q.auto?new RegExp("@([^@]*\\|)?"+c+"[^@]*","gi"):new RegExp("@([^@]*\\|)?"+c+"(\\|[^@]*)?(?=@)","gi");var j=new RegExp("@[^@]*"+c+"[^@]*","gi");var k=[],n=[],o=[];f=f.replace(g,function(a){k.push(a);return""});if(k)k.sort(Q);f=f.replace(i,function(a){n.push(a);return""});if(n)n.sort(Q);if(q.auto){f=f.replace(j,function(a){o.push(a);return""});if(o)o.sort(Q)}d=k.concat(n).concat(o);if(d&&d.length){I=true;K.m_set(d);I=false;Z(0,false);z=0}}if(m.module.notice)m.module.notice.check();return!!d};m.$r("onfocus",Y);m.blur();m.$r("onblur",bm);m.$r("onkeydown",bl);if(q.hook["load"])q.hook["load"](m)}})();$$.string.calendar={"zh-cn":{a:"年",b:"月"},"zh-tw":{a:"年",b:"月"},"en":{a:"",b:"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec"}}[$$.status.version];(function(){function O(){var a=$c("div");with(a.style){width="0px";height="0px"}a.innerHTML='<div id="tuna_calendar" style="position: absolute; z-index: 120; overflow: hidden;display:none;-moz-box-shadow:2px 2px 5px #333;-webkit-box-shadow:2px 2px 5px #333;"><div class="calendar_title01"> <span id="calendar_lastmonth">&lt;--</span><label id="calendar_title1">2010年</label></div><div class="calendar_title02"> <span id="calendar_nextmonth">--&gt;</span><label id="calendar_title2">2010年</label></div><dl id="calendar_month1"><dt class="day0">日</dt><dt>一</dt><dt>二</dt><dt>三</dt><dt>四</dt><dt>五</dt><dt class="day6">六</dt><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="over_day" id="d_2010-5-1">1</a></dd><dd><a href="###" class="over_day" id="d_2010-5-2">2</a></dd><dd><a href="###" class="over_day" id="d_2010-5-3">3</a></dd><dd><a href="###" class="over_day" id="d_2010-5-4">4</a></dd><dd><a href="###" class="over_day" id="d_2010-5-5">5</a></dd><dd><a href="###" class="over_day" id="d_2010-5-6">6</a></dd><dd><a href="###" class="enable_day today expired_day" id="d_2010-5-7">7</a></dd><dd><a href="###" class="enable_day expired_day" id="d_2010-5-8">8</a></dd><dd><a href="###" class="enable_day expired_day" id="d_2010-5-9">9</a></dd><dd><a href="###" class="enable_day expired_day" id="d_2010-5-10">10</a></dd><dd><a href="###" class="enable_day expired_day" id="d_2010-5-11">11</a></dd><dd><a href="###" class="enable_day current_day" id="d_2010-5-12">12</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-13">13</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-14">14</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-15">15</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-16">16</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-17">17</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-18">18</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-19">19</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-20">20</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-21">21</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-22">22</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-23">23</a></dd><dd><a href="###" class="enable_day select_day" id="d_2010-5-24">24</a></dd><dd><a href="###" class="enable_day current_day" id="d_2010-5-25">25</a></dd><dd><a href="###" class="enable_day" id="d_2010-5-26">26</a></dd><dd><a href="###" class="enable_day" id="d_2010-5-27">27</a></dd><dd><a href="###" class="enable_day" id="d_2010-5-28">28</a></dd><dd><a href="###" class="enable_day" id="d_2010-5-29">29</a></dd><dd><a href="###" class="enable_day" id="d_2010-5-30">30</a></dd><dd><a href="###" class="enable_day" id="d_2010-5-31">31</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd></dl><dl id="calendar_month2"><dt class="day0">日</dt><dt>一</dt><dt>二</dt><dt>三</dt><dt>四</dt><dt>五</dt><dt class="day6">六</dt><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-1">1</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-2">2</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-3">3</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-4">4</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-5">5</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-6">6</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-7">7</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-8">8</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-9">9</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-10">10</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-11">11</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-12">12</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-13">13</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-14">14</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-15">15</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-16">16</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-17">17</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-18">18</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-19">19</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-20">20</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-21">21</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-22">22</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-23">23</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-24">24</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-25">25</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-26">26</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-27">27</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-28">28</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-29">29</a></dd><dd><a href="###" class="enable_day" id="d_2010-6-30">30</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd><dd><a href="###" class="blank_day" id="">&nbsp;</a></dd></dl></div>';$("jsContainer").appendChild(a);t=$("tuna_calendar");C,J;H=$$.status.today.isDateTime()||new Date();W=$("calendar_title1"),P=$("calendar_title2");X=$("calendar_month1"),Y=$("calendar_month2");L=t.getElementsByTagName("dt");for(var c=0,d=L.length;c<d;c++){if(c<7)L[c].innerHTML=$$.string.weekday.charAt(c);if(c>=7)L[c].innerHTML=$$.string.weekday.charAt(c-7)}}var t,C,J,H,W,P,X,Y,L;Ctrip.module.calendar=function(p){if(!t)O();var A=0,w=1;var l=p.module.calendar={};p.setAttribute("autoComplete","off");$r("beforeunload",function(){p.setAttribute("autoComplete","on")});p.value=p.value||p.getAttribute("value")||"";l.focusNext=p.getAttribute("mod_calendar_focusNext");l.focusNext=l.focusNext&&l.focusNext.match(/^(1|true)$/i);l.rangeStart=p.getAttribute("mod_calendar_rangeStart");if(l.rangeStart=="#")l.rangeStart=$$.status.today;l.rangeStart=l.rangeStart?l.rangeStart.isDateTime():null;l.rangeEnd=p.getAttribute("mod_calendar_rangeEnd");if(l.rangeEnd=="#")l.rangeEnd=$$.status.today;l.rangeEnd=l.rangeEnd?l.rangeEnd.isDateTime():null;l.rangeException=p.getAttribute("mod_calendar_rangeException");l.rangeException=l.rangeException?l.rangeException.replace(/-0?/gi,"-").split("|"):null;l.permit=p.getAttribute("mod_calendar_permit");l.permit=l.permit?l.permit.replace(/-0?/gi,"-").split("|"):null;l.weekday=p.getAttribute("mod_calendar_weekday")||"1234567";l.prohibit=p.getAttribute("mod_calendar_prohibit");l.prohibit=l.prohibit?l.prohibit.replace(/-0?/gi,"-").split("|"):null;l.reference=p.getAttribute("mod_calendar_reference");l.reference=l.reference?p.$getWin().$(l.reference):null;l.redraw=function(){w=1};l.check=function(a){var c=(p.isNull&&p.isNull()?"":p.value).trim();if(!c)return arguments.length?a:false;var d=(c.parseStdDate()||"").isDateTime();if(!d)return false;var f=d.toStdString();if(l.rangeStart&&d<l.rangeStart||l.rangeEnd&&d>l.rangeEnd)return false;return("|"+(l.rangeException||[]).join("|")+"|").indexOf("|"+f+"|")==-1&&("|"+(l.prohibit||[]).join("|")+"|").indexOf("|"+f+"|")==-1&&l.weekday.indexOf(d.getDay()||"7")!=-1||("|"+(l.permit||[]).join("|")+"|").indexOf("|"+f+"|")!=-1};l.hook={};(p.getAttribute("mod_calendar_hook")||"").replace(/(on)?([^;:]+):([^;]+)/gi,function(a,c,d,f){l.hook[d.toLowerCase()]=_[f]});function z(){t.$setPos(p);p.lastValue=p.value;if(p==J&&!w){t.style.display="";t.$setIframe();if(C)C.className=C.className.replace(/current_day/gi,"");var a=p.value.isDateTime();C=null;if(a)C=$("d_"+a.toStdString());if(C)C.className+=" current_day";return}if(p.module.notice){p.module.notice.enabled=false;p.style.color="";if(p.value==p.module.notice.tip)p.value=""}w=0;J=p;t.style.display="";$("calendar_lastmonth").onmousedown=$("calendar_nextmonth").onmousedown=function(){w=0;l.currentDate=new Date(l.currentDate.getFullYear(),l.currentDate.getMonth()+(/last/.test(this.id)?-2:2),1);N()};var c=p.$getPos();if(t.offsetWidth+c[0]>___.offsetWidth)t.$setPos(p,"tr","br");else t.$setPos(p);t.$setIframe();l.currentDate=((p.isNull&&p.isNull()?"":p.value).trim().parseStdDate()||"").isDateTime();if(!l.currentDate){l.currentDate=l.rangeStart||new Date();if(l.reference){var d=(l.reference.isNull()?"":l.reference.value).isDateTime();if(d>l.currentDate)l.currentDate=d}while(true){var f=l.currentDate.toStdString();if(("|"+(l.rangeException||[]).join("|")+"|").indexOf("|"+f+"|")==-1&&("|"+(l.prohibit||[]).join("|")+"|").indexOf("|"+f+"|")==-1&&l.weekday.indexOf(l.currentDate.getDay()||"7")!=-1||("|"+(l.permit||[]).join("|")+"|").indexOf("|"+f+"|")!=-1){break}if(!l.rangeEnd||l.rangeEnd&&l.currentDate<l.rangeEnd)l.currentDate=l.currentDate.addDate(1);else{l.currentDate=new Date();break}}}l.currentDate=new Date(l.currentDate.getFullYear(),l.currentDate.getMonth(),1);N();t.onmousedown=function(){A=1}}function I(k,n,o){function m(a,c,d,f){var g=c?c.getDate():"",i=g?"d_"+k+"-"+(n+1)+"-"+g:"",j=f&&c?(l.weekday.indexOf(c.getDay()||7)!=-1):1;a=a.firstChild;if(a.lastChild)a.lastChild.nodeValue=g;else a.appendChild(__.createTextNode(g));a.date=c;a.id=i;a.className=j?d:"limit_day";a.onmousedown=f&&j?q:null;if(a.replaceNode){a.bak=null;a.bak=a.cloneNode(true)}}var s=o.getElementsByTagName("dd");var r=new Date(k,n,1),u=new Date(k,n+1,0),h=u.getDate(),F=r.getDay(),D,M,E,G;for(var y=0;y<F;y++)m(s[y],null,"blank_day",0);E=l.reference&&l.reference.value.isDateTime();for(var y=0;y<h;y++){D=new Date(k,n,y+1);G=(!l.rangeStart||D>=l.rangeStart)&&(!l.rangeEnd||D<=l.rangeEnd);m(s[y+F],D,G?(E&&D<E?"expired_day":"enable_day"):"over_day",G)}for(var y=h+F;y<42;y++)m(s[y],null,"blank_day",0)}function N(){var a=new Date(l.currentDate.getFullYear(),l.currentDate.getMonth()+1,1),c;var d=l.currentDate.getFullYear(),f=l.currentDate.getMonth();var g=a.getFullYear(),i=a.getMonth();W.innerHTML=$$.status.version.match(/^zh-/)?(d+$$.string.calendar.a+(f+1)+$$.string.calendar.b):($$.string.calendar.b.split("|")[f]+" "+d);P.innerHTML=$$.status.version.match(/^zh-/)?(g+$$.string.calendar.a+(i+1)+$$.string.calendar.b):($$.string.calendar.b.split("|")[i]+" "+g);I(d,f,X);I(g,i,Y);if(l.rangeException)for(var j=0;j<l.rangeException.length;j++)if(c=$("d_"+l.rangeException[j])){c.className="over_day";c.onmousedown=null}if(l.permit)for(var j=0;j<l.permit.length;j++)if(c=$("d_"+l.permit[j])){c.className="enable_day";c.onmousedown=q}if(l.prohibit)for(var j=0;j<l.prohibit.length;j++)if(c=$("d_"+l.prohibit[j])){c.className="limit_day";c.onmousedown=null}if(c=$("d_"+H.getFullYear()+"-"+(H.getMonth()+1)+"-"+H.getDate()))c.className+=" today";if(C)C.className=C.className.replace(/current_day/gi,"");if(c=$("d_"+p.value.parseStdDate())){c.className+=" current_day";C=c}if(l.reference){var k=l.reference.value.trim();var n=p.value.trim();var o=null;var m=n&&$('d_'+n);var s,r;if(k){o=$('d_'+k);if(o)o.className+=' current_day';s=k.isDateTime()}var r=n&&n.isDateTime();if(s&&r){if(r<s&&m){m.className=m.className.replace(/expired_day/,'current_day')}var u=(r-s)/3600/24/1000;for(var j=0;j<u-1;j++){s.setDate(s.getDate()+1);var h=$('d_'+s.toStdString());if(h)h.className+=' select_day'}}}t.$setIframe()}function q(a){p.value=$$.status.version.match(/^zh-/)?(this.date.getFullYear()+"-"+(this.date.getMonth()+1)+"-"+this.date.getDate()):($$.string.calendar.b.split("|")[this.date.getMonth()]+"-"+this.date.getDate()+"-"+this.date.getFullYear());w=1;if(this.outerHTML)this.outerHTML=this.outerHTML+' ';if(l.hook["change"])l.hook["change"](p);p.blur();$stopEvent(a);if(l.focusNext)setTimeout(function(){p.$focusNext()},10)}function bg(){if(p.value!=p.lastValue)w=1;if(A==1){A=0;setTimeout(function(){p.focus()},0);return true}t.style.display="none";t.$clearIframe();if(p.module.notice)p.module.notice.enabled=true}p.$r("focus",z);p.$r("blur",bg)}})();(function(){var f=(__.domain||"").match(/ctrip(travel)?\.com$/);if(f&&$isOnline()){_.__uidc_init=new Date*1;__.write('<script src="http://www.'+(f[1]?'dev.sh.'+f[0]:f[0])+'/rp/uiScript.asp"></script>')}if(_.$$.status.charset=='big5'&&$isOnline())__.write('<script src="'+$webresourceUrl('/code/js/public/public_s2t.js')+'" charset="utf-8"><\/script>');else _.$s2t=function(a){return a};if($$.browser.IE6)try{__.execCommand("BackgroundImageCache",false,true)}catch(e){};$$.status.debug=/\$debug\$/i.test($topWin.name)||/^(true|1)$/.test($getQuery("debug"));$$.status.debugEvent=/\$debugEvent\$/i.test($topWin.name)||/^(true|1)$/.test($getQuery("debugEvent"));$$.status.alertDiv.innerHTML=$$.status.version.match(/^zh-/)?"<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"base_popwindow01\"><tr><td class=\"base_poptl\"><\/td><td class=\"base_poptc\"><div><\/div><\/td><td class=\"base_poptr\"><\/td><\/tr><tr><td class=\"base_popml\"><\/td><td id=\"alertInfo\" class=\"base_popmc\">内容<\/td><td class=\"base_popmr\"><\/td><\/tr><tr><td class=\"base_popbl\"><\/td><td class=\"base_popbc\"><div><\/div><\/td><td class=\"base_popbr\"><\/td><\/tr><\/table>":"<table id=\"alertTable\" style=\"font-family:Arial;margin:0;\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"margin:0;padding:0px 2px 2px 0px;background:#E7E7E7;\"><div id=\"alertInfo\" style=\"margin:0px;padding:10px;font-size:12px;text-align:left;background:#FFFFE8;border:1px solid #FFDF47;color:#000;white-space:nowrap;\">内容<\/div><\/td><\/tr><\/table>";function g(c){function d(){if($$.status.domReady)return;var a;$$.status.domReady=true;if("domready"in _.module.event){while(a=_.module.event["domready"].shift())if(a.enabled)try{a.func(c)}catch(c){$t("domReady函数错误:"+a.func.toString().slice(0,100)+"...","red",a.func);$trackEvent('tuna-error','evtDomReady.execEvent',$error(c),$tunaVersion())}}}if($$.browser.Safari||$$.browser.Opera)setTimeout(d,1);else d()}if($$.browser.Moz)__.addEventListener("DOMContentLoaded",g,false);else if($$.browser.IE){try{if(!_.frameElement)(function(){try{___.doScroll("left")}catch(e){setTimeout(arguments.callee,50);return}g()})()}catch(e){}}else if($$.browser.Safari){var i=setInterval(function(){if(__.readyState=="loaded"||__.readyState=="complete"){clearInterval(i);g()}},10)}function loadPageValue(){var a=$$.status.saveStatus.value;if(a)$$.status.back=true;$$.status.pageValue=$fromJson(a||"{}");if(!("data"in $$.status.pageValue))$$.status.pageValue.data={};if(!$$.browser.Opera)$r("beforeunload",[$saveHistory,$savePageValue],90)}function loadHistory(){($$.status.pageValue["historyInfo"]||"").split("|").each(function(a){var c=unescape(a).split("|");if(c.length==5){for(var d=0;d<c.length;d++)c[d]=unescape(c[d]);$$.history.info[c[0]]=c.slice(1);$t("[history]恢复历史:"+c[1]+"/"+c[2],"green",c.slice(2).join("\r"))}});$$.history.count=parseInt($$.status.pageValue["historyCount"]||0,10)||0}$r("domReady",function(){$(__.body);loadPageValue();loadHistory();var a=$$.status.pageValue["lastHistory"];if(a)if($$.browser.IE||$$.browser.Opera){$r("load",function(){setTimeout(function(){$$.history.init()},1)})}else $$.history.init()},10);$r("domready",[$parserRe,$fixElement,function(){try{__.body.focus()}catch(e){}}]);$r("load",[g,function(){$$.status.load=true}])})();var maskShow=(function(){var i=null;var j=null;var k=false;var n={onresize:null,onscroll:null};return function(a,c){if(!i)s();k=!!c;if(!a){D(j,false);D(i,false);o(true);j=null;if(!k)for(var d in n){window[d]=n[d];n[d]=null}}else{if(j)D(j,false);j=a;r(j);u();i.style.zIndex=maskShow.zIndexBack||15;j.style.zIndex=maskShow.zIndexFore||20;D(j,true);D(i,true);o(false,a);if(!k)for(var d in n){n[d]=window[d];window[d]=u}}};function o(a,c){if(!$$.browser.IE6)return;var d=document.getElementsByTagName('select');var f=a?'visible':'hidden';for(var g=0;g<d.length;g++){if((a||!m(d[g],c))&&d[g].currentStyle.visibility!=f)d[g].style.visibility=f}}function m(a,c){while(a&&a!=c)a=a.parentNode;return a==c}function s(){i=document.createElement('div');i.style.cssText='background-color:{$c};border:none;position:absolute;visibility:hidden;opacity:{$a};filter:alpha(opacity={$A})'.replaceWith({c:maskShow.bgColor||'#fff',a:maskShow.bgAlpha||'0.7',A:maskShow.bgAlpha?parseInt(maskShow.bgAlpha*100):'70'});document.body.appendChild(i);maskShow.mask=i}function r(a){var c=a.style;c.position='absolute';c.left='-10000px';c.top='-10000px';c.visibility='visible';c.display='block';c.zIndex=10}function u(){if(!j)return;var a=$pageSize('doc');F(i,a);var c=h(a,j.offsetWidth,j.offsetHeight);if(c.left<a.scrollLeft)c.left=a.scrollLeft;if(c.top<a.scrollTop)c.top=a.scrollTop;F(j,c)}function h(a,c,d){return{left:((a.winWidth-c)>>1)+a.scrollLeft+(maskShow.adjustX||0),top:((a.winHeight-d)>>1)+a.scrollTop+(maskShow.adjustY||0)}}function F(a,c){var d=a.style;d.left=(c.left||0)+'px';d.top=(c.top||0)+'px';if('width'in c)d.width=c.width+'px';if('height'in c)d.height=c.height+'px'}function D(a,c){if(!a)return;a.style.visibility='visible';if(!c){a.style.left=-a.offsetWidth-100+'px';a.style.top=-a.offsetHeight-100+'px'}}})();$$.module.adpic={source:{}};Ctrip.module.adpic=function(g){var i=$(g.getAttribute("mod_adpic_link")||"");var j=$(g.getAttribute("mod_adpic_container")||"")||g;var k=$(g.getAttribute("mod_adpic_button")||"");if(i){var n=g.getAttribute("mod_adpic_source")||"";var o=$$.module.adpic.source[n];if(!o||!o.length)return}var m=parseInt(g.getAttribute("mod_adpic_interval")||"")||5000;var s=$$.browser.IE?25:5;var r=[];if(i){i.style.display="none";for(var u=0;u<o.length;u++){var h=i.cloneNode(true);h.style.backgroundImage="url(\'"+o[u].src+"\')";h.href=o[u].href||"javascript:void(0);";h.style.cursor=/^(|###|javascript:;?|javascript:void\(0\);?)$/i.test(o[u].href)?"default":"pointer";h.title=o[u].title;i.parentNode.insertBefore(h,i);r.push(h)}}else{var F=j.$("a");for(var u=0;u<F.length;u++){F[u].style.display="none";r.push(F[u])}i=$c("a");i.style.display="none";j.appendChild(i)}if(!r.length)return;function D(a){return function(){l(a)}}if(k){k.innerHTML="";var M=[];for(var u=0;u<r.length;u++){var E=$c("li");if(!u)E.className="pic_current";E.innerHTML=u+1;M.push(E);k.appendChild(E);E.$r("click",D(u))}}var G,y=false,p=0,A=0,w=null;if($$.browser.IE){g.style.position="relative";g.style.filter="progid:DXImageTransform.Microsoft.Fade(duration=1)"}r[p].style.display="";function l(a){if(a!==null){if(a==A)return;else w=a}clearTimeout(G);if(y)return;y=true;p=A;A=(A+1)%r.length;if(w!==null)A=w;w=null;i.parentNode.insertBefore(r[p],i);r[p].style.position="relative";r[A].style.position="absolute";r[A].style.display="";M[p].className="";M[A].className="pic_current";function c(){r[p].style.display="none";r[p].style.filter="";y=false;G=setTimeout(function(){l(null)},w===null?m:200)}if($$.browser.IE){g.filters[0].apply();r[p].style.display="none";g.filters[0].play();c()}else{var d=100;var f=setInterval(function(){d=Math.max(d-s,0);r[p].style.opacity=d/100;r[p].style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+d+")";if(!d){clearInterval(f);r[p].style.opacity=100;c()}},20)}}G=setTimeout(function(){l(null)},m)};$$.module.loading={source:null,backto:null,preload:function(a){if(a&&$type(a)=='number')this._preload=a;this._init.bind(this).delay(this._preload)},show:function(){if(this._visible)return;if(!this._panel)this._init();if(!this._panel)return;this._tmpcolor=maskShow.bgColor;this._button.href=this.backto||'javascript:$$.module.loading.hide()';maskShow.bgColor=this._bgcolor;maskShow.bgColor='#666';maskShow(this._panel);this._roll();this._visible=true},hide:function(){if(_.ActiveXObject)__.execCommand('Stop');else if(_.stop)_.stop();maskShow(null);if(this._tmpcolor)maskShow.bgColor=this._tmpcolor;clearInterval(this._timer);this._visible=false},wireup:function(c){if(this._wired||!c)return;var d=0;_.$(c).$r('submit',function(){d=new Date();alert(0)},1);_.$r('beforeunload',function(){var a=new Date()-d;if(a>0&&a<1000)$$.module.loading.show()},1);this._wired=true},_flag:false,_timer:null,_preload:12000,_panel:null,_button:null,_color:null,_bgcolor:'#666',_visible:false,_wired:false,_template:['<div style="background:#FFFFFF none repeat scroll 0%;border:1px solid #CCDCED;height:453px;">','<h1 style="border-bottom:1px solid #CBDCED;height:85px;margin:0 auto;text-align:center;width:99%"><img src="{$picserver}/common/pic_loading_logo.gif"></h1>','<div style="width:120px;height:12px;overflow:hidden;margin:80px auto 20px;background-image:url({$picserver}/common/pic_loading_progress.gif)">&nbsp;</div>','<p style="color:#cc6600;font-size:14px;font-weight:bold;text-align:center">我们正在处理您的请求，请稍候....</p>','<p style="margin-top:30px"><a style="display:block;width:104px;height:30px;margin:0 auto;background:url({$picserver}/common/btn_loading_cancel.gif) no-repeat 0 0;text-decoration:none;" onmouseover="this.style.backgroundPosition=\'0 -30px\'" onmouseout="this.style.backgroundPosition=\'0 0\'">&nbsp;</a></p>','<p><a target="_blank" href="{$link}"><img style="display:block;margin:0 auto;margin-top:20px;" title="{$title}" alt="{$title}" width="" height="" src="{$img}"></p></div>'].join('').replaceWith({'picserver':$picUrl('')}),_init:function(){if(this._panel||!this.source)return;var a=this.source.split('@').random().split('|');var c=document.createElement('div');c.style.cssText='width:556px;background:#d9e6f7;border:1px solid #b1cbe4;height:455px;padding:5px;position: absolute; left:-1000px; top:-1000px; z-index: 20;';c.innerHTML=this._template.replaceWith({img:a[0],link:a[1],title:a[2]||''});$$.status.container.appendChild(c);this._panel=c;this._button=$(c).$('a')[0]},_roll:function(){var c=0,d=120,f=20,g=300;var i=$(this._panel).$('div')[1].style;clearInterval(this._timer);var j=new Date(),k=-1;this._timer=setInterval(function(){var a=(Math.floor((new Date()-j)/g)*f)%(d-c)+c;if(a!=k){k=a;i.backgroundPosition=a+'px 0'}},40)}};Ctrip.module.loading=function(a){var c=$$.module.loading;if(c._flag||!(c._flag=true))return;var d=a.getAttribute('mod_loading_source');if(d)c.source=d;var f=a.getAttribute('mod_loading_backto');if(f)c.backto=f;var g=parseInt(a.getAttribute('mod_loading_preload'));if(isNaN(g))g=null;var i=a.getAttribute('mod_loading_sourcescript');if(i)$loadJs.pass(i,null,c._init.bind(c)).delay(g||1);else if(g)c.preload(g);var j=a.getAttribute('mod_loading_wireup');if(j.toLowerCase()=="true")c.wireup(a.tagName=='FORM'?a:(a.form||document.aspnetForm))};

$ur("domReady",$parserRe);
$$.module.searchBox={
	init:function(){this.funcList.each();},
	funcList:[function(){
		$parserRe($("searchBox"));
	}],
	airHotelList:""
};

/*index*/
//酒店
$$.module.searchBox.funcList.push(function(){
	var form=__.forms["hotelForm"];
	var perdate=form["perdate"].value,postdate=form["postdate"].value;
	var perdateCalc=perdate.isDateTime(),postdateCalc=postdate.isDateTime();
	var cityname=form["cityname"],citynameInter=form["citynameInter"],cityId=form["cityId"],city=form["city"],district=form["district"];
	var starttime=form["starttime"],deptime=form["deptime"];
	var Price=form["Price"],BegPrice=form["BegPrice"],EndPrice=form["EndPrice"];
	var hotelSel = form["hotelSel"] , country = form["country"] , oricity = form["oricity"] , roomNum = $(form).$("table")[0].$("tr")[3].$("td")[1];
	var hotelTag=true;

	
	//初始化 国内酒店还是海外酒店
	if($(form).$("table")[0].$("tr")[0].$("input")[1].checked){
		roomNum.style.display = $("citynameInter").style.display ="";
		$("cityname").style.display = "none";
		hotelTag = false;
	}


	$("hotelSwitch").$r("click" , function(e){	
		var el = $fixE(e).$target;
		while(el && el.tagName != 'LABEL'){
			el = el.parentNode;
		}
		if(!el) return;
		//if(el.tagName=="LABEL"){
			//debugger;
		var t = el.$parentNode("TABLE");
		var roomNum = t.$("tr")[3].$("td")[1];
		var att = el.$("input")[0].getAttribute("hotel_type") 
		hotelTag = att=="hotel";
		roomNum.style.display = $("citynameInter").style.display = hotelTag?"none":"";
		$("cityname").style.display = hotelTag?"":"none";
		//}
	});

	form.onsubmit=function(){
		var flag=[];
		if (cityname.isNull()&&hotelTag){
			$alert(cityname,$s2t("请输入宾馆所在城市"));
			return false;
		}
		if (citynameInter.isNull()&&!hotelTag){
			$alert(citynameInter,$s2t("请输入宾馆所在城市"));
			return false;
		}
		if (starttime.isNull()){
			$alert(starttime,$s2t("请输入入住时间"));
			return false;
		}
		flag[0]=starttime.value.isDateTime();
		if (!flag[0]){
			$alert(starttime,$s2t("入住时间不符合格式规范或无效的日期"));
			return false;
		}
		if (perdateCalc&&flag[0]<perdateCalc){
			$alert(starttime,$s2t("入住时间不能早于")+perdate);
			return false;
		}
		if (deptime.isNull()){
			$alert(deptime,$s2t("请输入离店时间"));
			return false;
		}
		flag[1]=deptime.value.isDateTime();
		if (!flag[1]){
			$alert(deptime,$s2t("离店时间不符合格式规范或无效的日期"));
			return false;
		}
		if (flag[1]<=flag[0]){
			$alert(deptime,$s2t("离店时间不能早于或等于入住时间")+starttime.value);
			return false;
		}
		if (flag[1]-flag[0]>2419200000){
			$alert(deptime,$s2t("入住时间段不能超过28天"));
			return false;
		}
		var priceRange=Price.value.split("|");
		BegPrice.value=priceRange[0];
		EndPrice.value=priceRange[1];
		function adjustCityId(id){
			id=parseInt(id,10);
			if (id<20000)
				return id-100;
			if (id<80000)
				return id-20000;
			return id-80000;
		}
		if (cityId.value>80000){
			district.value=adjustCityId(cityId.value);
			city.value="";
		}else{
			city.value=adjustCityId(cityId.value);
			district.value="";
		}
		
		function setCityId(id){
			if (id > 0){
				if (id < 20000)
					return (id - 100);
				else
					return (id - 20000);
			}
		}

		if(!hotelTag){   //海外酒店'
//			if(starttime.value==perdate&&oricity.value!='20058'&&oricity.value!='20059'){
//				$alert(starttime,$s2t("入住时间不能为今天"));
//				return false;
//			}
			city.value = setCityId(oricity.value);
			form.action = form.getAttribute("interhotelAction");
		}
		return true;
	};
});
//机票
function getRadioValue(obj){
	for (var i=0;i<obj.length;i++)
		if (obj[i].checked)
			return obj[i].value;
	return null;
}
function setRadioValue(obj,value){
	for (var i=0;i<obj.length;i++)
		if (obj[i].value==value)
			return obj[i].checked=true;
	return null;
}
$$.module.searchBox.funcList.push(function(){
	var form=__.forms["flightForm"];
	var flightway=form["flightway"];
	var flightBackFlag=$("flightBackFlag");
	var homecity=form["homecity_name"],destcity1=form["destcity1_name"],ticketagency_list=form["ticketagency_list"];
	var HomeCityID=form["HomeCityID"],destcityID=form["destcityID"],ticketagencyID=form["ticketagencyID"];
	var DDatePeriod1=form["DDatePeriod1"],ADatePeriod1=form["ADatePeriod1"],today=form["today"];
	var destcity1Code=$("destcity1");
	//var isOnlyAirHotel=$("isOnlyAirHotel");
	function changeFlightType(){
		flightBackFlag.style.visibility=getRadioValue(flightway)=="Single"?"hidden":"";
	};
	flightway[0].onclick=flightway[1].onclick=changeFlightType;
	changeFlightType();
	function checkDestCity(){
		var flag=!destcity1.isNull()&&!isIntFlt()&&(","+$$.module.searchBox.airHotelList+",").indexOf(","+destcity1Code.value.replace(/,.+$/,"").trim()+",")!=-1;
		if (isOnlyAirHotel.disabled!=flag)
			return;
		if (isOnlyAirHotel.disabled=!flag)
			isOnlyAirHotel.checked=false;
	}
	function isIntFlt(){
		var re=new RegExp($s2t("^香港"));
		return !!(re.test(homecity)||re.test(destcity1)||destcity1Code.value.match(/^(\d+)$/)&&destcity1Code.value!="594");
	}
	//setInterval(checkDestCity,100);
	form.onsubmit=function(){
		//checkDestCity();
		if (homecity.isNull()){
			$alert(homecity,$s2t("请选择您的出发地"));
			return false;
		}
		if (homecity.module.address)
			homecity.module.address.check();
		if (destcity1.isNull()){
			$alert(destcity1,$s2t("请选择您的目的地"));
			return false;
		}
		if (homecity.value==destcity1.value){
			$alert(destcity1,$s2t("您选择的出发地点与目的地相同,请重新选择"));
			return false;
		}
		if (DDatePeriod1.isNull()){
			$alert(DDatePeriod1,$s2t("请选择您的出发日期"));
			return false;
		}
		var d1=DDatePeriod1.value.isDateTime();
		if (!d1){
			$alert(DDatePeriod1,$s2t("出发日期不符合格式规范或无效的日期"));
			return false;
		}
		var d3=today.value.isDateTime();
		if (d3>d1){
			$alert(DDatePeriod1,$s2t("出发日期不能早于")+today.value);
			return false;
		}
		if (ADatePeriod1.isNull()&&getRadioValue(flightway)=="Double"){
			setRadioValue(flightway,"Single");
			changeFlightType();
		}
		if (getRadioValue(flightway)=="Double"){
			var d2=ADatePeriod1.value.isDateTime();
			if (!d2){
				$alert(DDatePeriod1,$s2t("返回日期不符合格式规范或无效的日期"));
				return false;
			}
			if (d2<d1){
				$alert(DDatePeriod1,$s2t("返回日期不能早于出发日期")+DDatePeriod1.value);
				return false;
			}
		}
		if (ticketagency_list.isNull()){
			if($("homecity").value=="HKG"||$("homecity").value=="MFM"||$("homecity").value=="TPE"||$("homecity").value=="KHH")
				ticketagency_list.value="上海";
			else
				ticketagency_list.value=homecity.value.replace(/\(.*$/,"");
			ticketagency_list.module.notice.check();
		}
		//国际机票判断
		var childtype=form["childtype"],PType=form["PType"];
		var flightclass=form["flightclass"];
		if (isIntFlt()){
			//将上海(虹桥)，上海(浦东)，北京(首都)，北京(南苑)过滤成上海|北京
			var specialCity = ["上海(虹桥)","上海(浦东)","北京(首都)","北京(南苑)"];
			var hc = homecity.value;
			for(var i=0,l=specialCity.length;i<l;i++){
				if(hc==$s2t(specialCity[i])){
					homecity.value = hc.replace(/\(.+\)/,"");
					break;
				}
			}
			PType.value=getRadioValue(childtype).value=="ADU"?"NOR":"CHD";
			if (ADatePeriod1.isNull())
				ADatePeriod1.value="";
			flightclass.value="I";
			//出发城市
			if (!fillCode("fltInternationalStart",homecity,HomeCityID)){
				$alert(homecity,$s2t("你选择的出发城市没有前往")+destcity1.value+$s2t("的航班，请重新选择"));
				return false;
			}
			//目的城市
			if (!fillCode("fltInternational",destcity1,destcityID)){
				$alert(destcity1,$s2t("你选择的出发城市没有前往该目的城市的航班，请重新选择"));
				return false;
			}
			//送票城市
			if (!fillCode("fltInternationalTicket",ticketagency_list,ticketagencyID)){
				$alert(ticketagency_list,$s2t("您选择的城市不在我们的送票服务范围，请重新选择"));
				return false;
			}
			form.action="http://flights."+getDomain()+"/International/ShowFareFirst.aspx";
		}
		return true;
	};
	function getDomain(){
		var arr=location.hostname.match(/(big5\.)?ctrip\.com|(big5\.)?([^\.]+).sh.ctriptravel.com$/);
		return arr&&!/^local$/i.test(arr[2])?arr[0]:"ctrip.com";
	}
	function fillCode(sourceName,fromObj,toObj){
		var source=$$.module.address.source[sourceName];
		if (!source)
			return false;
		var re=new RegExp("@[^\\|]*\\|"+fromObj.value.replace(/([\.\\\/\+\*\?\[\]\{\}\(\)\^\$\|])/g,"\\$1")+"[^@]*","i");
		var arr=source.match(re);
		if (!arr)
			return false;
		toObj.value=arr[0].match(/^@[^\|]*\|[^\|]*\|([^\|@]*)/)[1];
		return true;
	}
});
//机票+酒店
$$.module.searchBox.funcList.push(function(){
	var airHotel=$("airHotel");
	var airHotelBtn=$("airHotelBtn");
	var airHotelFrame=$("airHotelFrame");
	var initFlag=false;
	if (!airHotel|!airHotelBtn)
		return;
	airHotelBtn.$r("click",function(){
		//debugger;
		airHotel.style.display=airHotel.style.display?"":"none";
		if (airHotelFrame&&!initFlag){
			airHotelFrame.src=airHotelFrame.getAttribute("tagSrc");
			initFlag=true;
		}
	});
	var searchBoxUl=$("searchBoxUl");
	var airHotelClose=$("airHotelClose");
	if (airHotelClose){
		airHotelClose.$r("click",function(){
			airHotel.style.display="none";
		});
		setInterval(function(){
			if (searchBoxUl&&searchBoxUl.module.tab&&searchBoxUl.module.tab.index!=1)
				airHotel.style.display="none";
		},100);
	}
	___.$r("mousedown",function(e){
		e=$fixE(e);
		
		var obj=e.$target;
		if (obj==airHotelBtn)
			return;
		while (obj!=airHotel&&obj&&obj!=__.body)
			obj=obj.$parentNode();
		if (obj!=airHotel)
			airHotel.style.display="none";
	});
});
//度假
$$.module.pkgSearch={};
$$.module.searchBox.funcList.push(function(){
	var pkgSearch=$("pkgSearch");
	var inputList=pkgSearch.$("input");
	var selectList=pkgSearch.$("select");
	var pkgEle={
		form:__.forms["packageForm"],
		startCity:inputList[0],
		startCityCode:inputList[3],
		startCityDiv:$("pkgStartCityDiv"),
		destCity:inputList[1],
		destCityType:inputList[4],
		destCityCode:inputList[5],
		destCityDiv:$("pkgDestCityDiv"),
		submitBtn:inputList[2]
	};
	var pkgDestFlag={destCityCode:null,destCityType:null};
	//初始化destCity
	pkgEle.destCity.init=function(){
		if (pkgEle.startCitySpan)
			pkgEle.startCitySpan.innerHTML=pkgEle.startCity.value;
		if (!pkgEle.destCity.module.address){
			setTimeout(arguments.callee,500);
			return;
		}
		var str=pkgEle.startCity.value.trim();
		pkgEle.destCity.module.address.source=str?"pkg_"+str:"pkgAll";
	};
	pkgEle.destCity.init();
	//注册浮出Div事件
	pkgEle.startCity.$r("focus",function(){
		pkgEle.startCity.blurFlag=false;
		pkgEle.startCityDiv.style.display="";
		pkgEle.startCityDiv.$setIframe();
	});
	pkgEle.startCity.$r("blur",function(){
		if (pkgEle.startCity.blurFlag){
			setTimeout(function(){
				pkgEle.startCity.focus();
			},0);
			return;
		}
		pkgEle.startCityDiv.style.display="none";
		pkgEle.startCityDiv.$clearIframe();
	});
	pkgEle.destCity.$r("focus",function(){
		if (!pkgEle.destCity.module.notice||!pkgEle.destCity.module.address){
			pkgEle.destCity.blur();
			return;
		}
		setTimeout(function(){
			pkgEle.destCity.module.notice.enabled=false;
		},0);
		pkgEle.destCity.blurFlag=false;
		pkgEle.destCity.clock=setInterval(function(){
			var flag=pkgEle.destCity.value.trim();
			pkgEle.destCityDiv.style.display=flag?"none":"";
			if (flag)
				pkgEle.destCityDiv.$clearIframe();
			else
				pkgEle.destCityDiv.$setIframe();
		},100);
	});
	pkgEle.destCity.$r("blur",function(){
		if (!pkgEle.destCity.module.notice||!pkgEle.destCity.module.address){
			pkgEle.destCity.blur();
			return;
		}
		clearInterval(pkgEle.destCity.clock);
		if (pkgEle.destCity.blurFlag){
			setTimeout(function(){
				pkgEle.destCity.focus();
			},0);
			return;
		}
		pkgEle.destCity.module.notice.enabled=true;
		pkgEle.destCityDiv.style.display="none";
		pkgEle.destCityDiv.$clearIframe();
	});
	//初始化destCityDiv
	if (pkgEle.destCityDiv&&$$.module.pkgQuickSearch){
		var dlList=pkgEle.destCityDiv.$("dl");
		var classList=["inChina","outChina","theme"];
		for (var i=0;i<Math.min(dlList.length,3);i++){
			var suggestList=$$.module.pkgQuickSearch[classList[i]];
			if (suggestList){
				for (var j=0;j<suggestList.length;j++){
					var dd=dlList[i].appendChild($c("dd"));
					if(/@/.test(suggestList[j])){
						dd.innerHTML = suggestList[j].replace(/([^@]*)@([^@]*)@([^@]*)/g , function(s , s1 ,s2 ,s3){
							return "<a href=\"javascript:void(0);\" dt=\""+s2+"\" dc=\""+s3+"\"  title=\""+s1+"\">"+s1+"</a>";
						});
					}else{
						dd.innerHTML="<a href=\"javascript:void(0);\" title=\""+suggestList[j]+"\">"+suggestList[j]+"</a>";
					}
				}
			}
		}
	}
	//注册点击事件
	pkgEle.startCityDiv.$r("mousedown",function(e){
		var obj=$fixE(e).$target;
		if (obj.tagName=="A"){
			var txt=obj.innerHTML.trim();
			pkgEle.startCity.value=obj.innerHTML.trim();
			if ($$.browser.IE){
				pkgEle.startCityDiv.innerHTML=pkgEle.startCityDivBak.innerHTML;
				pkgEle.startCity.blur();
			}
			pkgEle.destCity.init();
		}else
			pkgEle.startCity.blurFlag=true;
	});
	pkgEle.startCityDivBak=pkgEle.startCityDiv.cloneNode(true);
	pkgEle.destCityDiv.$r("mousedown",function(e){
		e=$fixE(e);
		if (e.$target.tagName=="A"){
			pkgEle.destCity.value=e.$target.innerHTML.trim();
			var dt = e.$target.getAttribute("dt");
			var dc = e.$target.getAttribute("dc");
			if(dt!=null&&dc!=null){
				pkgEle.destCity.setAttribute("dt" , dt);
				pkgEle.destCity.setAttribute("dc" , dc);
			}
			if ($$.browser.IE){
				pkgEle.destCityDiv.innerHTML=pkgEle.destCityDivBak.innerHTML;
				pkgEle.destCity.blur();
			}
			pkgEle.destCityDiv.style.display="none";
		}
		pkgEle.destCity.blurFlag=true;
	});
	pkgEle.destCityDivBak=pkgEle.destCityDiv.cloneNode(true);
	//初始化出发地code
	if (pkgEle.startCityCode.value){
		pkgEle.startCity.value=$$.module.pkgSearch.pkgStartCityHash[pkgEle.startCityCode.value]||"";
		pkgEle.destCity.init();
	}
	//初始化目的地code
	if (!pkgEle.destCity.value.trim()&&pkgEle.destCityCode.value&&pkgEle.destCityType.value){
		(function(){
			if (!pkgEle.destCity.module.address){
				setTimeout(arguments.callee,500);
				return;
			}
			var strTmp=pkgEle.startCity.value.trim();
			var source=$$.module.address.source[strTmp?"pkg_"+strTmp:"pkgAll"];
			var re=new RegExp("@([^\\|]*)\\|([^\\|]*)\\|"+pkgEle.destCityCode.value+"\\|"+pkgEle.destCityType.value+"[\\|@]","i");
			var arr=source.match(re);
			if (arr){
				pkgEle.destCity.value=arr[2]||arr[1];
				pkgEle.destCity.module.notice.check();
			}
		})();
	}
	//提交校验
	pkgEle.form.onsubmit=function(){
		var flag={destCityCode:pkgDestFlag.destCityCode,destCityType:pkgDestFlag.destCityType};
		pkgDestFlag={destCityCode:null,destCityType:null};
		var strTmp;
		//出发地校验
		strTmp=pkgEle.startCity.value.trim();
		if (!strTmp){
			$alert(pkgEle.startCity,$s2t("请选择您的出发地"));
			return false;
		}
		var code=$$.module.pkgSearch.pkgStartCityHash[strTmp];
		if (!code){
			$alert(pkgEle.startCity,$s2t("请选择正确的出发地"));
			return false;
		}
		pkgEle.startCityCode.value=code;
		//目的地处理
		var source=$$.module.address.source["pkg_"+strTmp];
		strTmp=pkgEle.destCity.isNull&&pkgEle.destCity.isNull()?"":pkgEle.destCity.value.trim();
		if (!strTmp)
			pkgEle.destCityCode.value=pkgEle.destCityType.value="";
		else{
			if(pkgEle.destCity.getAttribute("dt")!=null&&pkgEle.destCity.getAttribute("dc")!=null){
				pkgEle.destCityCode.value=pkgEle.destCity.getAttribute("dc");
				pkgEle.destCityType.value=pkgEle.destCity.getAttribute("dt");
			}else{
				strTmp=strTmp.replace(/([\(\)\\\[\]\.\+\?\*\|\^\$])/gi,"\\$1").replace(/@|\|/gi,"");
				var re=new RegExp("@("+strTmp+"\\|\\||[^\\|]*\\|"+strTmp+"\\|)[^@]+","i");
				var arr=source.match(re);
				if (!arr&&/^[a-z]{2,}$/.test(strTmp)){
					re=new RegExp("@[^@]+\\|"+strTmp+"(\\|[^@]*)?(?=@)","i");
					arr=source.match(re);
				}
				if (arr){
					var str=arr.toString().split("|");
					pkgEle.destCityCode.value=str[2];
					pkgEle.destCityType.value=str[3];
				}else
					pkgEle.destCityCode.value=pkgEle.destCityType.value="";
			}
		}
		//强制填写destCityCode,destCityType
		if (flag.destCityCode)
			pkgEle.destCityCode.value=flag.destCityCode;
		if (flag.destCityType)
			pkgEle.destCityType.value=flag.destCityType;
		//目的地校验
		strTmp=pkgEle.destCity.isNull&&pkgEle.destCity.isNull()?"":pkgEle.destCity.value.trim();
		if (!strTmp){
			$alert(pkgEle.destCity,$s2t("请输入目的地"));
			return false;
		}
		return true;
	};
	//gosearch
	_.goSearch=function(obj,destCityType,destCityCode){
		var str=(obj.innerHTML||obj||"").toString().trim();
		if (!str)
			return;
		pkgDestFlag.destCityCode=destCityCode||null;
		pkgDestFlag.destCityType=destCityType||null;
		pkgEle.destCity.value=str;
		if (pkgEle.destCity.module.notice)
			pkgEle.destCity.module.notice.check();
		if (pkgEle.submitBtn.click)
			pkgEle.submitBtn.click();
		else{
			var evt=__.createEvent("MouseEvents");
			evt.initMouseEvent("click",true,true,_,0,0,0,0,0,false,false,false,false,0,null);
			pkgEle.submitBtn.dispatchEvent(evt);
		}
	};
});

//保存tab状态
$r("beforeunload",function(){
	var searchBoxUl=$("searchBoxUl");
	if (searchBoxUl&&searchBoxUl.module.tab)
		$pageValue.set("module_tab_searchBoxUl",searchBoxUl.module.tab.index);
});
$r("domReady",function(){
	var searchBoxUl=$("searchBoxUl");
	var index=$pageValue.get("module_tab_searchBoxUl");
	if (index&&searchBoxUl&&searchBoxUl.module.tab)
		searchBoxUl.module.tab.select(index);
});

//推荐模块
Ctrip.module.recommend=function(obj){
	var id=obj.id;
	var txt=$(id+"Txt");
	var div=$(id+"Div");
	var panel=$(id+"Panel");
	if (!txt||!div||!panel)
		return;
	var cache={};
	cache[txt.innerHTML.trim()]=panel.innerHTML;
	var count=0;
	function show(src){
		var tmpCount=++count;
		var name=src.innerHTML.trim();
		var page=src.getAttribute("page");
		txt.innerHTML=name;
		var script = "if(typeof(SetLink)==\"function\"){SetLink(setlink_isbig5, '"+id+"Panel"+"');}";
		if (name in cache){
			panel.innerHTML=cache[name];
			eval(script);
		}else{
			panel.innerHTML="<div class=\"pic_loading\"><\/div>";
			$ajax(page,null,function(str){
				if (count==tmpCount&&str!==false){
					cache[name]=panel.innerHTML=str;
					eval(script);
				}
			});
		}
	}
	obj.hideFocus=true;
	obj.style.outline="none";
	var focusFlag=false;
	obj.$r("focus",function(){
		focusFlag=true;
		obj.className="choice_focus";
		div.style.display="";
	});
	obj.$r("blur",function(){
		focusFlag=false;
		obj.className="choice_more";
		div.style.display="none";
	});
	obj.$r("mousedown",function(){
		if (focusFlag)
			setTimeout(function(){
				obj.blur();
			});
		else if ($$.browser.Safari)
			obj.focus();
	});
	div.$r("mousedown",function(e){
		var src=$fixE(e).$target;
		if (src.tagName=="A"){
			show(src);
			if ($$.browser.IE)
				setTimeout(function(){
					src.outerHTML+="";
				});
		}
	});
}

//QuickSearchInit
function quickSearchInit(){
	var form=__.forms["sform"];
	if (!form)
		return;
	var input=$(form["query"]);
	$d(input);
	form.onsubmit=function(){
		if (input.isNull()){
			$alert(input,$s2t("请输入快搜内容"),false,"tl","bl");
			return false;
		}
	};
}

//iframe广告模块
$$.module.adFrame={
	clock:null,
	list:[],
	interval:800,
	timeout:1500,
	count:0
};
Ctrip.module.adFrame=function(obj){
	var $ref=$$.module.adFrame;
	function frameAdInit(){
		var ad=$ref.list.shift();
		var src=ad.getAttribute("mod_adFrame_src")||"about:blank";
		var style=ad.getAttribute("mod_adFrame_style")||"";
		ad.innerHTML="<iframe marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" scrolling=\"no\" style=\""+style+"\""+" src=\""+src+"\"><\/iframe>";
		if ($ref.list.length)
			setTimeout(arguments.callee,$ref.interval);
		else
			$ref.clock=null;
	}
	$ref.list.push(obj);
	if (!$ref.clock){
		if ($ref.count)
			frameAdInit();
		else
			$ref.clock=setTimeout(frameAdInit,$ref.timeout);
	}
	$ref.count++;
};


$r("load",function(){
	$d($("adShow1"));
	$d($("adShow2"));
	$d($("adShow3"));
});
