/*
Copyright(C) Ctrip.COM 2006.All Rights Reserved.
Not to be reused without permission.
Created by Ma ChangKun, UI group, IT department.
Last modified by Chu Chengdong, UI group, IT department. 2007/09/21
*/
var _=window,__=_.document,__h=__.documentElement;with(navigator){with(userAgent){var operator_={e_window_onload:false,e_IE:!!match(/MSIE/),e_IE6:!!appVersion.match(/MSIE 6\.0/),e_FF:!!match(/Mozilla/),e_Opera:!!match(/Opera/),e_Mac:!!match(/Mac/),e_busy:0,dealt:{},tab:{},selectall:{},checkform:{},address:{},jmpinfo:{},popwin:{}}}}if(operator_.e_IE6)__.createStyleSheet().addRule("body","behavior:url(/window_ctrip/webresource/ui/csshover2.htc)");operator_.e_charset=((__.charset?__.charset:__.characterSet)||"gb2312").toLowerCase();operator_.e_charset=(operator_.e_charset.match(/^(gb2312|big5|utf-8)$/g)||"gb2312").toString();operator_.e_chs=!operator_.e_charset.match(/^utf-8$/g);operator_.e_iframe={address:"address_070713",calender:"calender_070713",jmpinfo:"jmpinfo_070713",checkinfo:operator_.e_chs?"checkinfo_070713":"engcheckinfo_070713",popwin:"popwin_070713"};function $(a){return __.getElementById(a)}function $fixE(e){return e||_.event}function $fixElement(e){return e.target?(e.target.nodeType==3?e.target.parentNode:e.target):e.srcElement}function $fixWindow(a){var b=a.ownerDocument;return b.parentWindow||b.defaultView}Number.prototype.formatCur=function(){_v_num=this.toFixed(2);var a=/(\d)(\d{3}[,\.])/;while(a.test(_v_num))_v_num=_v_num.replace(a,"$1,$2");return _v_num.replace(/^(-?)\./,"$10.")};Array.prototype._push=function(b){if(b===null)return;$each.call(this,b,function(a){if(this.each(function(_t_obj){if(_t_obj==a)return false}))this.push(a)})};Array.prototype.each=function(a){for(var i=0;i<this.length;i++)if(a(this[i],i)===false)return 0;return 1};Array.from=function(a){if(a.length===undefined)return[a];var b=[];for(var i=0;i<a.length;i++)b.push(a[i]);return b};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'')};String.prototype.isEmail=function(){var a=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;return a.test(this)};String.prototype.isDateTime=function(){var a,b;var a=top.operator_.e_chs?this:this.replace(/^(\d{1,2})-(\d{1,2})-(\d{4})$/,"$3-$1-$2");b=a.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);if(!b)return false;for(var i=1;i<4;i++)b[i]=parseInt(b[i],10);if(b[1]<1000||b[1]>9999||b[2]<1||b[2]>12||b[3]<1||b[3]>31)return false;var d=new Date(b[1],b[2]-1,b[3]);return d.getFullYear()==b[1]&&d.getMonth()==b[2]-1&&d.getDate()==b[3]};String.prototype.parseEngDate=function(){var b="January|1@February|2@March|3@April|4@May|5@June|6@July|7@August|8@September|9@October|10@November|11@December|12",c=this.replace(/[ \-,\.\/]+/g,"-").replace(/(^|-)0+(?=\d+)/g,"$1").replace(/[a-z]{3,}/i,function(a){return(_t_re=b.match(new RegExp("(^|@)"+a+"[^\\|]*\\|(\\d+)","i")))?_t_re[2]:a}).replace(/^([^-]{1,2}-[^-]{1,2})-([^-]{4})$/,"$2-$1");return c.isDateTime()?c:null};String.prototype.parseStdDate=function(){var a=this.parseEngDate();if(!a)return null;var b=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(b[2])-1]+"-"+b[3]+"-"+b[1]};String.prototype.parseDate=function(){var a,b=(new Date()).dateValue(),c=top.operator_.e_chs?this:this.replace(/^(\d{1,2})-(\d{1,2})-(\d{4})$/,"$3-$1-$2");a=c.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);if(!a)return b;for(var i=1;i<4;i++)a[i]=parseInt(a[i],10);if(a[1]<1000||a[1]>9999)a[1]=b.getFullYear();if(a[2]<1||a[2]>12)a[2]=b.getMonth()+1;if(a[3]<1||a[3]>31||(new Date(a[1],a[2]-1,1)).getMonth()!=(new Date(a[1],a[2]-1,a[3])).getMonth())a[3]=b.getDate();return new Date(a[1],a[2]-1,a[3])};Date.prototype.dateValue=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate())};Date.prototype.getChineseDay=function(){return $$ba.a.charAt(this.getDay())};function $each(a,b){var c;if(a!==null)if(a.length!==undefined)for(var i=0;i<a.length&&(c=b.call(this,a[i],i))!==false;i++);else b.call(this,a,0);return c===false?0:1}function $iterator(b,c){$each.call(this,b.childNodes,function(a){c.call(this,a);$iterator(a,c)})}function $loadjs(a,b){var c=__.createElement('script');with(c){src=a;type='text/javascript';charset=b||operator_.e_charset}__.getElementsByTagName('head')[0].appendChild(c)}$loadjs("/window_ctrip/code/js/resource/string_"+top.operator_.e_charset+".js",top.operator_.e_charset);function $t(a){if(_!=top)top.$t(a)}if(!_.$r)$r=function(_v_obj,_v_elist){var _v_flist=[].slice.call(arguments,2);$each(_v_elist.split(/[^A-Za-z]/g),function(b){$each(_v_flist,function(a){if(_v_obj.attachEvent)_v_obj.attachEvent(b,a);else _v_obj.addEventListener(b.replace(/^on/i,""),a,false)})})};function $ur(c,d){var e=[].slice.call(arguments,2);$each(d.split(/[^A-Za-z]/g),function(b){$each(e,function(a){if(c.detachEvent)c.detachEvent(b,a);else c.removeEventListener(b.replace(/^on/i,""),a,false)})})}function $init(){}function $rinit(a){var b=$init;$init=function(){b();a()}}function $stopevent(e,a){e=e||$fixE(e);a=a||0;if(a>=0)e.preventDefault?e.stopPropagation():(e.cancelBubble=true);if(a!=0)e.preventDefault?e.preventDefault():(e.returnValue=false)}function $g(n,o){function _m_query(g,h){var k=[],l=g.match(/^([\.\#]*)([a-zA-Z0-9\-_*]+)(.*)$/i);if(!l)return[];if(l[1]=="#"){var m=$(l[2]);if(m)k.push(m)}else if(l[1]==".")h.each(function(_v_obj){$each(_v_obj.getElementsByTagName("*"),function(a){if(a.className.match(new RegExp("\\b"+l[2]+"\\b")))k.push(a)})});else for(var i=0;i<h.length;i++){var m=h[i].getElementsByTagName(l[2]);if(m)for(var j=0;j<m.length;j++)k.push(m[j])}l[3].replace(/\[([^!=]+)(=|!=)([^\]]*)\]/gi,function(a,b,c,d){var f=k.slice(0);k=[];f.each(function(a){b={_class:"className",_for:"htmlFor"}["_"+b]||b;var e=a[b]||a.getAttribute(b);if(c!="="^e==d)k.push(a)})});return k}var p=[o||__.body];n.replace(/(#|\*)/gi," $1").replace(/([^\^ ])\.(\w+)/gi,"$1[className=$2]").trim().split(/\s+/g).each(function(a){p=_m_query(a,p)});return p.length==0?null:p}function $parser(a){$each((a&&a.tagName?a:__.body).getElementsByTagName("*"),$deal_elements);$init()}function $parserByRegExp(c){(c&&c.tagName?c:__.body).innerHTML.replace(/id=["']?([^ '"\/<>]+_[^ '"\/<>]+_m)["' \/>]/gi,function(a,b){$deal_elements($(b))});$init()}function $deal_elements(g){if(!g||!g.id||!g.id.match(/_m$/i)||operator_.dealt[g.id]==g)return;operator_.dealt[g.id]=g;g.id.replace(/_([^_]+)(?=_)/g,function(a,b){var c,d,f;if(_["c_module_"+b])new _["c_module_"+b](g);else if(_["m_module_"+b])_["m_module_"+b].minit(g);else if(c=operator_.e_iframe[b]){if(d=top.$("iframe_"+b))d.list._push(g);else{d=top.__.createElement("iframe");with(d){with(style){display="none";position="absolute";padding=margin="0";overflow="hidden";background="transparent";zIndex="100"}src="/window_ctrip/webresource/ui/"+c+".html";frameBorder="0";id="iframe_"+b;allowTransparency=!operator_.e_IE6}d.list=[g];if(!(f=top.$("iframes_container"))){f=top.__.createElement("div");f.id="iframes_container";with(top.__.body){try{appendChild(f)}catch(e){insertBefore(f,lastChild)}}}f.appendChild(d)}}})}function $get_position(a){var b,c=[0,0],d,e,f={"thin":2,"medium":4,"thick":6},g;function _m_fix_border(){g=[$get_style(a,"borderLeftStyle").match(/none|hidden/)?0:$get_style(a,"borderLeftWidth"),$get_style(a,"borderTopStyle").match(/none|hidden/)?0:$get_style(a,"borderTopWidth")];c[0]+=f[g[0]]||parseInt(g[0])||0;c[1]+=f[g[1]]||parseInt(g[1])||0}do{b=$fixWindow(a);if(a.tagName.match(/^(iframe|frameset)$/i))_m_fix_border();e=-1;do{c[0]+=a.offsetLeft-a.scrollLeft;c[1]+=a.offsetTop-a.scrollTop;switch($get_style(a,"position")){case"absolute":_m_fix_border();break;case"fixed":e=1;break}}while((a=a.offsetParent)&&a!=b.__h);if(operator_.e_Mac){c[0]+=__.body.leftMargin||0;c[1]+=__.body.topMargin||0}if(e==1||b!=top){c[0]+=b.__h.scrollLeft*e;c[1]+=b.__h.scrollTop*e}}while(a=b.frameElement);return c}function $set_position(g,h,i,j){function _m_query(e,f){function _m_cal(a,b,c,d){return c+{"l":0,"c":b.offsetWidth/2,"r":b.offsetWidth,"t":0,"m":b.offsetHeight/2,"b":b.offsetHeight}[a||"l"]*d}return _m_cal(i.match(e),g,_m_cal(j.match(e),h,k[f],1),-1)+"px"}var k=$get_position(h);i=i||"lt";j=j||"lb";g.style.left=_m_query(/[lcr]/i,0);g.style.top=_m_query(/[tmb]/i,1)}function $nsib(a){return a.nextSibling||a.parentNode.firstChild}function $psib(a){return a.previousSibling||a.parentNode.lastChild}function _$abs_(a,b){if(!a)return null;b=b||"n";_v_re=new RegExp(({_p_1:"n",_p_3:"t",_p_8:"c"}["_p_"+a.nodeType])||"o","i");return b.match(_v_re)?a:arguments.callee.caller(a,b)}function $nabs(a,b){var c=a.firstChild||a.nextSibling;if(c)return _$abs_(c,b);do{a=a.parentNode;if(a==__.body)return null;c=a.nextSibling}while(!c);return _$abs_(c,b)}function $pabs(a,b){if(a==__.body)return null;var c=a.previousSibling;if(c){while(c.lastChild)c=c.lastChild}else return _$abs_(a.parentNode,b);return _$abs_(c,b)}function $next_focus(b){if(!b.form)return;try{b.blur()}catch(e){};var c=b.form.elements,d;$each(c,function(a){if(d)try{a.focus();return false}catch(e){};if(a==b)d=true})}function $set_display(b){$get_position(b).each(function(a,i){top.__h[["scrollLeft","scrollTop"][i]]=a-80})}function $get_style(a,b){var c=a.currentStyle||$fixWindow(a).getComputedStyle(a,null);return b?c[b]:c}function $uid(){return"uid_"+(new Date()).getTime()+parseInt(Math.random()*100000,10)}function $fix_height(d,e){if(operator_.no_fix_height)return;function _m_query(a,b){if(!a||!b||!a.style||!b.style)return;a.style.height=b.style.height="";if(a.offsetHeight>b.offsetHeight){var c=a;a=b;b=c}with(a){with(style){height=b.offsetHeight-offsetHeight+clientHeight+"px";overflow="hidden"}}}if(arguments.length<2){var f="pubGlobal_",g=f+"main_";_m_query($(f+"column05"),$(f+"column04"));_m_query($(g+"sidebar"),$(g+"content"));_m_query($(g+"sidebar"),$(g+"content3"))}else _m_query($(d)||d,$(e)||e)}function $fix_elements(){$each(__.body.getElementsByTagName("label"),function(b){if(b.htmlFor)return;$each(b.getElementsByTagName("input"),function(a){if(a.type.match(/radio|checkbox/i)){b.htmlFor=a.id=a.id||$uid();return false}})});$each(__.body.getElementsByTagName("select"),function(a){$r(a,"onmousewheel",function(){return false})})}function $getquery(a){var b=(location.search||"").match(new RegExp("[\?&]"+a+"=([^&]+)","i"));return b?unescape(b[1]):null}function $getpara(a){var b=a.getAttribute("para")||"",c=b.split(b.indexOf("")>-1?"":",");for(var i=1;i<=Math.max(arguments.length-1,c.length);i++)c[i-1]=c[i-1]||arguments[i]||"";return c}function c_module_notice(a){a.notice=$getpara(a)[0];function _m_check(){if(a.unnotice)return;with(a){if(!value||value==notice){style.color="gray";value=notice}else style.color=""}}_m_check();$r(a,"onfocus",function(){with(a){style.color="";if(value==notice)value=""}});$r(a,"onblur",function(){setTimeout(_m_check,0)})}function c_module_tab(e){var f=$getpara(e,null,null,null);if(operator_.tab[f[0]])return operator_.tab[f[0]](e);if(!f[1]||!f[2])return;var g=$g(f[1]),h=$g(f[2]),i={"true":"_current","false":"_nocurrent"};if(!g||!h||g.length!=h.length)return;$each(g,function(c,d){$r(c,"onclick",function(){$each(g,function(a,b){a.className=a.className.replace(i[d!=b],i[d==b]);h[b].style.display=(d==b)?"":"none"})})})}function c_module_display(c){var d=$getpara(c),e=[],f=1;$each(d,function(a){a.replace(/@/g,function(){f=0;return""});e._push($(a))});$r(c,"onclick",function(){$each(e,function(a,i){var b=$get_style(a,"display")=="none";a.style.display=b?"":"none";b=b&&f;if(i==0)$iterator(c,function(c){with(c){if(nodeType==3){nodeValue=nodeValue.replace(b?$$bd.a:$$bd.b,b?$$bd.b:$$bd.a);nodeValue=nodeValue.replace(b?$$bd.c:$$bd.d,b?$$bd.d:$$bd.c)}}})});$fix_height()})}function c_module_selectall(c){var d=$getpara(c,""),e=$g(d[0]);if(operator_.selectall[d[0]])return operator_.selectall[d[0]](c);if(!e)return;$each(e,function(b){if(b!=c)$r(b,"onclick",function(){c.checked=$each(e,function(a){if(a!=c&&!a.checked)return false})})});$r(c,"onclick",function(){$each(e,function(a){a.checked=c.checked})})}function c_module_checkform(d){var e=$getpara(d,"","",$$bc.a),f=$(d.id+"_msg"),g="",h,i=e[1].match(/^\w+/)||"";if(!f||!e[1])return;if(!operator_.checkform[i])return;$r(d,"onfocus",function(){h=setInterval(function(){var a=d.value.trim();if(a==g)return;else g=a;if(!a)return f.innerHTML="";var b=operator_.checkform[i](d,e),c=e[2];if(typeof b=='string'){c=b;b=false}f.innerHTML=b?"<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"pubGlobal_cuebox02\"><tr><td class=\"td01\"></td></tr></table>":("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"pubGlobal_cuebox01\"><tr><td class=\"td01\">"+c+"</td></tr></table>")},200)});$r(d,"onblur",function(){clearInterval(h)})}operator_.checkform.public_int=function(a,b){if(isNaN(a.value)||a.value!=Math.ceil(a.value))return false;var c=b[1].match(/\((\d*)-(\d*)\)/);if(c){if(c[1]&&!isNaN(c[1])&&parseInt(a.value)<parseFloat(c[1]))return false;if(c[2]&&!isNaN(c[2])&&parseInt(a.value)>parseFloat(c[2]))return false}return true};operator_.checkform.public_date=function(a,b){var c=a.value.replace(/[\\\/\. ]/gi,"-");return c.isDateTime()};operator_.checkform.public_mail=function(a,b){return a.value.isEmail()};function c_module_class(a){var b=$getpara(a,"","","");if(b[0]=="url"&&top.location.href.toLowerCase().indexOf(b[1].toLowerCase())!=-1)a.className=b[2]}function checkinfo(a,b,c){if(_!=top)top.checkinfo($(a)||a,b,c)}function $preload(){if(!$("priFoot_sign"))return;$clear_preload();$ur(top,"onload",$fix_elements,$parserByRegExp);$fix_elements();$parserByRegExp()}function $clear_preload(){clearInterval(operator_.e_preload)}operator_.e_preload=setInterval($preload,500);$r(_,"onload",function(){operator_.e_window_onload=true});var t_window=top.operator_.e_window_onload?_:top;$r(t_window,"onload",$clear_preload,$fix_elements,$fix_height,$parserByRegExp);
