function getXPosition(e){
    var x = e.offsetLeft;
    while( e = e.offsetParent ){
        x+=e.offsetLeft;
    }
    return x;
}
function getYPosition(e, eHeight){
    var y = e.offsetTop;
    while( e = e.offsetParent ){
        y+=e.offsetTop;
    }

    return y + eHeight;
}
var $topWin=window;
(
 function(){
	try{
		while(true){
		    var a=$topWin.parent;
		    if(a&&a!=$topWin&&a.$Jtb)
		        $topWin=a;
            else
            	return;
        }
    }catch(e){}
 }
)();

window.$Jtb=function(h){
		this.Variable=
		function(){
			this._=h;
			this.__=h.document;
			this.___=h.__.documentElement;
			h.__.write("<div id=\"jsContainer\"><input id=\"jsSaveStatus\" type=\"text\" style=\"display:none\" \/><div id=\"tuna_jmpinfo\" style=\"display:none; 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>");
			this.$$=
			new function(){
				this.status=new function(){
								this.domReady=false;
								this.busy=0;
								this.dealt={};
								this.regEventCount=0;
								this.regEventHash={};
								this.charset=(((h.__.charset?h.__.charset:h.__.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=h.__.getElementById("tuna_alert");
								this.container=h.__.getElementById("jsContainer");
								this.saveStatus=h.__.getElementById("jsSaveStatus");
								this.back=false;
								this.pageValue={};
								this.globalValue={};
								this.today=new Date().toStdString()
                };

				this.module={
					iframe:[],
					list:{address:"jtb",calendar:""},
					tab:{},
					selectAll:{},
					checkInput:{},
					address:{source:{}},
					calendar:{},
					jmpInfo:{count:0,page:{},array:{}},
					init:[]
				};
	
				with(navigator){
					with(userAgent){
						this.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)
						}
					}
				}
			
				this.string={
					"zh-cn":{weekday:"日一二三四五六",display:"@▲|▼@显示|隐藏@"},
					"zh-tw":{weekday:"日一二三四五六",display:"@▲|▼@顯示|隱藏@"},
					"en":{weekday:"SMTWTFS",display:"@Show|Hidden@"}
					}[this.status.version];
					this.access={}
					}
        };

this.window=
    function(){
		this.$fixE=function(a){
			a=h.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
		};
        this.$stopEvent=function(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)
		};
        this.$getUid=function(){
			return"uid_"+(new Date()).getTime()+Math.random().toString().substr(2,5)
		};
        this.$c=this.$createElement=function(a){
				                            if(a.constructor==Array)
											    return $(h.__.createTextNode(a.join("\n")));
                                            else 
											    return $(h.__.createElement(a))
										};
        this.$pageValue=function(){
				            return h.$pageValue.get.apply(h,arguments)
							};
(
function w(){
    var f=h.$$.status.saveStatus.value;
    if(f)$$.status.back=true;
    h.$$.status.saveStatus.value.replace(/\|([^:\|]+):([^:\|]*)\|/g,function(a,c,d){
																			 h.$$.status.pageValue[unescape(c)]=unescape(d)
																	});
    x()
	}
)();


function x(){
	var a=[];
    for(var c in h.$$.status.pageValue)
	    a.push(escape(c)+":"+escape(h.$$.status.pageValue[c]));
    h.$$.status.saveStatus.value="|"+a.join("|")+"|"
}

this.$pageValue.set=function(a,c){h.$$.status.pageValue[a]=c};

this.$pageValue.get=function(a){return h.$$.status.pageValue[a]};

this.$pageValue.del=function(a){delete h.$$.status.pageValue[a]};

this.$globalValue=function(){};

this.$getQuery=function(a){
	               var c=(location.search||"").match(new RegExp("[\\?&]"+a+"=([^&]+)","i"));
                   return c?unescape(c[1]):null
               };
			   
this.$loadJs=function(a,c,d){
	             var f=arguments.callee;
                 var g=f.queue||(f.queue={});
                 c=c||h.$$.status.charset;
                 a=a.replace('{$charset}',c);
                 if(a in g){
					 if(d){
						 if(g[a])
						     g[a].push(d);
                         else 
						     d()
						 }
				     return;
				 }
				 g[a]=d?[d]:[];
                 var i=h.__.createElement("script");
				 i.type="text/javascript";
				 i.charset=c;
                 i.onload=i.onreadystatechange=function(){
					                               if(i.readyState&&i.readyState!="loaded"&&i.readyState!="complete")
												       return;
                                                   i.onreadystatechange=i.onload=null;
                                                   while(g[a].length)
												       g[a].shift()();
                                                   g[a]=null
											   };
                 i.src=a;
                 h.__.getElementsByTagName("head")[0].appendChild(i)
		     };
this.$loadCss=function(a,c){
	              if($$.browser.IE)
				      h.__.createStyleSheet(a).charset=c||h.$$.status.charset;
                  else{
					  var d=h.__.createElement("link");
                      with(d){
						  type="text\/css";
                          rel="stylesheet";
                          href=a
					  }
					  h.__.$("head")[0].appendChild(d)
				  }
			  };

this.$init=function(a){
	           if(a)
			       $topWin.$$.module.init.push(a);
               else 
			       $topWin.$$.module.init.each()
			};
this.$parserRe=function(d){
	               var f=[];
				   var g=/<[^>]+\smod=[\'\"]?([\w|]+)[^>]+/g;
				   var i=/\smod_jmpInfo_page=[\'\"]?([^\'\"\s]+)/;
				   var j=/id=[\'\"]?([\w\-]+)/i;
				   var k=null;
				   var m=null;
				   var l=null;
                   (d&&d.innerHTML?d:h.__.body).innerHTML.replace(g,function(a,c){
																		 try{
																			 if(c=="jmpInfo"){
																				 if(k=a.match(i))
																					 Jtb.module.jmpInfo(k[1])
																				 }else if((m=a.match(j))&&(l=$(m[1]))){
																					 if(c in Jtb.module)
																						 new Jtb.module[c](l);
																					 else f.push(l)
																				 }
																		  }catch(e){
																			  $t("parserRe函数错误:"+func.toString().slice(0,50)+"...","red")
																		  };
																		  return""
																	});
					var n=setInterval(function(){
										  var a=f.shift();
										  if(a)
											  $topWin.$d(a);
										  else 
											  clearInterval(n)
									   },50)
               };
///////////////////////
this.$d=this.$dealElement=function(c){
	                          ($(c).getAttribute("mod")||"").replace(/\w+/ig,function(a){
																			     if($topWin.$$.module.list[a]){
																					 if(!$topWin.$$.module[a].list){
																						 $topWin.$$.module[a].list=[];
                                                                                         $topWin.$loadJs("","utf-8")
																					 }
																					 $topWin.$$.module[a].list.push(c);
                                                                                     $topWin.$init()
																				 }else if(Jtb.module[a]){
																					 if(a=='jmpInfo')
																						 Jtb.module[a](c);
																					 else 
																						 new Jtb.module[a](c)
																				 }
																					     return''
																			 })
						 };
						 
this.$i=function(i){
	var j=h.$$.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 h.$$.access[i]=j
};


this.$fixElement=function(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._0;
						if(c){
							a.htmlFor=c.id||(c.id=$getUid());
							a._0=null
							}
						var d=a.style;
						d.borderBottom='#aaa 1px dashed';
						d.paddingBottom='0px';
						d.color='#1E1A75'
					}
					function m(a){
						var c=a.style;
						c.borderBottom='';
						c.paddingBottom='';
						c.color=''
					}
					f=f&&f.nodeType?f:h.__;
                    if($$.browser.IE6){
						var l=f.getElementsByTagName("label");
					for(var n=0;n<l.length;n++){
						var o=i(l[n]);
						if(o&&/checkbox|radio/.test(o.type))
							(function(lbl,box){
								 lbl._0=box;
								 g(lbl,'mouseover',function(){
													   k(lbl)
												   });
								 g(lbl,'mouseout',function(){
													   m(lbl)
												  })
							})(l[n],o)
					}
                    }if($$.browser.IE){
					    var t=f.getElementsByTagName("select");
					    for(var n=0;n<t.length;n++)
						    t[n].onmousewheel=function(){
											  return false
										  }
					}
};
				
this.$removeTextNode=function(a){
	if(!a)
	    return;
    var c=a.firstChild,d;
    while(c){
		d=c.nextSibling;
        if(c.nodeType==3)
		    a.removeChild(c);
        else 
		    $removeTextNode(c);
        c=d
	}
	return a
};




function y(a){
	var c=a.keyCode||a.charCode;
    if($$.status.debug&&c==192){
		var d=r();
        if(d&&(d=d.frameElement))
		    d.style.display=d.style.display==""?"none":""
		}
	}

function r(){
	var a=$topWin.frames["Ctrip_debug"];
    if(a)
	    return a;
    with(a=$topWin.$c("iframe")){
		frameBorder=0;
		id=name="Ctrip_debug";
		style.border="1px solid red";
		style.width="600px";
		style.height="300px";
		style.position=$$.browser.IE6?"absolute":"fixed";
		style.bottom=style.right="10px"
    }
	$topWin.$$.status.container.appendChild(a);
    if($$.browser.IE6)
	    $topWin.$r("scroll",function(){
									 with($("Ctrip_debug").style){
										 zoom=1;
                                         zoom=0
									 }
							});
    with((a=r()).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",y);
    return a
}

this.$t=function(a,c,d){
	if(!$topWin.$$.status.debug)
	    return;
    if(h!=$topWin)
	    return 
	$topWin.$t(a,c);
	var f=r();
	var g=new Date().getTime()%(1E7);
	var i="<font id=\"msg_"+g+"\" color=\""+c+"\"> "+a+"<\/font>";
	var j=f.document.createElement("div");
	if(c)
	    j.style.color=c;
	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
};

this.$alert=function(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 m(){
					a.className=a.className.replace("pubGlobal_checkinfo_input01","");
					$topWin.$$.status.alertDiv.style.display="none";
					$topWin.$$.status.alertDiv.$clearIframe();
					a.$ur("onblur",m);
					h.__.body.$ur("onmousedown",m);
					a.clearAlert=null;
					h.$alert.element=null
				}
				if(a.disabled)
					k=0;
				else 
					setTimeout(function(){
										try{a.focus()}catch(e){k=0}
							   },0);
				if(k)
					a.$r("onblur",m);
				else 
					h.__.body.$r("onmousedown",m);
					h.$alert.element=a;
					a.clearAlert=m
};

this.checkinfo=this.$alert;
this.$fix_height=function(){};
this.c_linklist={};
this.c_allyes_text={};
this.c_allyes_delay=1000};
////////////////////////////////////////////////
function p(a){
	return(a.toString().match(/function([^\{]+)/i)||["","anonymous"])[1].replace(/\(\)/,"").trim()||"anonymous"
}

function s(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+=" "+p(a.func);
    return c
}

function q(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(s(c[f])+" ("+(typeof d=="undefined"?"无返回值":d.toString().slice(0,100))+")",null,c[f].func);
                        if(d===false)
						    break
				}catch(a){
					$t(s(c[f])+" (执行错误)","red",c[f].func)
				}
			}else{
				c.splice(f,1);
                f--
			}
		}
	return d
	}
};


function N(a,c){
	if(typeof a=="object")
	return Jtb.Object.apply(a);
    var d;
    if(c){
		var f=h.___.innerHTML.match(new RegExp("\\sid=([\\\'\\\"]?)([\\w$]+?[_$]"+a.toReString()+")\\1"),"g");
        if(f){
			for(var g=0;g<f.length;g++){
				d=h.$(f[g]);
                if(d)return d
			}
		}
		return h.$(a)
	}else 
	d=h.__.getElementById(a);
    return d?$(d):null
};


function C(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
};

function u(){return!this.value.trim()};

function z(a){
	for(var c=0;c<this.options.length;c++){
		if(this.options[c].value==a){
			this.selectedIndex=c;
            return true
		}
	}
	return false
};


function v(a){return typeof this.attributes[a]!="undefined"};


function A(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
};

function D(){return $(this.firstChild)};

function F(){return $(this.lastChild)};

function G(){
	var a=this.childNodes;
    for(var c=0;c<a.length;c++)$(a[c]);
    return a
};

function H(){return $(this.nextSibling)};

function I(){return $(this.previousSibling)};

function J(){
	if(this.click)
	    this.click();
    else{
		var a=__.createEvent("MouseEvents");
    a.initMouseEvent("click",true,true,h,0,0,0,0,0,false,false,false,false,0,this);
    this.dispatchEvent(a)
	}
};

function O(a){var c=this.currentStyle||h.getComputedStyle(this,null);
return a?c[a]:c};

function K(){
	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
};

function P(i,j,k,m){
	m=m||50;
    if(arguments.length==3&&typeof k=="number"){
		m=k;
        k=null
	}
	var l=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")
									    l=h;
                                    var f={enabled:true,obj:l,event:g,func:d,hash:k,level:m,id:h.$$.status.regEventCount++};
                                    if(g=="domready"&&h.$$.status.domReady)
									    d();
                                    else{
										if(!(g in l.module.event)){
											l.module.event[g]=[];
                                            if(l.attachEvent)
											    l.attachEvent("on"+g,q(l));
                                            else 
											    l.addEventListener(g,q(l),false)
										}
									l.module.event[g].push(f);
                                    l.module.event[g].sort(function(a,c){
																	return(a.level-c.level)||(a.id-c.id)
															})
									}
									if(k){
										if(!(k in h.$$.status.regEventHash))
										    h.$$.status.regEventHash[k]=[];
                                            h.$$.status.regEventHash[k].push(f)
									}
					})
	})
};


function Q(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,"").toLowerCase();
                                    f=f=="DOMContentLoaded"?"domready":f.toLowerCase();
                                    if(f=="domready")
									    k=h;
                                    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
											}
										}
									}
					})
	})
};


function L(a){
	var c=this;
    if(a in h.$$.status.regEventHash){
		var d=h.$$.status.regEventHash[a],f;
        while(f=d.shift())
	        f.obj.$ur(f.event,f.func,a);
        delete h.$$.status.regEventHash[a]
	}
};

function R(){
	var a=this.ownerDocument;
    return a.parentWindow||a.defaultView
};

function B(x){
	function y(k,m){
		var l=[],n=k.match(/^([\.\#]*)([a-zA-Z0-9\-_*]+)(.*)$/i);
        if(!n)
		    return[];
        if(n[1]=="#"){
			var o=$(n[2]);
            if(o)
			    l.push(o)
		}else if(n[1]==".")
		    m.each(function(obj){
							$each(obj.$("*"),function(a){
													  if(a.className.match(new RegExp("\\b"+n[2]+"\\b")))
													      l.push($(a))
													  })
							});
        else 
		    for(var t=0;t<m.length;t++){
				var o=m[t].$(n[2]);
                if(o)for(var w=0;w<o.length;w++)l.push(o[w])
			}
			n[3].replace(/\[([^!=]+)(=|!=)([^\]]*)\]/gi,function(d,f,g,i){
															var j=l.slice(0);
															l=[];
															j.each(function(a){
																			f={_3:"className",_0:"htmlFor"}["_"+f]||f;
																			var c=a[f]||a.getAttribute(f);
																			if(g!="="^c==i)l.push($(a))
																   })
			                                            });
            return l
		}
		var r=[this==h?h.__.body:this];
        x.replace(/(#|\*)/gi," $1").replace(/([^\^ ])\.(\w+)/gi,"$1[className=$2]").trim().split(/\s+/g).each(function(a){
																													   r=y(a,r)
																											  });
        return r.length==0?null:r
    };


    function M(){
		var f=this,g=this,i,j=[0,0],k,m={"thin":2,"medium":4,"thick":6};
        
		function l(){
			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 m[c]||parseInt(c,12)||0
			}
			j[0]+=d("Left");
            j[1]+=d("Top")
		}
		do{
			i=$(g).$getWin();
            if(g.tagName.match(/^(iframe|frameset)$/i))
			    l();
            k=-1;
            do{
				j[0]+=g.offsetLeft-g.scrollLeft;
                j[1]+=g.offsetTop-($$.browser.Safari&&g==i.document.body?0:g.scrollTop);
                switch(g.$getStyle("position")){
					case"absolute":l();
                        break;
                    case"fixed":k=1;
                        break
				}
			}
			while(g.offsetParent&&g!=g.offsetParent&&(g=$(g.offsetParent))&&g!=h.___);
            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
			}
		}
		while(g=i.frameElement);
        return j
	};


	function S(k,m,l){
		function n(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(m.match(g),this,j(l.match(g),k,o[i],1),-1)+"px"}var o=k.$getPos();
				m=m||"lt";
				l=l||"lb";
				this.style.left=n.call(this,/[lcr]/i,0);
				this.style.top=n.call(this,/[tmb]/i,1)};


                function T(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");
						f.src="CityList";
                        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
			};

			function U(){
				var a=this.module.iframe;
				if(a){
					a.style.display="none";
					this.module.iframe=null
				}
				return a
			};


			function ba(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)
			}
			function V(a){
				var c=this,d=c.firstChild||c.nextSibling;
			    if(!d)
				do{
					c=c.parentNode;
			        if(c==h.__.body)
					    return null;
			        d=c.nextSibling
				}
				while(!d);
			    return $($abs(d,a,arguments.callee))
			};


			function W(a){
				if(this==h.__.body)
				    return null;
			    var c=this.previousSibling;
			    if(c){
					while(c.lastChild)
					    c=c.lastChild
				}
				else 
				    c=this.parentNode;
			    return $($abs(c,a,arguments.callee))
			};


			function X(){
				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
				}
			};

			function Y(){
				var a=this.$getPos();
				with($topWin.___){
					scrollLeft=a[0]-80;
					scrollTop=a[1]-80
				}
			};


			function Z(){
				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
			};

			this.Object=function(){
							if(!this||this.nodeType==3||this.$)
								return this;
							if(this.__)
								this.$=N;
							else 
								this.$=C;
							this.module={};
							this.module.event={};
	
							if(this.nodeType==1){
								if(this.tagName=="INPUT"&&/^(text|hidden)$/i.test(this.type)||this.tagName=="TEXTAREA")
								this.isNull=u;
								if(/^SELECT$/.test(this.tagName))
								this.$setValue=z
							}
	
							if(!this.hasAttribute)
								this.hasAttribute=v;
							this.$parentNode=A;
							this.$firstChild=D;
							this.$lastChild=F;
							this.$childNodes=G;
							this.$nSib=this.$nextSibling=H;
							this.$pSib=this.$previousSibling=I;
							this.$click=J;
							this.$getStyle=O;
							this.$getPara=K;
							this.$r=this.$regEvent=P;
							this.$ur=this.$unregEvent=Q;
							this.$urh=this.$unregEventHash=L;
							this.$getWin=R;
							this.$g=this.$selNode=B;
							this.$getPos=M;
							this.$setPos=S;
							this.$setIframe=T;
							this.$clearIframe=U;
							this.$nAbs=V;
							this.$pAbs=W;
							this.$focusNext=X;
							this.$setDisplay=Y;
							this.$isDisplay=Z;
							return this
            };

			this.Array=function(){
				this.each=function(a){
					for(var c=0; c<this.length; c++)
					    if((a?a(this[c],c):this[c]())===false)
					        return false;
					return true
				};
				if($$.browser.IE)
				    this.map=function(func){
						var d=[];
				        for(var f=0;f<this.length;f++)
				            d.push(func(this[f]));
				        return d
			        }
		   };

			this.Number=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(/^(-?)\./,"$12.");
					return a===0?c.replace(/\..*$/,""):c
				}
			};

           this.String=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.Date=function(){
				this.dateValue=function(){};
				this.toStdString=function(){};
			};
		
			this.module=new function(){};
		
			this.debug=new function(){};
			this.Date.apply(h.Date.prototype);
			
			this.Variable.apply(h);
			this.Number.apply(h.Number.prototype);
			this.String.apply(h.String.prototype);
			this.Array.apply(h.Array.prototype);
			
			this.window.apply(h);
			this.Object.apply(h);
			this.Object.apply(h.__);
			this.Object.apply(h.___);
        };

        var Jtb=new $Jtb(window);
		
        Jtb.module.jmpInfo=(function(){
									   function U(f){
							               var g=A[f]={};
                                           $loadJs(w[f],null,function(){
												                  var a=$$.module.jmpInfo.array[f].slice(1,-1).split('@');
                                                                  for(var c=0;c<a.length;c++){
														              var d=a[c].split('|');
														              g[d[0]]=d
																  }
										   })
						               }
				             })();


		/*初始化list列表*/
		$$.module.address.list=[];
		
		//$ur("domReady",$parserRe);

		$$.module.searchBox={
			init:function(){
				this.funcList.each();
				try {
				
					// 从cookie读指定的国内线出发地和目的城市值
					var firCity = document.getElementById("fromCityname");
					var secCity = document.getElementById("toCityname");
					if ((firCity != null) && (secCity != null)) {
		                var fromCityname = firCity.getAttribute("mod_address_reference");
		                var toCityname = secCity.getAttribute("mod_address_reference");
						if ((firCity != null) && (secCity != null) ) {
						    document.getElementById(fromCityname).value = decodeURI(getck("departurePlaceCode"));
						    document.getElementById(toCityname).value = decodeURI(getck("firstDestinationCode"));
						    firCity.value = decodeURI(getck("departurePlace"));
						    secCity.value = decodeURI(getck("firstDestination"));
						    //alert("fromCityname = " + decodeURI(getck("departurePlace")) +"\n"+ "toCityname = " +decodeURI(getck("firstDestination")) +"\n"+ "fromCitynameCode = " + decodeURI(getck("departurePlaceCode")) + "\n" +"toCityname = " +decodeURI(getck("firstDestinationCode")))
						}
					}
					
					// 从cookie读指定的国际线出发地和目的城市值
					var interFirCity = document.getElementById("interFromCityname");
					var interSecCity = document.getElementById("interToCityname");
					if ((interFirCity != null) && (interSecCity != null)) {
		                var interFromCityname = interFirCity.getAttribute("mod_address_reference");
		                var interToCityname = interSecCity.getAttribute("mod_address_reference");
						if ((interFirCity != null) && (interSecCity != null) ) {
						    document.getElementById(interFromCityname).value = decodeURI(getck("InterDeparturePlaceCode"));
						    document.getElementById(interToCityname).value = decodeURI(getck("InterFirstDestinationCode"));
						    interFirCity.value = decodeURI(getck("InterDeparturePlace"));
						    interSecCity.value = decodeURI(getck("InterFirstDestination"));
						}
					}
					
				} catch(err) {
				
				}
			},
			funcList:[function(){
							   $parserRe($("searchBox"));
					 }]
		};


/*城市补全显示设定*/
$$.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:"入力漢字/PINYIN/英語↑↓で選択",
		i:"入力",
		j:"↑↓で選択",
		k:"漢字/PINYIN/英語",
		e:"漢字/PINYIN/英語を入力してください",
		h:"",
		o:"PINYIN/英語で並び替え",
		s:"見つかりませんでした: ",
		l:"全て",
		p:"項目,←→ページ変更",
		a:",TOTAL"
	}
}[$$.status.version];  // $$.status.version 表示系统语言

$$.module.address.sourceMap={"hotel":["","utf-8"],"hotelAll":["","utf-8"]};

function sortFunc(c,b){
	var e=c.match(/^[^\|]+/),
		f=b.match(/^[^\|]+/);
	return e>f?1:(e==f?0:-1)
}(
	function c_address(){
	//alert("c_address");
		var G=$c("div");
		with(G.style){
			width="0px";height="0px"
		}
		G.innerHTML="<div id=\"tuna_address\" style=\"display:none;position:absolute;z-index:120;overflow:hidden;\"><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(G);
		var j=$("tuna_address");
		$$.module.address.source["default"]="@@";
		var L=$("address_warp"),
			u=$('address_message'),
			A=$('address_list'),
			v=[$('address_p'),$('address_p1'),$('address_p2'),$('address_p3'),$('address_p4'),$('address_p5')],
			B=$('address_arrowl'),
			C=$('address_arrowr'),
			h=A.getElementsByTagName("a"),
			R=[];
		for(var D=0;D<h.length;D++)
			R[D]=h[D].cloneNode(true);
		function M(){
			function Q(d){
				var n=0,
					r,s=d.$getWin();
				var a=d.module.address={};
				var S,w,g=null,t,p=[];
				d.setAttribute("autoComplete","off");
				$r("beforeunload",function(){d.setAttribute("autoComplete","on")});
				a.focusNext=d.getAttribute("mod_address_focusNext");
				a.focusNext=/^(1|true)$/i.test(a.focusNext||"");
				a.reference=d.getAttribute("mod_address_reference");
				var m=d.getAttribute("mod_address_cookie");
				if(m){
					m=s.$(m);
					if(!m){
						var H=s.$c("input");
						with(H){
							type="hidden";
							id=name=m
						}
						m=H;
						d.parentNode.insertBefore(m,d)
					}
				}
				if(a.reference)
					a.reference=s.$(a.reference)||s.$(a.reference,true);
				var x=d.getAttribute("mod_address_suggest");
				var I=d.getAttribute("mod_address_cookieSuggest");
				a.suggest=[];
				if(I){
					a.suggest=I.match(/[^@]+@/gi);
					if(x)
						a.suggest._0(x.match(/[^@]+@/gi))
				}else if(x)
					a.suggest=x.match(/[^@]+@/gi);
				//if(a.suggest.length>18)
				//	a.suggest=a.suggest.slice(0,18);
				a.source=d.getAttribute("mod_address_source")||"default";
				if(!$$.module.address.source[a.source]){
					$$.module.address.source[a.source]="@@";
					if($$.module.address.sourceMap[a.source])
						$loadJs($$.module.address.sourceMap[a.source][0].replace(/\{\$charset\}/gi,$$.status.charset),($$.module.address.sourceMap[a.source][1]||"").replace(/\{\$charset\}/gi,$$.status.charset)||$$.status.charset);
					else 
						$loadJs("",$$.status.charset)
				}
				a.auto=d.getAttribute("mod_address_auto");
				a.auto=a.auto&&a.auto.match(/^(false|0)$/i)?false:true;
				a.redraw=function(){if(w)F()};
				a.hook={};
				(d.getAttribute("mod_address_hook")||"").replace(/(on)?([^;:]+):([^;]+)/gi,function(c,b,e,f){a.hook[e.toLowerCase()]=s[f]});
				function N(){
					if(n){
						n=0;
						return
					}
					r=false;
					A.style.display=u.style.display=v[0].style.display="none";
					function e(b){
						h[b].onmousedown=function(c){
													z(b);
													$stopEvent(c);
													if(h[b].outerHTML)
														h[b].outerHTML=h[b].outerHTML+"";
													d.blur()
										}
					}
					j.onmousedown=function(){n=1};
					for(var f=0;f<h.length;f++)
						new e(f);
					B.onmousedown=C.onmousedown=y;
					for(var f=1;f<v.length;f++)
						v[f].onmousedown=y;
					t=null;
					if(g!==null)
						h[g].className="address_selected";
					if(a.hook["focus"])
						a.hook["focus"](d);
					setTimeout(F,0);
					w=setInterval(F,150)
				}
				function y(c){
					n=1;
					if(c)
						$stopEvent(c);
					switch(this){
						case B:
							k.m_get(k.page-1);
							break;
						case C:
							k.m_get(k.page+1);
							break;
						default:
							k.m_get(parseInt(this.firstChild.nodeValue))
					}
				}
				var k=new function(){
									var o;
									this.page=1;
									this.pagelist;
									this.maxpage=1;
									this.m_get=function(c){
													if(!o||!c||c<1||c>this.maxpage)
														return null;
													this.page=c;
													this.pagelist=o.slice((c-1)*12,Math.min(c*12,o.length));
													for(var b=0;b<h.length;b++){
														if(b<this.pagelist.length){
															h[b].style.display="block";
															var e=this.pagelist[b].replace(/@/g,"").split("|");
															h[b].lastChild.nodeValue=e[1];
															h[b].firstChild.firstChild.nodeValue=e[0];
															p[b]=e
														}else{
															h[b].style.display="none";
															p[b]=null
														}
													}
													if(g!==null){
														if(g>=this.pagelist.length){
															h[g].className="";
															g=this.pagelist.length-1;
															h[g].className="address_selected"
														}
													}
													else{
														g=0;
														h[0].className="address_selected"
													}
													l.call(this);
													A.style.display=u.style.display="";
													if(!r){
														j.style.display="";
														j.$setPos(d);
														j.$setIframe();
														r=true
													}
													E.call(this)
											};
									this.m_set=function(c){
													o=c;
													this.maxpage=Math.ceil(c.length/12);
													this.page=1;
													this.m_get(1)
												};
									function l(){
										var c=this.maxpage<6||this.page<3?1:this.page>this.maxpage-2?this.maxpage-4:this.page-2;
										var b=Math.min(c+4,this.maxpage);
										var e;
										B.style.display=this.page==1?"none":"";
										C.style.display=this.page==this.maxpage?"none":"";
										for(var f=c;f<c+5;f++){
											e=v[f-c+1];
											if(f<=b){
												e.firstChild.nodeValue=f;
												e.className=f==this.page?"address_current":"";
												e.style.display=""
											}else 
												e.style.display="none"
										}
											v[0].style.display=this.maxpage>1?"block":"none"
									}
							};
				function E(){
					with(j.style){
						width=L.offsetWidth+"px";
						height=L.offsetHeight+"px"
					}
					j.$setIframe()
				}
				function J(){
					if(a.suggest.length==0){
						j.style.display="none";
						if(g!==null){
							h[g].className="";
							g=null
						}
						return
					}
					k.m_set(a.suggest);
					u.lastChild.nodeValue=$$.status.version.match(/^zh-/)?$$.string.address.i+(d.module.notice?d.module.notice.tip:$$.string.address.k)+$$.string.address.j:$$.string.address.b
				}
				function F(){
					var b=d.value.trim();
					if(b===t)return;
					t=b;
					b=b.replace(/([\(\)\\\[\]\.\+\?\*\|\^\$])/gi,"\\$1").replace(/@|\|/gi,"");
					if(!b){
						J();
						E();
						return
					}
					j.style.display="";
					var e=$$.module.address.source[a.source];
					var f=new RegExp("@([^@]*\\|)?"+b+"[^@]*","gi");
					var o=new RegExp("@[^@]*"+b+"[^@]*","gi");
					var l=[],i=[];
					e=e.replace(f,function(c){l.push(c);return""});
					if(l)l.sort(sortFunc);
					e=e.replace(o,function(c){i.push(c);return""});
					if(i)i.sort(sortFunc);
					if(l&&i)
						arr=l.concat(i);
					else 
						arr=l||i;
					if(!arr||!arr.length){
						u.lastChild.nodeValue=a.auto?($$.string.address.s+($$.status.version=="en"?"":d.value)):($$.string.address.h+d.value+", "+$$.string.address.o);
					if(!a.auto){
						j.style.display="none";
						if(g!==null){
							h[g].className="";
							g=null
						}
					}
					if(A.style.display=="none")
						J();
						E()
					}else{
					u.lastChild.nodeValue=$$.string.address.h+d.value+", "+$$.string.address.o;
					k.m_set(arr)
					}
				}
				function O(c){
					var b=c?c.keyCode:event.charCode;
					var e="|"+b+"|";
					if(g==null){
						if("|13|".indexOf(e)!=-1){
							$stopEvent(c,1);
							if(a.focusNext)
								setTimeout(function(){d.$focusNext()},1)
						}
						return true
					}
					if("|13|".indexOf(e)!=-1){
						$stopEvent(c,1);
						z(g);
						d.blur()
					}
					if("|33|37|109|188|219|".indexOf(e)!=-1){
						y.call(B);
						$stopEvent(c,1)
					}
					if("|34|39|61|190|221|".indexOf(e)!=-1){
						y.call(C);
						$stopEvent(c,1)
					}
					if("|38|40|".indexOf(e)!=-1){
						h[g].className="";
						g+=k.pagelist.length-39+b;
						g%=k.pagelist.length;
						h[g].className="address_selected";
						$stopEvent(c,1)
					}
				}
				function z(c,b){
					n=2;
					d.value=p[c][1]||p[c][0];
					if(a.reference)
						a.reference.value=p[c][2];
					if(m)
						m.value=p.join("|");
					if(a.hook["change"])
						a.hook["change"](d);
					if(b!==false&&a.focusNext)
						setTimeout(function(){d.$focusNext()},1)
				}
				function P(){
					if(n==1){
						setTimeout(function(){d.focus()},1);
						return
					}
					clearInterval(w);
					w=null;
					j.$clearIframe();
					j.style.display="none";
					if(g!==null){
						if(d.value&&n!=2&&a.auto)
							z(g,false);
						h[g].className="";
						g=null
					}
					n=0;
					j.onmousedown=null
				}
				a.check=function(){
							var b=d.value.trim();
							if(d.isNull&&d.isNull())
								b="";
							if(b===t)
								return;
							var e;
							t=b;
							b=b.replace(/([\(\)\\\[\]\.\+\?\*\|\^\$])/gi,"\\$1").replace(/@|\|/gi,"");
							if(b){
								var f=$$.module.address.source[a.source];
								var o=new RegExp("@([^@]*\\|)?"+b+"[^@]*","gi");
								var l=new RegExp("@[^@]*"+b+"[^@]*","gi");
								var i=[],q=[];
								f=f.replace(o,function(c){i.push(c);return""});
								if(i)
									i.sort(sortFunc);
								f=f.replace(l,function(c){q.push(c);return""});
								if(q)
									q.sort(sortFunc);
								if(i&&q)
									e=i.concat(q);
								else 
									e=i||q;
								if(e&&e.length){
									r=true;
									k.m_set(e);
									r=false;
									z(0,false);
									n=0
								}
							}
							if(d.module.notice)
								d.module.notice.check();
							return!!e
				};
				d.$r("onfocus",N);
				d.blur();
				d.$r("onblur",P);
				d.$r("onkeydown",O);
				if(a.hook["load"])
					a.hook["load"](d)
			}
			var K;
			while((K=$$.module.address.list.shift())!=null)
				new Q(K)
		}
		$init(M);
		M()
	})();


$$.module.address.source.fltInternational_cn="";


$$.module.address.source.fltInternational=$$.module.address.source.fltInternational_cn+"";


$$.module.address.source.fltInternationalStart="";


$$.module.address.source.fltInternationalTicket="";


$$.module.address.source.fltDomestic="";


$$.module.address.source.fltAll="";


$$.module.address.source.fltDomesticTicket="";


$$.module.pkgSearch={};

// 读cookie中key对应的值
function getck(sname)
{
    //js获取cookie
    var acookie=document.cookie.split("; ");
    var result = "";
	//获取单个cookies
	for(var i=0;i<acookie.length;i++){
		var arr=acookie[i].split("=");
		if(sname==arr[0]){
			if(arr.length>1){
			    //result = unescape(arr[1]);
		        result = arr[1];
		    }
	    } 
    }
	return result;
}