c.require("yui.container");if((YAHOO.widget.Panel||0).prototype.init){YAHOO.widget.Panel.prototype.init=function(C,B){YAHOO.widget.Panel.superclass.init.call(this,C);this.beforeInitEvent.fire(YAHOO.widget.Panel);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Panel.CSS_PANEL);this.buildWrapper();if(B){this.cfg.applyConfig(B,true)}this.beforeRenderEvent.subscribe(function(){var E=this.cfg.getProperty("draggable");if(E){if(!this.header){this.setHeader("&#160;")}}},this,true);this.renderEvent.subscribe(function(){var E=this.cfg.getProperty("width");if(!E){this.cfg.setProperty("width",(this.element.offsetWidth+"px"))}});var D=this;var A=function(){this.blur()};this.beforeShowEvent.subscribe(function(){this.cfg.refireEvent("underlay")},this,true);this.initEvent.fire(YAHOO.widget.Panel)}}if((uic.factory.Calendar||0).init){uic.factory.Calendar._create=function(C){var R=C[0];var O=C[1];var E=C[2];var F=C[3];var L=new util.simpleDateFormat();for(var P=0;P<O.length;P++){var N=O[P].id;var H=$(N);var G=O[P].conf;if(O[P].datepicker){var I=O[P].datepicker}if(F){var J=document.createElement("iframe");J.src="javascript:false;";YAHOO.util.Dom.setStyle(J,"opacity","0");YAHOO.util.Dom.setStyle(J,"position","absolute");YAHOO.util.Dom.setStyle(J,"width",0);YAHOO.util.Dom.setStyle(J,"height",0);J.tabIndex=-1;H.insertBefore(J,H.firstChild);H.iFrame=J}G.WEEKDAYS_LONG=L.weekslong;G.MONTHS_LONG=L.monthlong;G.MONTHS_SHORT=L.monthshort;G.WEEKDAYS_1CHAR=L.weeksshort;G.WEEKDAYS_MEDIUM=L.weeksshort;G.WEEKDAYS_SHORT=L.weeksshort;var K=$(N);c.extend(K,new uic.uicObject());c.extend(K,new uic.Calendar());K.tag="Calendar";K.rendering=false;var B=K.getElementsByTagName("DIV")[0];B.id=N+"_container";var D=N+"_container_table";var A=new YAHOO.widget.CalendarGroup(D,B.id,G);var Q=null;var M=null;if(G._default==""){Q=new Date();M=uic.factory.Calendar.JD2YD(Q)}else{M=G._default;Q=uic.factory.Calendar.YD2JD(M)}A.select(M);if(uic.p.FRAMEWORK_SKIN_ROOT.indexOf("Default")==-1){A.cfg.setProperty("NAV_ARROW_LEFT",uic.p.FRAMEWORK_DOCUMENT_ROOT+uic.p.FRAMEWORK_SKIN_ROOT+"img/calendar/callt.gif");A.cfg.setProperty("NAV_ARROW_RIGHT",uic.p.FRAMEWORK_DOCUMENT_ROOT+uic.p.FRAMEWORK_SKIN_ROOT+"img/calendar/calrt.gif")}K.style.display="block";if(E==null||typeof E=="undefined"||E==true){K.rendering=true;A.render()}K.currentDate=Q;K.currentPage=A.cfg.getProperty("pagedate");K.pageNb=A.cfg.getProperty("pages");K.highlightDate=uic.factory.Calendar._highlightDate;K._yuiObject=A;K.positionAt=uic.factory.Calendar._positionAt}c.loadMng.initialized("Calendar",R)}}YAHOO.namespace("util");YAHOO.util.Cookie={_createCookieString:function(B,D,C,A){var F=YAHOO.lang;var E=encodeURIComponent(B)+"="+(C?encodeURIComponent(D):D);if(F.isObject(A)){if(A.expires instanceof Date){E+="; expires="+A.expires.toGMTString()}if(F.isString(A.path)&&A.path!=""){E+="; path="+A.path}if(F.isString(A.domain)&&A.domain!=""){E+="; domain="+A.domain}if(A.secure===true){E+="; secure"}}return E},_createCookieHashString:function(B){var D=YAHOO.lang;if(!D.isObject(B)){throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.")}var C=new Array();for(var A in B){if(D.hasOwnProperty(B,A)&&!D.isFunction(B[A])&&!D.isUndefined(B[A])){C.push(encodeURIComponent(A)+"="+encodeURIComponent(String(B[A])))}}return C.join("&")},_parseCookieHash:function(E){var D=E.split("&");var F=null;var C=new Object();for(var B=0,A=D.length;B<A;B++){F=D[B].split("=");C[F[0]]=F[1]}return C},_parseCookieString:function(E){var C=new Object();if(YAHOO.lang.isString(E)&&E.length>0){if(/[^=]+=[^=;]?(?:; [^=]+=[^=]?)?/.test(E)){var G=E.split(/;\s/g);var F=null;var D=null;for(var B=0,A=G.length;B<A;B++){F=decodeURIComponent(G[B].match(/(.*)=/i)[1]);D=decodeURIComponent(G[B].substring(F.length+1));C[F]=D}}}return C},get:function(A,B){var D=YAHOO.lang;var C=this._parseCookieString(document.cookie);if(!D.isString(A)||A===""){throw new TypeError("Cookie.get(): Cookie name must be a non-empty string.")}if(D.isUndefined(C[A])){return null}if(!D.isFunction(B)){return C[A]}else{return B(C[A])}},getSub:function(A,C,B){var E=YAHOO.lang;var D=this.getSubs(A);if(D!==null){if(!E.isString(C)||C===""){throw new TypeError("Cookie.getSub(): Subcookie name must be a non-empty string.")}if(E.isUndefined(D[C])){return null}if(!E.isFunction(B)){return D[C]}else{return B(D[C])}}else{return null}},getSubs:function(A){return this.get(A,this._parseCookieHash)},remove:function(B,A){if(!YAHOO.lang.isString(B)||B===""){throw new TypeError("Cookie.remove(): Cookie name must be a non-empty string.")}A=A||{};A.expires=new Date(0);return this.set(B,"",A)},set:function(B,C,A){var E=YAHOO.lang;if(!E.isString(B)){throw new TypeError("Cookie.set(): Cookie name must be a string.")}if(E.isUndefined(C)){throw new TypeError("Cookie.set(): Value cannot be undefined.")}var D=this._createCookieString(B,C,false,A);document.cookie=D;return D},setSub:function(B,D,C,A){var F=YAHOO.lang;if(!F.isString(B)||B===""){throw new TypeError("Cookie.setSub(): Cookie name must be a non-empty string.")}if(!F.isString(D)||D===""){throw new TypeError("Cookie.setSub(): Subcookie name must be a non-empty string.")}if(F.isUndefined(C)){throw new TypeError("Cookie.setSub(): Subcookie value cannot be undefined.")}var E=this.getSubs(B);if(!F.isObject(E)){E=new Object()}E[D]=C;return this.setSubs(B,E,A)},setSubs:function(B,C,A){var E=YAHOO.lang;if(!E.isString(B)){throw new TypeError("Cookie.setSubs(): Cookie name must be a string.")}if(!E.isObject(C)){throw new TypeError("Cookie.setSubs(): Cookie value must be an object.")}var D=this._createCookieString(B,this._createCookieHashString(C),false,A);document.cookie=D;return D}};YAHOO.register("cookie",YAHOO.util.Cookie,{version:"2.5.0",build:"895"});MEB.eventBus=new YAHOO.util.CustomEvent("eventBus");a.namespace("MEB.errors");c.require("uic.Errors");MEB.errors.Manager=function(){};MEB.errors.Manager.prototype._checkIsNotEmptyDate=function(A){try{if(A.getValue()==""){return false}return true}catch(B){}};MEB.errors.Manager.prototype._checkValueOfDate=function(A,C){try{if(A.getDate().getTime()==C){return 0}else{if(A.getDate().getTime()<C){return -1}else{return 1}}}catch(B){}};MEB.errors.Manager.prototype._displayErrors=function(B){try{var A=uic.Check.getFormInputStatus($(B));var K=[];var G=MEB.utilities.i18n.translate("error","INVALID_FIELD");for(var F=0;F<A.length;F++){if(!A[F].status){var E={};var I=A[F].input.parentNode.getLabel();var D=typeof I.innerHTML!="undefined"?I.innerHTML:I;E.message=G+D;E.type="E";E.bind=A[F].input.id;K.push(E)}}$(MEB.errors.content).innerHTML="";var H=B.split("_");var J=H[0]+"_"+H[1];uic.factory.Errors.create(J,"clientError",$(MEB.errors.content),false,"","",K);jQuery("#"+MEB.errors.container).show()}catch(C){}};MEB.errors.Manager.prototype.checkDate=function(){try{if(arguments.length==1){return this._checkIsNotEmptyDate(arguments[0])}else{if(arguments.length==2){return this._checkValueOfDate(arguments[0],arguments[1])}}}catch(A){}};MEB.errors.Manager.prototype.checkForm=function(E){try{var D=true;var A=jQuery("#"+E+" input,#"+E+" select,#"+E+" textarea");for(var C=0;C<A.length;C++){if(!uic.Check.validate(A[C],true)){D=false}}if(!D){this._displayErrors(E)}return D}catch(B){}};MEB.errors.Manager.prototype.formIsOk=function(E){try{var D=uic.Check.getFormInputStatus($(E));var C=true;for(var B=0;B<D.length;B++){if(D[B].status==false){C=false}}return C}catch(A){}};MEB.errors.Manager.prototype.checkSelect=function(A,C){try{if(A.getValue()==C){return 0}else{if(A.getValue()<C){return -1}else{return 1}}}catch(B){}};MEB.errors.Manager.prototype.checkTextField=function(B){try{if(B.getValue()==""){return false}return true}catch(A){}};MEB.errors.Manager.prototype.isPositiveInteger=function(C){try{C=C.replace(/(^\s*)|(\s*$)/g,"");if((C==null)||(C.length==0)){return false}var F=C.charAt(0);var A=C.length;var G=null;var E=null;var B=true;for(E=0;E<A;E++){if(C.charAt(0)!="0"){B=false;break}}if(B==true){return false}for(E=0;E<A;E++){G=C.charAt(E);if(!((G>="0")&&(G<="9"))){return false}}return true}catch(D){}};MEB.errors.manager=new MEB.errors.Manager();c.require("aria");a.namespace("MEB.utilities");MEB.utilities.GoogleAnalytics=function(){this._loader=null;MEB.ga.conf={host:(("https:"==document.location.protocol)?"https://ssl.":"http://www."),scriptName:"ga"};MEB.ga.tracker=null};MEB.utilities.GoogleAnalytics.prototype.init=function(){try{this._loader=new YAHOO.util.YUILoader();this._loader.addModule({name:"g-analytics",type:"js",fullpath:MEB.ga.conf.host+"google-analytics.com/"+MEB.ga.conf.scriptName+".js",verifier:MEB.utilities.GoogleAnalytics.checkGA});this._loader.require("g-analytics");this._loader.insert(this._onGALoad.createDelegate(this))}catch(A){}};MEB.utilities.GoogleAnalytics.checkGA=function(A,C){try{if(typeof _gat!="undefined"){C()}else{setTimeout(function(){MEB.utilities.GoogleAnalytics.checkGA(A,C)},2000)}}catch(B){}};MEB.utilities.GoogleAnalytics.prototype._onGALoad=function(){try{MEB.ga.tracker=_gat._getTracker(MEB.ga.account);MEB.ga.tracker._initData();MEB.ga.tracker._setDomainName(".amadeus.net");if(typeof MEB.objects.air!="undefined"&&typeof MEB.objects.air.search!="undefined"&&typeof MEB.objects.air.search.availabities!="undefined"){MEB.objects.air.search.availabities._webTracking()}else{MEB.ga.tracker._trackPageview()}MEB.eventBus.fire({eventName:"onGALoaded",data:{}})}catch(A){}};MEB.utilities.GoogleAnalytics.prototype.webTracking=function(C){try{var D=window.location.href;for(var B in C){if(D.indexOf("?")<0){D+="?"}else{D+="&"}D+=B+"="+C[B]}MEB.ga.tracker._trackPageview(D)}catch(A){}};var googleAnalytics=new MEB.utilities.GoogleAnalytics();c.onLoad("init",googleAnalytics,googleAnalytics._section);(function(A){A.facebox=function(B){A.facebox.init();A.facebox.loading();A.isFunction(B)?B.call():A.facebox.reveal(B)};A.facebox.settings={loading_image:"/facebox/loading.gif",close_image:"/facebox/closelabel.gif",image_types:["png","jpg","jpeg","gif"],facebox_html:'  <div id="facebox" style="display:none;">     <div class="popup">       <table>         <tbody>             <td class="body">               <div class="content">               </div>               <div class="footer">                 <a href="#" class="close">                   Close                 </a>               </div>             </td>             <td class="b"/>           </tr>           <tr>             <td class="b" colspan="2" />           </tr>         </tbody>       </table>     </div>   </div>'};A.facebox.loading=function(){if(A("#facebox .loading").length==1){return true}A("#facebox .content").empty();A("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+A.facebox.settings.loading_image+'"/></div>');var B=A.facebox.getPageScroll();A("#facebox").css({top:B[1]+(A.facebox.getPageHeight()/10),left:B[0]}).show();A(document).bind("keydown.facebox",function(C){if(C.keyCode==27){A.facebox.close()}})};A.facebox.reveal=function(C,B){if(B){A("#facebox .content").addClass(B)}A("#facebox .content").append(C);A("#facebox .loading").remove();A("#facebox .body").children().fadeIn("normal")};A.facebox.close=function(){A(document).unbind("keydown.facebox");A("#facebox").fadeOut(function(){A("#facebox .content").removeClass().addClass("content")});return false};A.fn.facebox=function(){A.facebox.init();var B=A.facebox.settings.image_types.join("|");B=new RegExp("."+B+"jQuery","i");function C(){A.facebox.loading(true);var D=this.rel.match(/facebox\[\.(\w+)\]/);if(D){D=D[1]}if(this.href.match(/#/)){var E=window.location.href.split("#")[0];var G=this.href.replace(E,"");A.facebox.reveal(A(G).clone().show(),D)}else{if(this.href.match(B)){var F=new Image();F.onload=function(){A.facebox.reveal('<div class="image"><img src="'+F.src+'" /></div>',D)};F.src=this.href}else{A.get(this.href,function(H){A.facebox.reveal(H,D)})}}return false}this.click(C);return this};A.facebox.init=function(){if(A.facebox.settings.inited){return true}else{A.facebox.settings.inited=true}A("body").append(A.facebox.settings.facebox_html);var B=[new Image(),new Image()];B[0].src=A.facebox.settings.close_image;B[1].src=A.facebox.settings.loading_image;A("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){B.push(new Image());B.slice(-1).src=A(this).css("background-image").replace(/url\((.+)\)/,"jQuery1")});A("#facebox .close").click(A.facebox.close);A("#facebox .close_image").attr("src",A.facebox.settings.close_image)};A.facebox.getPageScroll=function(){var C,B;if(self.pageYOffset){B=self.pageYOffset;C=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){B=document.documentElement.scrollTop;C=document.documentElement.scrollLeft}else{if(document.body){B=document.body.scrollTop;C=document.body.scrollLeft}}}return new Array(C,B)};A.facebox.getPageHeight=function(){var B;if(self.innerHeight){B=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){B=document.documentElement.clientHeight}else{if(document.body){B=document.body.clientHeight}}}return B}})(jQuery);jQuery.fn.corner=function(F){function K(N){var N=parseInt(N).toString(16);return(N.length<2)?"0"+N:N}function D(O){for(;O&&O.nodeName.toLowerCase()!="html";O=O.parentNode){var N=jQuery.css(O,"backgroundColor");if(N.indexOf("rgb")>=0){rgb=N.match(/\d+/g);return"#"+K(rgb[0])+K(rgb[1])+K(rgb[2])}if(N&&N!="transparent"){return N}}return"#ffffff"}function M(N){switch(H){case"round":return Math.round(E*(1-Math.cos(Math.asin(N/E))));case"cool":return Math.round(E*(1+Math.cos(Math.asin(N/E))));case"sharp":return Math.round(E*(1-Math.cos(Math.acos(N/E))));case"bite":return Math.round(E*(Math.cos(Math.asin((E-N-1)/E))));case"slide":return Math.round(E*(Math.atan2(N,E/N)));case"jut":return Math.round(E*(Math.atan2(E,(E-N-1))));case"curl":return Math.round(E*(Math.atan(N)));case"tear":return Math.round(E*(Math.cos(N)));case"wicked":return Math.round(E*(Math.tan(N)));case"long":return Math.round(E*(Math.sqrt(N)));case"sculpt":return Math.round(E*(Math.log((E-N-1),E)));case"dog":return(N&1)?(N+1):E;case"dog2":return(N&2)?(N+1):E;case"dog3":return(N&3)?(N+1):E;case"fray":return(N%2)*E;case"notch":return E;case"bevel":return N+1}}F=(F||"").toLowerCase();var B=/keep/.test(F);var G=((F.match(/cc:(#[0-9a-f]+)/)||[])[1]);var J=((F.match(/sc:(#[0-9a-f]+)/)||[])[1]);var E=parseInt((F.match(/(\d+)px/)||[])[1])||10;var L=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var H=((F.match(L)||["round"])[0]);var I={T:0,B:1};var A={TL:/top|tl/.test(F),TR:/top|tr/.test(F),BL:/bottom|bl/.test(F),BR:/bottom|br/.test(F)};if(!A.TL&&!A.TR&&!A.BL&&!A.BR){A={TL:1,TR:1,BL:1,BR:1}}var C=document.createElement("div");C.style.overflow="hidden";C.style.height="1px";C.style.backgroundColor=J||"transparent";C.style.borderStyle="solid";return this.each(function(R){var O={T:parseInt(jQuery.css(this,"paddingTop"))||0,R:parseInt(jQuery.css(this,"paddingRight"))||0,B:parseInt(jQuery.css(this,"paddingBottom"))||0,L:parseInt(jQuery.css(this,"paddingLeft"))||0};if(jQuery.browser.msie){this.style.zoom=1}if(!B){this.style.border="none"}C.style.borderColor=G||D(this.parentNode);var T=jQuery.curCSS(this,"height");for(var P in I){var U=I[P];C.style.borderStyle="none "+(A[P+"R"]?"solid":"none")+" none "+(A[P+"L"]?"solid":"none");var V=document.createElement("div");var N=V.style;U?this.appendChild(V):this.insertBefore(V,this.firstChild);if(U&&T!="auto"){if(jQuery.css(this,"position")=="static"){this.style.position="relative"}N.position="absolute";N.bottom=N.left=N.padding=N.margin="0";if(jQuery.browser.msie){N.setExpression("width","this.parentNode.offsetWidth")}else{N.width="100%"}}else{N.margin=!U?"-"+O.T+"px -"+O.R+"px "+(O.T-E)+"px -"+O.L+"px":(O.B-E)+"px -"+O.R+"px -"+O.B+"px -"+O.L+"px"}for(var Q=0;Q<E;Q++){var W=Math.max(0,M(Q));var S=C.cloneNode(false);S.style.borderWidth="0 "+(A[P+"R"]?W:0)+"px 0 "+(A[P+"L"]?W:0)+"px";U?V.appendChild(S):V.insertBefore(S,V.firstChild)}}})};jQuery.fn.hoverClass=function(A){return this.each(function(){jQuery(this).hover(function(){jQuery(this).addClass(A)},function(){jQuery(this).removeClass(A)})})};jQuery.fn.attachFocusBehavior=function(A){return this.each(function(){jQuery(this).focus(function(){jQuery(this).addClass(A)}).blur(function(){jQuery(this).removeClass(A)})})};jQuery.fn.removeDottedTabFocus=function(){return this.each(function(){jQuery(this).focus(function(){if(this.blur){this.blur()}})})};jQuery.extend(jQuery.expr[":"],{contains:"((a.firstChild && a.firstChild.nodeValue)||a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",nGt:"parseInt((a.firstChild && a.firstChild.nodeValue)||a.textContent||a.innerText||jQuery(a).text()||'0')>parseInt(m[3])",nLt:"parseInt((a.firstChild && a.firstChild.nodeValue)||a.textContent||a.innerText||jQuery(a).text()||'0')<parseInt(m[3])",nEq:"parseInt((a.firstChild && a.firstChild.nodeValue)||a.textContent||a.innerText||jQuery(a).text()||'0')==parseInt(m[3])"});jQuery.fn.extend({selectbox:function(A){return this.each(function(){new jQuery.SelectBox(this,A)})}});jQuery.SelectBox=function(S,D){var A=D||{};A.inputClass=A.inputClass||"selectbox";A.containerClass=A.containerClass||"selectbox-wrapper";A.hoverClass=A.hoverClass||"selected";A.debug=A.debug||false;var J=S.id;var E=-1;var C=false;var R=0;var Q=jQuery(S);var O=G(A);var B=L(A);Q.hide().before(B).before(O);P();B.click(function(){if(!C){O.toggle()}}).focus(function(){if(O.not(":visible")){C=true;O.show()}}).keydown(function(T){switch(T.keyCode){case 38:T.preventDefault();K(-1);break;case 40:T.preventDefault();K(1);break;case 13:T.preventDefault();F();H();break}}).blur(function(){if(O.is(":visible")&&R>0){if(A.debug){console.log("container visible and has focus")}}else{H()}});function H(){R=0;O.hide()}function P(){O.append(M()).hide();var T=B.width();O.width(T)}function G(U){var T=document.createElement("div");O=jQuery(T);O.attr("id",J+"_container");O.addClass(U.containerClass);return O}function L(U){var T=document.createElement("input");var V=jQuery(T);V.attr("id",J+"_input");V.attr("type","text");V.addClass(U.inputClass);V.attr("autocomplete","off");V.attr("readonly","readonly");V.attr("tabIndex",Q.attr("tabindex"));return V}function K(U){var T=jQuery("li",O);if(!T){return }E+=U;if(E<0){E=0}else{if(E>=T.size()){E=T.size()-1}}T.removeClass(A.hoverClass);jQuery(T[E]).addClass(A.hoverClass)}function F(V){var T=jQuery("li#"+V,O).get(0);if(A.debug){console.log("set current output : "+T.id)}var U=T.getAttribute("language");Q.val(U);B.val(jQuery(T).html());return true}function N(){return Q.val()}function I(){return B.val()}function M(){var U=new Array();var T=document.createElement("ul");Q.children("option").each(function(){var V=document.createElement("li");V.setAttribute("id",Q[0].id+"_"+jQuery(this).val().toLowerCase());V.setAttribute("language",jQuery(this).val());V.innerHTML=jQuery(this).html();jQuery(V).addClass(jQuery(this).val().toLowerCase());if(jQuery(this).is(":selected")){B.val(jQuery(this).html());jQuery(V).addClass(A.hoverClass)}T.appendChild(V);jQuery(V).mouseover(function(W){R=1;if(A.debug){console.log("out on : "+this.id)}jQuery(W.target,O).addClass(A.hoverClass)}).mouseout(function(W){R=-1;if(A.debug){console.log("out on : "+this.id)}jQuery(W.target,O).removeClass(A.hoverClass)}).click(function(W){if(A.debug){console.log("click on :"+this.id)}jQuery(this).addClass(A.hoverClass);F(this.id);H();if(typeof Q[0].onchange!="undefined"){Q[0].onchange()}})});return T}};(function(E){var I,H,G,D,F,J,C;jQuery.fn.cluetip=function(K){var L={width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:false,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"hover",closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(M){return true},onShow:function(M,N){},ajaxCache:true,ajaxProcess:function(M){M=jQuery(M).not("style, meta, link, script, title");return M},ajaxSettings:{dataType:"html"}};if(K&&K.ajaxSettings){jQuery.extend(L.ajaxSettings,K.ajaxSettings);delete K.ajaxSettings}if(K&&K.fx){jQuery.extend(L.fx,K.fx);delete K.fx}if(K&&K.hoverIntent){jQuery.extend(L.hoverIntent,K.hoverIntent);delete K.hoverIntent}jQuery.extend(L,K);return this.each(function(){var Y=false;var s=parseInt(L.cluezIndex,10)-1;var m=false;if(!I){H=jQuery('<div id="cluetip-inner"></div>');D=jQuery('<h3 id="cluetip-title"></h3>');G=jQuery('<div id="cluetip-outer"></div>').append(H).prepend(D);I=jQuery("<div></div>").attr({id:"cluetip"}).css({zIndex:L.cluezIndex}).append(G).append('<div id="cluetip-extra"></div>')[B](A).hide();jQuery('<div id="cluetip-waitimage"></div>').css({position:"absolute",zIndex:s-1}).insertBefore("#cluetip").hide();I.css({position:"absolute",zIndex:s});G.css({position:"relative",zIndex:s+1});F=jQuery('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:s+1}).appendTo("#cluetip")}var r=(L.dropShadow)?+L.dropShadowSteps:0;if(!J){J=jQuery([]);for(var n=0;n<r;n++){J=J.add(jQuery("<div></div>").css({zIndex:s-n-1,opacity:0.1,top:1+n,left:1+n}))}J.css({position:"absolute",backgroundColor:"#000"}).prependTo(I)}var R=jQuery(this);var d=R.attr(L.attribute),P=L.cluetipClass;if(!d&&!L.splitTitle){return true}if(L.local&&L.hideLocal){jQuery(d+":first").hide()}var k=parseInt(L.topOffset,10),Q=parseInt(L.leftOffset,10);var e,S;var Z=isNaN(parseInt(L.height,10))?"auto":(/\D/g).test(L.height)?L.height:L.height+"px";var u,M,T,g,V;var q=parseInt(L.width,10)+parseInt(I.css("paddingLeft"))+parseInt(I.css("paddingRight"))+r;if(isNaN(q)){q=275}var p=this.offsetWidth;var j,U,h,W,b;var o;var N=(L.attribute!="title")?R.attr(L.titleAttribute):"";if(L.splitTitle){o=N.split(L.splitTitle);N=o.shift()}var l;var O=function(y){if(!L.onActivate(R)){return false}m=true;I.removeClass().css({width:L.width});if(d==R.attr("href")){R.css("cursor",L.cursor)}R.attr("title","");if(L.hoverClass){R.addClass(L.hoverClass)}M=T=R.offset().top;j=R.offset().left;W=y.pageX;V=y.pageY;if(R[0].tagName.toLowerCase()!="area"){u=jQuery(document).scrollTop();b=jQuery(window).width()}if(L.positionBy=="fixed"){U=p+j+Q;I.css({left:U})}else{U=(p>j&&j>q)||j+p+q+Q>b?j-q-Q:p+j+Q;if(R[0].tagName.toLowerCase()=="area"||L.positionBy=="mouse"||p+q>b){if(W+20+q>b){U=(W-q-Q)>=0?W-q-Q:W-(q/2)}else{U=W+Q}var w=U<0?y.pageY+k:y.pageY}I.css({left:(U>0&&L.positionBy!="bottomTop")?U:(W+(q/2)>b)?b/2-q/2:Math.max(W-(q/2),0)})}S=jQuery(window).height();if(o){for(var x=0;x<o.length;x++){if(x==0){H.html(o[x])}else{H.append('<div class="split-body">'+o[x]+"</div>")}}f(w)}else{if(!L.local&&d.indexOf("#")!=0){if(Y&&L.ajaxCache){H.html(Y);f(w)}else{var z=L.ajaxSettings;z.url=d;z.beforeSend=function(){G.children().empty();if(L.waitImage){jQuery("#cluetip-waitimage").css({top:V-10,left:parseInt(U+(q/2),10)}).show()}};z.error=function(){if(m){H.html("<i>sorry, the contents could not be loaded</i>")}};z.success=function(i){Y=L.ajaxProcess(i);if(m){H.html(Y)}};z.complete=function(){C=jQuery("#cluetip-inner img").length;if(C){jQuery("#cluetip-inner img").load(function(){C--;if(C<1){jQuery("#cluetip-waitimage").hide();if(m){f(w)}}})}else{jQuery("#cluetip-waitimage").hide();if(m){f(w)}}};jQuery.ajax(z)}}else{if(L.local){var AA=jQuery(d+":first");var v=jQuery.fn.wrapInner?AA.wrapInner("<div></div>").children().clone(true):AA.html();jQuery.fn.wrapInner?H.empty().append(v):H.html(v);f(w)}}}};var f=function(w){I.addClass("cluetip-"+P);if(L.truncate){var x=H.text().slice(0,L.truncate)+"...";H.html(x)}function i(){}N?D.show().html(N):(L.showTitle)?D.show().html("&nbsp;"):D.hide();if(L.sticky){var v=jQuery('<div id="cluetip-close"><a href="#">'+L.closeText+"</a></div>");(L.closePosition=="bottom")?v.appendTo(H):(L.closePosition=="title")?v.prependTo(D):v.prependTo(H);v.click(function(){X();return false});if(L.mouseOutClose){I.hover(function(){i()},function(){v.trigger("click")})}else{I.unbind("mouseout")}}var y="";G.css({overflow:Z=="auto"?"visible":"auto",height:Z});e=Z=="auto"?I.outerHeight():parseInt(Z,10);g=T;if(L.positionBy=="fixed"){g=T-L.dropShadowSteps+k}else{if((U<W&&Math.max(U,0)+q>W)||L.positionBy=="bottomTop"){if(T+e+k>u+S&&V-u>e+k){g=V-e-k;y="top"}else{g=V+k;y="bottom"}}else{if(T+e+k>u+S){g=(e>=S)?u:u+S-e-k}else{if(R.css("display")=="block"||R[0].tagName.toLowerCase()=="area"||L.positionBy=="mouse"){g=w-k}else{g=T-L.dropShadowSteps}}}}if(y==""){U<j?y="left":y="right"}I.css({top:g+"px"}).removeClass().addClass("clue-"+y+"-"+P).addClass(" cluetip-"+P);if(L.arrows){var z=(T-g-L.dropShadowSteps);F.css({top:(/(left|right)/.test(y)&&U>=0&&z>0)?z+"px":/(left|right)/.test(y)?0:""}).show()}else{F.hide()}J.hide();I.hide()[L.fx.open](L.fx.open!="show"&&L.fx.openSpeed);if(L.dropShadow){J.css({height:e,width:L.width}).show()}L.onShow(I,H)};var t=function(){m=false;jQuery("#cluetip-waitimage").hide();if(!L.sticky){X()}if(L.hoverClass){R.removeClass(L.hoverClass)}};var X=function(){G.parent().hide().removeClass().end().children().empty();if(N){R.attr("title",N)}R.css("cursor","");if(L.arrows){F.css({top:""})}};if(L.activation=="click"||L.activation=="toggle"){R.click(function(i){if(I.is(":hidden")){O(i)}else{t(i)}this.blur();return false})}else{R.click(function(){if(d==R.attr("href")){return false}});if(jQuery.fn.hoverIntent&&L.hoverIntent){R.hoverIntent({sensitivity:L.hoverIntent.sensitivity,interval:L.hoverIntent.interval,over:function(i){O(i)},timeout:L.hoverIntent.timeout,out:function(i){t(i)}})}else{R.hover(function(i){O(i)},function(i){t(i)})}}})};var B="appendTo",A="body";jQuery.cluetip={};jQuery.cluetip.setup=function(K){if(K&&K.insertionType&&(K.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){B=K.insertionType}if(K&&K.insertionElement){A=K.insertionElement}}})(jQuery);(function(A){A.blockUI=function(D,B,C){A.blockUI.impl.install(window,D,B,C)};A.blockUI.version=1.33;A.unblockUI=function(B){A.blockUI.impl.remove(window,B)};jQuery.fn.block=function(D,B,C){return this.each(function(){if(!this.$pos_checked){if(A.css(this,"position")=="static"){this.style.position="relative"}if(A.browser.msie){this.style.zoom=1}this.$pos_checked=1}A.blockUI.impl.install(this,D,B,C)})};jQuery.fn.unblock=function(B){return this.each(function(){A.blockUI.impl.remove(this,B)})};jQuery.fn.displayBox=function(K,L,I){var E=this[0];if(!E){return }var N=A(E);K=K||{};var M=N.width()||N.attr("width")||K.width||A.blockUI.defaults.displayBoxCSS.width;var J=N.height()||N.attr("height")||K.height||A.blockUI.defaults.displayBoxCSS.height;if(M[M.length-1]=="%"){var H=document.documentElement.clientWidth||document.body.clientWidth;M=parseInt(M)||100;M=(M*H)/100}if(J[J.length-1]=="%"){var F=document.documentElement.clientHeight||document.body.clientHeight;J=parseInt(J)||100;J=(J*F)/100}var G="-"+parseInt(M)/2+"px";var C="-"+parseInt(J)/2+"px";var D=navigator.userAgent.toLowerCase();var B={displayMode:L||1,noalpha:I&&/mac/.test(D)&&/firefox/.test(D)};A.blockUI.impl.install(window,E,{width:M,height:J,marginTop:C,marginLeft:G},B)};A.blockUI.defaults={pageMessage:" ",elementMessage:" ",overlayCSS:{backgroundColor:"#ccc",opacity:"0.4"},pageMessageCSS:{width:"0",margin:"-50px 0 0 -125px",top:"50%",left:"45%",textAlign:"center",color:"#000",backgroundColor:"#fff"},elementMessageCSS:{width:"250px",padding:"10px",textAlign:"center",backgroundColor:"#fff"},displayBoxCSS:{width:"400px",height:"400px",top:"50%",left:"50%"},ie6Stretch:1,allowTabToLeave:0,closeMessage:"Click to close",fadeOut:1,fadeTime:400};A.blockUI.impl={box:null,boxCallback:null,pageBlock:null,pageBlockEls:[],op8:window.opera&&window.opera.version()<9,ie6:A.browser.msie&&/MSIE 6.0/.test(navigator.userAgent),install:function(D,E,H,B){B=B||{};this.boxCallback=typeof B.displayMode=="function"?B.displayMode:null;this.box=B.displayMode?E:null;var J=(D==window);var O=this.op8||A.browser.mozilla&&/Linux/.test(navigator.platform);if(typeof B.alphaOverride!="undefined"){O=B.alphaOverride==0?1:0}if(J&&this.pageBlock){this.remove(window,{fadeOut:0})}if(E&&typeof E=="object"&&!E.jquery&&!E.nodeType){H=E;E=null}E=E?(E.nodeType?A(E):E):J?A.blockUI.defaults.pageMessage:A.blockUI.defaults.elementMessage;if(B.displayMode){var P=jQuery.extend({},A.blockUI.defaults.displayBoxCSS)}else{var P=jQuery.extend({},J?A.blockUI.defaults.pageMessageCSS:A.blockUI.defaults.elementMessageCSS)}H=jQuery.extend(P,H||{});var I=(A.browser.msie)?A('<iframe class="blockUI" style="z-index:1000;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="javascript:false;"></iframe>'):A('<div class="blockUI" style="display:none"></div>');var M=A('<div class="blockUI" style="z-index:1001;cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var F=J?A('<div class="blockUI blockMsg" style="z-index:1002;cursor:wait;padding:0;position:fixed"></div>'):A('<div class="blockUI" style="display:none;z-index:1002;cursor:wait;position:absolute"></div>');M.css("position",J?"fixed":"absolute");if(E){F.css(H)}if(!O){M.css(A.blockUI.defaults.overlayCSS)}if(this.op8){M.css({width:""+D.clientWidth,height:""+D.clientHeight})}if(A.browser.msie){I.css("opacity","0.0")}A([I[0],M[0],F[0]]).appendTo(J?"body":D);var L=A.browser.msie&&(!A.boxModel||A("object,embed",J?null:D).length>0);if(this.ie6||L){if(J&&A.blockUI.defaults.ie6Stretch&&A.boxModel){A("html,body").css("height","100%")}if((this.ie6||!A.boxModel)&&!J){var N=this.sz(D,"borderTopWidth"),G=this.sz(D,"borderLeftWidth");var K=N?"(0 - "+N+")":0;var C=G?"(0 - "+G+")":0}A.each([I,M,F],function(Q,S){var R=S[0].style;R.position="absolute";if(Q<2){J?R.setExpression("height",'document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + "px"'):R.setExpression("height",'this.parentNode.offsetHeight + "px"');J?R.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):R.setExpression("width",'this.parentNode.offsetWidth + "px"');if(C){R.setExpression("left",C)}if(K){R.setExpression("top",K)}}else{if(J){R.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}R.marginTop=0}})}if(B.displayMode){M.css("cursor","default").attr("title",A.blockUI.defaults.closeMessage);F.css("cursor","default");A([I[0],M[0],F[0]]).removeClass("blockUI").addClass("displayBox");A().click(A.blockUI.impl.boxHandler).bind("keypress",A.blockUI.impl.boxHandler)}else{this.bind(1,D)}F.append(E).show();if(E.jquery){E.show()}if(B.displayMode){return }if(J){this.pageBlock=F[0];this.pageBlockEls=A(":input:enabled:visible",this.pageBlock);setTimeout(this.focus,20)}else{this.center(F[0])}},remove:function(D,E){var F=A.extend({},A.blockUI.defaults,E);this.bind(0,D);var C=D==window;var B=C?A("body").children().filter(".blockUI"):A(".blockUI",D);if(C){this.pageBlock=this.pageBlockEls=null}if(F.fadeOut){B.fadeOut(F.fadeTime,function(){if(this.parentNode){this.parentNode.removeChild(this)}})}else{B.remove()}},boxRemove:function(B){A().unbind("click",A.blockUI.impl.boxHandler).unbind("keypress",A.blockUI.impl.boxHandler);if(this.boxCallback){this.boxCallback(this.box)}A("body .displayBox").hide().remove()},handler:function(E){if(E.keyCode&&E.keyCode==9){if(A.blockUI.impl.pageBlock&&!A.blockUI.defaults.allowTabToLeave){var D=A.blockUI.impl.pageBlockEls;var C=!E.shiftKey&&E.target==D[D.length-1];var B=E.shiftKey&&E.target==D[0];if(C||B){setTimeout(function(){A.blockUI.impl.focus(B)},10);return false}}}if(A(E.target).parents("div.blockMsg").length>0){return true}return A(E.target).parents().children().filter("div.blockUI").length==0},boxHandler:function(B){if((B.keyCode&&B.keyCode==27)||(B.type=="click"&&A(B.target).parents("div.blockMsg").length==0)){A.blockUI.impl.boxRemove()}return true},bind:function(B,E){var D=E==window;if(!B&&(D&&!this.pageBlock||!D&&!E.$blocked)){return }if(!D){E.$blocked=B}var C=A(E).find("a,:input");A.each(["mousedown","mouseup","keydown","keypress","click"],function(F,G){C[B?"bind":"unbind"](G,A.blockUI.impl.handler)})},focus:function(B){if(!A.blockUI.impl.pageBlockEls){return }var C=A.blockUI.impl.pageBlockEls[B===true?A.blockUI.impl.pageBlockEls.length-1:0];if(C){C.focus()}},center:function(E){var F=E.parentNode,D=E.style;var B=((F.offsetWidth-E.offsetWidth)/2)-this.sz(F,"borderLeftWidth");var C=((F.offsetHeight-E.offsetHeight)/2)-this.sz(F,"borderTopWidth");D.left=B>0?(B+"px"):"0";D.top=C>0?(C+"px"):"0"},sz:function(B,C){return parseInt(A.css(B,C))||0}}})(jQuery);jQuery.jPrintArea=function(A){try{var C=document.createElement("IFRAME");jQuery(C).css({position:"absolute",background:"#fff",width:"0",height:"0",border:"0",left:"-1500px",top:"-1500px"});jQuery("body").append(C);var H=null;if(C.contentDocument){H=C.contentDocument}else{if(C.contentWindow){H=C.contentWindow.document}else{if(C.document){H=C.document}else{alert("Error printing");return null}}}var J=jQuery('link[@rel="stylesheet"]');for(var D=0;D<J.length;D++){if(jQuery(J[D]).attr("media")=="print"){H.write('<link type="text/css" rel="stylesheet" href="'+J[D].href+'"></link>')}}var F=jQuery("div:hidden",A);jQuery(F).show();jQuery(F).prepend('<h2 class="print-details-title">Flight details</h2>');var E=jQuery(A).html();var G=jQuery("#header-wrapper",A).length>0?true:false;if(!G){E=jQuery("#header-wrapper").html()+E}var I=jQuery("#footer-wrapper",A).length>0?true:false;if(!G){E+=jQuery("#footer-wrapper").html()}H.write('<div class="'+jQuery(A).attr("class")+' print">'+E+"</div>");H.close();C.contentWindow.focus();C.contentWindow.print();jQuery("h2").remove(".print-details-title");jQuery(F).hide();jQuery("body").remove(C)}catch(B){}};var SlideShow=function(){this._settings={contentdivs:[],toclinks:[],topzindex:[],currentpage:1,prevpage:1};this._intervalId=0};SlideShow.prototype.init=function(C){try{for(var B in C){this._settings[B]=C[B]}if(jQuery("#"+this._settings.id).length>0){this._build()}}catch(A){}};SlideShow.prototype._build=function(){try{var H=this;jQuery("#"+this._settings.id+" div").each(function(J){if(jQuery(this).hasClass("contentdiv")){H._settings.contentdivs.push(this)}if(J==0){jQuery(this).show()}});var D=jQuery("#paginate-"+this._settings.id);var G="";var C=this._settings.toc;var A=this._settings.nextprev;if(typeof C=="string"&&C!="markup"||typeof C=="object"){for(var F=1;F<=this._settings.contentdivs.length;F++){G+='<a href="javascript:void(0);" id="'+this._settings.id+"_paginate_link"+F+'"class="toc">'+(typeof C=="string"?C.replace(/#increment/,F):C[F-1])+"</a> "}G=(A[0]!=""?'<a href="#prev" class="prev">'+A[0]+"</a> ":"")+G+(A[1]!=""?'<a href="#next" class="next">'+A[1]+"</a>":"");D.html(G)}var E=false;var I=0;jQuery("#paginate-"+this._settings.id+" a").each(function(J){if(jQuery(this).hasClass("toc")){if(!E){jQuery(this).addClass("selected");E=true}if(I>H._settings.contentdivs.length-1){jQuery(this).hide()}jQuery(this).attr("rel",++I);jQuery(this).click(function(){H._selectPage(jQuery(this).attr("rel"))});H._settings.toclinks.push(this)}else{if(jQuery(this).hasClass("prev")){jQuery(this).click(function(){H._nextPage(-1)})}else{if(jQuery(this).hasClass("next")){jQuery(this).click(function(){H._nextPage()})}}}});if(this._settings.autorotate[0]){this._intervalId=window.setInterval(this._nextPage.createDelegate(this,[1]),this._settings.autorotate[1])}}catch(B){}};SlideShow.prototype._nextPage=function(A){try{A=typeof A!="undefined"&&A!=null?parseInt(A):1;var B=(this._settings.currentpage+A)%(this._settings.contentdivs.length);if(B<1){B=(this._settings.contentdivs.length)-B}this._selectPage(B)}catch(C){}};SlideShow.prototype._selectPage=function(A){try{jQuery("#"+this._settings.id+"_paginate_link"+this._settings.currentpage).removeClass("selected");jQuery("#"+this._settings.id+"_paginate_link"+A).addClass("selected");jQuery(jQuery("#"+this._settings.id+" .contentdiv")[A-1]).css("z-index","1");jQuery(jQuery("#"+this._settings.id+" .contentdiv")[this._settings.currentpage-1]).css("z-index","2");jQuery(jQuery("#"+this._settings.id+" .contentdiv")[A-1]).show();jQuery(jQuery("#"+this._settings.id+" .contentdiv")[this._settings.currentpage-1]).animate({width:"hide"},"slow");this._settings.currentpage=parseInt(A)}catch(B){}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(B){var A=this.length;var C=Number(arguments[1])||0;C=(C<0)?Math.ceil(C):Math.floor(C);if(C<0){C+=A}for(;C<A;C++){if(C in this&&this[C]===B){return C}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(B){var A=this.length;var C=Number(arguments[1]);if(isNaN(C)){C=A-1}else{C=(C<0)?Math.ceil(C):Math.floor(C);if(C<0){C+=A}else{if(C>=A){C=A-1}}}for(;C>-1;C--){if(C in this&&this[C]===B){return C}}return -1}}if(!Array.prototype.contains){Array.prototype.contains=function(A){var B=Number(arguments[1])||0;return this.indexOf(A,B)!=-1}}if(!Array.prototype.each){Array.prototype.each=function(B){var A=this.length;if(typeof B!="function"){throw new TypeError()}var D=arguments[1];for(var C=0;C<A;C++){if(C in this){B.call(D,this[C],C,this)}}}}if(!Array.prototype.every){Array.prototype.every=function(B){var A=this.length;if(typeof B!="function"){throw new TypeError()}var D=arguments[1];for(var C=0;C<A;C++){if(C in this&&!B.call(D,this[C],C,this)){return false}}return true}}if(!Array.prototype.extend){Array.prototype.add=function(C){for(var B=0,A=C.length;B<A;B++){this.push(C[B])}return this}}if(!Array.prototype.difference){Array.prototype.difference=function(D){var C=[];for(var B=0,A=this.length;B<A;B++){if(!D.hasValue(this[B])){C.push(this[B])}}return C}}if(!Array.prototype.filter){Array.prototype.filter=function(B){var A=this.length;if(typeof B!="function"){throw new TypeError()}var E=new Array();var D=arguments[1];for(var C=0;C<A;C++){if(C in this){var F=this[C];if(B.call(D,F,C,this)){E.push(F)}}}return E}}if(!Array.prototype.forEach){Array.prototype.forEach=Array.prototype.each}if(!Array.prototype.contains){Array.prototype.forEach=Array.prototype.each}if(!Array.prototype.include){Array.prototype.include=function(A){if(!this.hasValue(A)){this.push(A)}return this}}if(!Array.prototype.map){Array.prototype.map=function(B){var A=this.length;if(typeof B!="function"){throw new TypeError()}var E=new Array(A);var D=arguments[1];for(var C=0;C<A;C++){E[C]=B.call(D,this[C],C,this)}return E}}if(!Array.prototype.merge){Array.prototype.merge=function(C){for(var B=0,A=C.length;B<A;B++){this.include(C[B])}return this}}if(!Array.prototype.remove){Array.prototype.remove=function(C){var B=0;var A=this.length;while(B<A){if(this[B]===C){this.splice(B,1);A--}else{B++}}return this}}if(!Array.prototype.some){Array.prototype.some=function(B){var A=this.length;if(typeof B!="function"){throw new TypeError()}var D=arguments[1];for(var C=0;C<A;C++){if(C in this&&B.call(D,this[C],C,this)){return true}}return false}}if(!Function.prototype.createCallback){Function.prototype.createCallback=function(){var A=arguments;var B=this;return function(){return B.apply(window,A)}}}if(!Function.prototype.createDelegate){Function.prototype.createDelegate=function(C,B,A){var D=this;return function(){var F=B||arguments;if(A===true){F=Array.prototype.slice.call(arguments,0);F=F.concat(B)}else{if(typeof A=="number"){F=Array.prototype.slice.call(arguments,0);var E=[A,0].concat(B);Array.prototype.splice.apply(F,E)}}return D.apply(C||window,F)}}}if(!Function.prototype.defer){Function.prototype.defer=function(C,D,B,A){return setTimeout(this.createDelegate(D,B,A),C)}}if(!Function.prototype.createSequence){Function.prototype.createSequence=function(B,A){if(typeof B!="function"){return this}var C=this;return function(){var D=C.apply(this||window,arguments);B.apply(A||this||window,arguments);return D}}}a.namespace("MEB.keys");MEB.keys.codes={ENTER:13};MEB.keys.Manager=function(C,A,D){this._keyCode=C;this._callBack=D;for(var B=0;B<A.length;B++){YAHOO.util.Event.addListener($(A[B].id),"keypress",this._onKeyPressed,this,true)}};MEB.keys.Manager.prototype._onKeyPressed=function(A,C){var B=A.keyCode;if(B==C._keyCode){C._callBack()}};a.namespace("MEB.utilities");MEB.utilities.Modifiers=function(){};MEB.utilities.Modifiers.prototype.evaluate=function(str){try{var res=str;try{res=eval(str)}catch(exc){}return res}catch(exception){}};MEB.utilities.Modifiers.prototype.dayIndicator=function(E){try{var A=1000*60*60*24;var G=Math.floor(E.legs[0].dates.from.fullDate/A);var F=Math.floor(E.legs[E.legs.length-1].dates.to.fullDate/A);var D=F-G;var C="";if(D==1){C=MEB.utilities.i18n.translate("global","day").replace("{0}",D+"")}else{if(D>1){C=MEB.utilities.i18n.translate("global","days").replace("{0}",D+"")}}return C}catch(B){}};MEB.utilities.Modifiers.prototype.firstLetter=function(B){try{return B.substring(0,1).toUpperCase()||""}catch(A){}};MEB.utilities.Modifiers.prototype.substitute=function(){try{var str=arguments[0];for(var i=1;i<arguments.length;i++){var obj;try{obj=eval(arguments[i])}catch(exception){}obj=obj||arguments[i];if(typeof obj=="undefined"){obj=""}str=str.replace("{"+(i-1)+"}",obj)}return str}catch(exception){}};MEB.utilities.Modifiers.prototype.toHours=function(F,E){try{E=E||"h ";var D=parseInt(F,10)/60000;var C=Math.floor(D/60);var B=Math.floor(D-C*60);B=B<10?"0"+B:B;return C+E+B}catch(A){}};MEB.utilities.Modifiers.prototype.toPartOfDay=function(C){try{var A=parseInt(C);if(A>=0&&A<9){return"AM1"}else{if(A>=9&&A<12){return"AM2"}else{if(A>=12&&A<17){return"PM1"}else{if(A>=17&&A<21){return"PM2"}else{return"PM3"}}}}}catch(B){}};MEB.utilities.Modifiers.prototype.toBestFareTime=function(C){try{var A=parseInt(C);if(A>=0&&A<12){return"m"}else{if(A>=12&&A<17){return"n"}else{if(A>=17&&A<24){return"e"}}}}catch(B){}};MEB.utilities.modifiers=new MEB.utilities.Modifiers();c.require("aria");a.namespace("MEB.utilities.sorter");MEB.utilities.sorter.QuickSort=function(){this._parent=null;this._data=[];this._length=0;this._comparator=null;this._desc=null};MEB.utilities.sorter.QuickSort.prototype.init=function(D,A,C){try{this._parent=$(D);this._data=$jq("#"+D+" "+A);this._length=this._data.length;this._comparator=C}catch(B){}};MEB.utilities.sorter.QuickSort.prototype._partition=function(G,B,A){try{var H=this._data[A];this._swap(A,B-1);var D=G;var C;for(var F=G;F<B-1;++F){C=this._comparator(this._data[F],H);C=this._desc?-1*C:C;if(C==-1||C===0){this._swap(D,F);++D}}this._swap(B-1,D);return D}catch(E){}};MEB.utilities.sorter.QuickSort.prototype._qSort=function(D,B){try{if(B-1>D){var A=D+Math.floor(Math.random()*(B-D));A=this._partition(D,B,A);this._qSort(D,A);this._qSort(A+1,B)}}catch(C){}};MEB.utilities.sorter.QuickSort.prototype._swap=function(D,A){try{var C=this._data[D];this._data[D]=this._data[A];this._data[A]=C}catch(B){}};MEB.utilities.sorter.QuickSort.prototype.sort=function(C){try{this._desc=C;if(this._length<=1){return }this._qSort(0,this._length);for(var B=0;B<this._data.length;B++){this._parent.appendChild($(this._data[B].getAttribute("linkTo")))}MEB.eventBus.fire({eventName:"onSortSucces",data:{}})}catch(A){MEB.eventBus.fire({eventName:"onSortError",data:{}})}};var TrimPath;(function(){if(TrimPath==null){TrimPath=new Object()}if(TrimPath.evalEx==null){TrimPath.evalEx=function(src){return eval(src)}}var UNDEFINED;if(Array.prototype.pop==null){Array.prototype.pop=function(){if(this.length===0){return UNDEFINED}return this[--this.length]}}if(Array.prototype.push==null){Array.prototype.push=function(){for(var i=0;i<arguments.length;++i){this[this.length]=arguments[i]}return this.length}}TrimPath.parseTemplate=function(tmplContent,optTmplName,optEtc){if(optEtc==null){optEtc=TrimPath.parseTemplate_etc}var funcSrc=parse(tmplContent,optTmplName,optEtc);var func=TrimPath.evalEx(funcSrc,optTmplName,1);if(func!=null){return new optEtc.Template(optTmplName,tmplContent,funcSrc,func,optEtc)}return null};try{String.prototype.process=function(context,optFlags){var template=TrimPath.parseTemplate(this,null);if(template!=null){return template.process(context,optFlags)}return this}}catch(e){}TrimPath.parseTemplate_etc={};TrimPath.parseTemplate_etc.statementTag="forelse|for|if|elseif|else|var|macro";TrimPath.parseTemplate_etc.statementDef={"if":{delta:1,prefix:"if (",suffix:") {",paramMin:1},"else":{delta:0,prefix:"} else {"},elseif:{delta:0,prefix:"} else if (",suffix:") {",paramDefault:"true"},"/if":{delta:-1,prefix:"}"},"for":{delta:1,paramMin:3,prefixFunc:function(stmtParts,state,tmplName,etc){if(stmtParts[2]!="in"){throw new etc.ParseError(tmplName,state.line,"bad for loop statement: "+stmtParts.join(" "))}var iterVar=stmtParts[1];var listVar="__LIST__"+iterVar;return["var ",listVar," = ",stmtParts[3],";","var __LENGTH_STACK__;","if (typeof(__LENGTH_STACK__) == 'undefined' || !__LENGTH_STACK__.length) __LENGTH_STACK__ = new Array();","__LENGTH_STACK__[__LENGTH_STACK__.length] = 0;","if ((",listVar,") != null) { ","var ",iterVar,"_ct = 0;","for (var ",iterVar,"_index in ",listVar,") { ",iterVar,"_ct++;","if (typeof(",listVar,"[",iterVar,"_index]) == 'function') {continue;}","__LENGTH_STACK__[__LENGTH_STACK__.length - 1]++;","var ",iterVar," = ",listVar,"[",iterVar,"_index];"].join("")}},forelse:{delta:0,prefix:"} } if (__LENGTH_STACK__[__LENGTH_STACK__.length - 1] == 0) { if (",suffix:") {",paramDefault:"true"},"/for":{delta:-1,prefix:"} }; delete __LENGTH_STACK__[__LENGTH_STACK__.length - 1];"},"var":{delta:0,prefix:"var ",suffix:";"},macro:{delta:1,prefixFunc:function(stmtParts,state,tmplName,etc){var macroName=stmtParts[1].split("(")[0];return["var ",macroName," = function",stmtParts.slice(1).join(" ").substring(macroName.length),"{ var _OUT_arr = []; var _OUT = { write: function(m) { if (m) _OUT_arr.push(m); } }; "].join("")}},"/macro":{delta:-1,prefix:" return _OUT_arr.join(''); };"}};TrimPath.parseTemplate_etc.modifierDef={eat:function(v){return""},escape:function(s){return String(s).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},capitalize:function(s){return String(s).toUpperCase()},"default":function(s,d){return s!=null?s:d}};TrimPath.parseTemplate_etc.modifierDef.h=TrimPath.parseTemplate_etc.modifierDef.escape;TrimPath.parseTemplate_etc.Template=function(tmplName,tmplContent,funcSrc,func,etc){this.process=function(context,flags){if(context==null){context={}}if(context._MODIFIERS==null){context._MODIFIERS={}}if(context.defined==null){context.defined=function(str){return(context[str]!=undefined)}}for(var k in etc.modifierDef){if(context._MODIFIERS[k]==null){context._MODIFIERS[k]=etc.modifierDef[k]}}if(flags==null){flags={}}var resultArr=[];var resultOut={write:function(m){resultArr.push(m)}};try{func(resultOut,context,flags)}catch(e){if(flags.throwExceptions==true){throw e}var result=new String(resultArr.join("")+"[ERROR: "+e.toString()+(e.message?"; "+e.message:"")+"]");result.exception=e;return result}return resultArr.join("")};this.name=tmplName;this.source=tmplContent;this.sourceFunc=funcSrc;this.toString=function(){return"TrimPath.Template ["+tmplName+"]"}};TrimPath.parseTemplate_etc.ParseError=function(name,line,message){this.name=name;this.line=line;this.message=message};TrimPath.parseTemplate_etc.ParseError.prototype.toString=function(){return("TrimPath template ParseError in "+this.name+": line "+this.line+", "+this.message)};var parse=function(body,tmplName,etc){body=cleanWhiteSpace(body);var funcText=["var TrimPath_Template_TEMP = function(_OUT, _CONTEXT, _FLAGS) { with (_CONTEXT) {"];var state={stack:[],line:1};var endStmtPrev=-1;while(endStmtPrev+1<body.length){var begStmt=endStmtPrev;begStmt=body.indexOf("{",begStmt+1);while(begStmt>=0){var endStmt=body.indexOf("}",begStmt+1);var stmt=body.substring(begStmt,endStmt);var blockrx=stmt.match(/^\{(cdata|minify|eval)/);if(blockrx){var blockType=blockrx[1];var blockMarkerBeg=begStmt+blockType.length+1;var blockMarkerEnd=body.indexOf("}",blockMarkerBeg);if(blockMarkerEnd>=0){var blockMarker;if(blockMarkerEnd-blockMarkerBeg<=0){blockMarker="{/"+blockType+"}"}else{blockMarker=body.substring(blockMarkerBeg+1,blockMarkerEnd)}var blockEnd=body.indexOf(blockMarker,blockMarkerEnd+1);if(blockEnd>=0){emitSectionText(body.substring(endStmtPrev+1,begStmt),funcText);var blockText=body.substring(blockMarkerEnd+1,blockEnd);if(blockType=="cdata"){emitText(blockText,funcText)}else{if(blockType=="minify"){emitText(scrubWhiteSpace(blockText),funcText)}else{if(blockType=="eval"){if(blockText!=null&&blockText.length>0){funcText.push("_OUT.write( (function() { "+blockText+" })() );")}}}}begStmt=endStmtPrev=blockEnd+blockMarker.length-1}}}else{if(body.charAt(begStmt-1)!="$"&&body.charAt(begStmt-1)!="\\"){var offset=(body.charAt(begStmt+1)=="/"?2:1);if(body.substring(begStmt+offset,begStmt+10+offset).search(TrimPath.parseTemplate_etc.statementTag)==0){break}}}begStmt=body.indexOf("{",begStmt+1)}if(begStmt<0){break}var endStmt=body.indexOf("}",begStmt+1);if(endStmt<0){break}emitSectionText(body.substring(endStmtPrev+1,begStmt),funcText);emitStatement(body.substring(begStmt,endStmt+1),state,funcText,tmplName,etc);endStmtPrev=endStmt}emitSectionText(body.substring(endStmtPrev+1),funcText);if(state.stack.length!=0){throw new etc.ParseError(tmplName,state.line,"unclosed, unmatched statement(s): "+state.stack.join(","))}funcText.push("}}; TrimPath_Template_TEMP");return funcText.join("")};var emitStatement=function(stmtStr,state,funcText,tmplName,etc){var parts=stmtStr.slice(1,-1).split(" ");var stmt=etc.statementDef[parts[0]];if(stmt==null){emitSectionText(stmtStr,funcText);return }if(stmt.delta<0){if(state.stack.length<=0){throw new etc.ParseError(tmplName,state.line,"close tag does not match any previous statement: "+stmtStr)}state.stack.pop()}if(stmt.delta>0){state.stack.push(stmtStr)}if(stmt.paramMin!=null&&stmt.paramMin>=parts.length){throw new etc.ParseError(tmplName,state.line,"statement needs more parameters: "+stmtStr)}if(stmt.prefixFunc!=null){funcText.push(stmt.prefixFunc(parts,state,tmplName,etc))}else{funcText.push(stmt.prefix)}if(stmt.suffix!=null){if(parts.length<=1){if(stmt.paramDefault!=null){funcText.push(stmt.paramDefault)}}else{for(var i=1;i<parts.length;i++){if(i>1){funcText.push(" ")}funcText.push(parts[i])}}funcText.push(stmt.suffix)}};var emitSectionText=function(text,funcText){if(text.length<=0){return }var nlPrefix=0;var nlSuffix=text.length-1;while(nlPrefix<text.length&&(text.charAt(nlPrefix)=="\n")){nlPrefix++}while(nlSuffix>=0&&(text.charAt(nlSuffix)==" "||text.charAt(nlSuffix)=="\t")){nlSuffix--}if(nlSuffix<nlPrefix){nlSuffix=nlPrefix}if(nlPrefix>0){funcText.push('if (_FLAGS.keepWhitespace == true) _OUT.write("');var s=text.substring(0,nlPrefix).replace("\n","\\n");if(s.charAt(s.length-1)=="\n"){s=s.substring(0,s.length-1)}funcText.push(s);funcText.push('");')}var lines=text.substring(nlPrefix,nlSuffix+1).split("\n");for(var i=0;i<lines.length;i++){emitSectionTextLine(lines[i],funcText);if(i<lines.length-1){funcText.push('_OUT.write("\\n");\n')}}if(nlSuffix+1<text.length){funcText.push('if (_FLAGS.keepWhitespace == true) _OUT.write("');var s=text.substring(nlSuffix+1).replace("\n","\\n");if(s.charAt(s.length-1)=="\n"){s=s.substring(0,s.length-1)}funcText.push(s);funcText.push('");')}};var emitSectionTextLine=function(line,funcText){var endMarkPrev="}";var endExprPrev=-1;while(endExprPrev+endMarkPrev.length<line.length){var begMark="%{",endMark="}";var begExpr=line.indexOf(begMark,endExprPrev+endMarkPrev.length);if(begExpr<0){break}if(line.charAt(begExpr+2)=="%"){begMark="%{%";endMark="%}"}var endExpr=line.indexOf(endMark,begExpr+begMark.length);if(endExpr<0){break}emitText(line.substring(endExprPrev+endMarkPrev.length,begExpr),funcText);var exprArr=line.substring(begExpr+begMark.length,endExpr).replace(/\|\|/g,"#@@#").split("|");for(var k in exprArr){if(exprArr[k].replace){exprArr[k]=exprArr[k].replace(/#@@#/g,"||")}}funcText.push("_OUT.write(");emitExpression(exprArr,exprArr.length-1,funcText);funcText.push(");");endExprPrev=endExpr;endMarkPrev=endMark}emitText(line.substring(endExprPrev+endMarkPrev.length),funcText)};var emitText=function(text,funcText){if(text==null||text.length<=0){return }text=text.replace(/\\/g,"\\\\");text=text.replace(/\n/g,"\\n");text=text.replace(/"/g,'\\"');funcText.push('_OUT.write("');funcText.push(text);funcText.push('");')};var emitExpression=function(exprArr,index,funcText){var expr=exprArr[index];if(index<=0){funcText.push(expr);return }var parts=expr.split(":");funcText.push('_MODIFIERS["');funcText.push(parts[0]);funcText.push('"](');emitExpression(exprArr,index-1,funcText);if(parts.length>1){funcText.push(",");funcText.push(parts[1])}funcText.push(")")};var cleanWhiteSpace=function(result){result=result.replace(/\t/g,"    ");result=result.replace(/\r\n/g,"\n");result=result.replace(/\r/g,"\n");result=result.replace(/^(\s*\S*(\s+\S+)*)\s*$/,"$1");return result};var scrubWhiteSpace=function(result){result=result.replace(/^\s+/g,"");result=result.replace(/\s+$/g,"");result=result.replace(/\s+/g," ");result=result.replace(/^(\s*\S*(\s+\S+)*)\s*$/,"$1");return result};TrimPath.parseDOMTemplate=function(elementId,optDocument,optEtc){if(optDocument==null){optDocument=document}var element=optDocument.getElementById(elementId);var content=element.value;if(content==null){content=element.innerHTML}content=content.replace(/&lt;/g,"<").replace(/&gt;/g,">");return TrimPath.parseTemplate(content,elementId,optEtc)};TrimPath.processDOMTemplate=function(elementId,context,optFlags,optDocument,optEtc){return TrimPath.parseDOMTemplate(elementId,optDocument,optEtc).process(context,optFlags)}})();c.require("aria");a.namespace("MEB.utilities");MEB.utilities.VEWrapper=function(B,A){this._vMap=null;this._id=B;this._intervalID=null;if(A){this._center=A.center||new VELatLong(0,0);this._zoom=A.zoom||"1";this._style=A.style||"r";this._isFixed=A.isFixed||false;this._mode=A.mode||VEMapMode.Mode2D;this._dashBoardSize=A.dashBoardSize||VEDashboardSize.Normal;this._showMiniMap=A.showMiniMap||false;this._miniMapPosition=A.miniMapPosition||"rhbc";this._automaticLink=A.automaticLink||false;this._lineDisplay=A.lineDisplay.toLowerCase()||"straight";this._gcAccuracy=A.gcAccuracy||50;this._navCollapsed=A.navCollapsed||true}this._locations={};this._shapes={};this._key=null;this._shapeIcon=null;this._lineColor=null;this._defaultLayer=null;this._automaticLayer=null;this._geoRssLayer=null;this._toogleCtrlID="MSVE_navAction_toggleGlyphWrapper"};MEB.utilities.VEWrapper.prototype.init=function(){try{MEB.utilities.VEWrapper.safeLoader(this._safeInit.createDelegate(this))}catch(A){}};MEB.utilities.VEWrapper.safeLoader=function(B){try{if(!B()){setTimeout(function(){MEB.utilities.VEWrapper.safeLoader(B)},1000)}}catch(A){}};MEB.utilities.VEWrapper.prototype._safeInit=function(){var B=null;try{this._vMap=new VEMap(this._id);if(this._dashBoardSize){this._vMap.SetDashboardSize(this._dashBoardSize)}this._vMap.LoadMap(this._center,this._zoom,this._style,this._isFixed,this._mode);this._defaultLayer=new VEShapeLayer();this._vMap.AddShapeLayer(this._defaultLayer);if(this._showMiniMap){this.showMiniMap(this._miniMapPosition)}B=true;this._vMap.AttachEvent("onresize",this.setBestView.createDelegate(this))}catch(A){B=false}finally{return B}};MEB.utilities.VEWrapper.prototype._linkPlots=function(){try{if(this._automaticLayer!=null){this._vMap.DeleteShapeLayer(this._automaticLayer);this._automaticLayer=null}this._automaticLayer=new VEShapeLayer();this._vMap.AddShapeLayer(this._automaticLayer);var E=0;var A=0;var D=new Array();for(var C in this._locations){D[A++]=this._locations[C].LatLong;E++;if(E%2==0&&E>0){this.addLine(D,true,new VEColor(255,102,0,0.5),this._automaticLayer);A=0}}}catch(B){}};MEB.utilities.VEWrapper.prototype.addLine=function(D,E,A,C){try{E=E||false;C=C||this._defaultLayer;if(this._lineDisplay=="curve"){D=this._greatCircle(D)}var F=this._indexOfBreak(D);if(F==-1){return this._addLine(D,E,A,C)}else{return[this._addLine(D.slice(0,F),E,A,C),this._addLine(D.slice(F),E,A,C)]}}catch(B){}};MEB.utilities.VEWrapper.prototype._addLine=function(E,F,B,D){try{var A=new VEShape(VEShapeType.Polyline,E);D.AddShape(A);if(B){A.SetLineColor(B)}if(F){A.HideIcon()}}catch(C){}};MEB.utilities.VEWrapper.prototype.addPushpin=function(A,E,D){try{D=D||this._defaultLayer;var B=new VEShape(VEShapeType.Pushpin,A.LatLong);if(this._shapeIcon){B.SetCustomIcon(this._shapeIcon)}B.SetTitle(E.title);B.SetDescription(E.description);D.AddShape(B);return B}catch(C){}};MEB.utilities.VEWrapper.prototype.center=function(){try{this._vMap.SetCenterAndZoom(new VELatLong(0,0),0)}catch(A){}};MEB.utilities.VEWrapper.prototype._greatCircle=function(points){var res=[];try{with(Math){var lat1=points[0].Latitude*(PI/180);var lon1=points[0].Longitude*(PI/180);var lat2=points[1].Latitude*(PI/180);var lon2=points[1].Longitude*(PI/180);var d=2*asin(sqrt(pow((sin((lat1-lat2)/2)),2)+cos(lat1)*cos(lat2)*pow((sin((lon1-lon2)/2)),2)));var bearing=atan2(sin(lon1-lon2)*cos(lat2),cos(lat1)*sin(lat2)-sin(lat1)*cos(lat2)*cos(lon1-lon2))/-(PI/180);bearing=bearing<0?360+bearing:bearing;for(var n=0;n<this._gcAccuracy+1;n++){var f=(1/this._gcAccuracy)*n;f=f.toFixed(6);var A=sin((1-f)*d)/sin(d);var B=sin(f*d)/sin(d);var x=A*cos(lat1)*cos(lon1)+B*cos(lat2)*cos(lon2);var y=A*cos(lat1)*sin(lon1)+B*cos(lat2)*sin(lon2);var z=A*sin(lat1)+B*sin(lat2);var latN=atan2(z,sqrt(pow(x,2)+pow(y,2)));var lonN=atan2(y,x);var p=new VELatLong(latN/(PI/180),lonN/(PI/180));res.push(p)}}return res}catch(exception){}};MEB.utilities.VEWrapper.prototype.hideMiniMap=function(){try{this._vMap.HideMiniMap()}catch(A){}};MEB.utilities.VEWrapper.prototype._indexOfBreak=function(D){try{var C=Math.floor(D[0].Longitude);var E;for(var B=1;B<D.length;B++){E=Math.floor(D[B].Longitude);if((C>175&&E<-175)||(C<-175&&E>175)){return B}C=E}return -1}catch(A){}};MEB.utilities.VEWrapper.prototype.loadGeoRss=function(C){try{this._geoRssLayer=new VEShapeLayer();var B=new VEShapeSourceSpecification(VEDataType.GeoRSS,C,this._geoRssLayer);this._vMap.ImportShapeLayerData(B,function(){})}catch(A){}};MEB.utilities.VEWrapper.prototype.plot=function(B,D,C){try{this._key=B;var F=this;var E=function(H,G,K,J,I){F._onPlot(H,G,K,J,I);if(C){C(H,G,K,J,I)}};this._vMap.Find(null,D,null,null,0,20,false,false,false,false,E)}catch(A){}};MEB.utilities.VEWrapper.prototype._onPlot=function(){try{if(arguments[2].length>0){if(this._locations[this._key]!=null){this._vMap.DeleteShape(this._shapes[this._key]);this._shapes[this._key]=null;this._locations[this._key]=null}this._locations[this._key]=arguments[2][0];this._shapes[this._key]=this.addPushpin(this._locations[this._key],{title:arguments[2][0].Name,description:""});if(this._automaticLink){this._linkPlots()}}}catch(A){}};MEB.utilities.VEWrapper.prototype.reset=function(){try{this._vMap.DeleteShapeLayer(this._defaultLayer);this._defaultLayer=null;this._defaultLayer=new VEShapeLayer();this._vMap.AddShapeLayer(this._defaultLayer);this._shapes={};this._locations={};if(this._automaticLayer!=null){this._vMap.DeleteShapeLayer(this._automaticLayer);this._automaticLayer=null}this.center()}catch(A){}};MEB.utilities.VEWrapper.prototype.resize=function(C,A){try{this._vMap.Resize(C,A)}catch(B){}};MEB.utilities.VEWrapper.prototype.setBestView=function(){try{this._vMap.SetMapView(this._defaultLayer.GetBoundingRectangle())}catch(A){}};MEB.utilities.VEWrapper.prototype.setShapeIcon=function(A){this._shapeIcon=A};MEB.utilities.VEWrapper.prototype.showMiniMap=function(A){this._miniMapPosition=A||"rhbc";try{if(this._vMap.GetMapMode()==2){this._vMap.SetMapMode(VEMapMode.Mode2D)}var E={width:150,height:150};var D={width:parseInt(YAHOO.util.Dom.getStyle($(this._id),"width")),height:parseInt(YAHOO.util.Dom.getStyle($(this._id),"height"))};var B=null;if(this._miniMapPosition.toLowerCase()=="rhtc"){B={x:D.width-E.width,y:0}}else{if(this._miniMapPosition.toLowerCase()=="rhbc"){B={x:D.width-E.width,y:D.height-E.height}}else{if(this._miniMapPosition.toLowerCase()=="lhtc"){B={x:0,y:0}}else{if(this._miniMapPosition.toLowerCase()=="lhbc"){B={x:0,y:D.height-E.height}}}}}this._vMap.ShowMiniMap(B.x,B.y)}catch(C){}};MEB.utilities.VEWrapper.prototype.toggleNavigation=function(){try{if(this._intervalID!=null){window.clearInterval(this._intervalID)}document.getElementById(this._toogleCtrlID).click()}catch(A){this._intervalID=window.setInterval(this.toggleNavigation.createDelegate(this),500)}};c.require("aria");c.require("yui.container");a.namespace("MEB.popups");MEB.popups.PopupManager=function(){this._section="poma";this._waitingPopup=null;this._flightDetailsPopup=null;this._default_skin_name="default_skin";this._air_skin_name="air_skin";this._hotel_skin_name="hotel_skin";this._car_skin_name="car_skin";this._current_skin=null;this._plnext_skinning_behavior={hots:"hotel",cars:"car",flis:"air"};this._deactivate_meb_popup=false};MEB.popups.PopupManager.prototype.init=function(){try{this._initWaitingPopup();this._initFlyingDetailsPopup();MEB.eventBus.subscribe(this._onEvent.createDelegate(this))}catch(A){}};MEB.popups.PopupManager.prototype._initWaitingPopup=function(){try{this._waitingPopup=new YAHOO.widget.Panel("loading_message",{fixedcenter:true,close:false,draggable:false,modal:true,zindex:999,visible:false,underlay:"none"});this._waitingPopup.setHeader("<div class='tl'></div><div class='content'></div><div class='tr'></div>");var D='<div id="processing_block_wrapper"><div id="processing_block">';D+='<div id="search_icon"></div>';D+='<div id="popup_content_container"><div id="popup_content_position"><div id="popup_content">';D+='<h1 id="text_message">';D+=MEB.utilities.i18n.global.translate("info","PROCESSING");D+="</h1>";D+='<div id="throbber" ></div>';D+="</div></div></div></div></div>";this._waitingPopup.setBody(D);this._waitingPopup.setFooter("<div class='bl'></div><div class='content'></div><div class='br'></div>");this._waitingPopup.render(document.body);this._setSkin(this._default_skin_name);if((typeof (WDSWaitingImage)=="undefined")||(WDSWaitingImage==null)){}else{var B=$jq("body")[0].id;var A=this._plnext_skinning_behavior[B];if(A!=null){this._deactivate_meb_popup=false;if(A=="hotel"){this._setSkin(this._hotel_skin_name)}else{if(A=="car"){this._setSkin(this._car_skin_name)}else{if(A=="air"){this._setSkin(this._air_skin_name)}}}}else{this._deactivate_meb_popup=true}WDSWaitingImage=this}}catch(C){}};MEB.popups.PopupManager.prototype._initFlyingDetailsPopup=function(){try{this._flightDetailsPopup=new YAHOO.widget.Panel("popup_details",{width:"540px",top:"20px",fixedcenter:true,close:false,draggable:false,modal:true,zindex:999,visible:false,underlay:"none"})}catch(A){}};MEB.popups.PopupManager.prototype.pleaseWait=function(){try{if(this._deactivate_meb_popup==false){this._waitingPopup.show()}}catch(A){}};MEB.popups.PopupManager.prototype._delayedSubmit=function(B){try{setTimeout(function(){$jq("#"+B).submit()},50)}catch(A){}};MEB.popups.PopupManager.prototype._displayAndSubmit=function(B){try{this._waitingPopup.show();this._delayedSubmit(B)}catch(A){}};MEB.popups.PopupManager.prototype.displayAirPopupAndSubmit=function(B){try{this._setSkin(this._air_skin_name);this._displayAndSubmit(B)}catch(A){}};MEB.popups.PopupManager.prototype.displayHotelPopupAndSubmit=function(B){try{this._setSkin(this._hotel_skin_name);this._displayAndSubmit(B)}catch(A){}};MEB.popups.PopupManager.prototype.displayCarPopupAndSubmit=function(B){try{this._setSkin(this._car_skin_name);this._displayAndSubmit(B)}catch(A){}};MEB.popups.PopupManager.prototype._setSkin=function(B){try{if(this._current_skin!=null){$jq("#loading_message .bd").removeClass(this._current_skin)}$jq("#loading_message .bd").addClass(B);this._current_skin=B}catch(A){}};MEB.popups.PopupManager.prototype._showFlightDetails=function(C){try{this._flightDetailsPopup.setBody($jq("#"+C.getAttribute("linkTo")).html());this._flightDetailsPopup.setFooter('<a id="flight_details_close" href="javascript:void(0)" title="'+MEB.utilities.i18n.contact_us.translate("markup","FATAL_ERROR_CLOSE_LINK")+'" class="close">'+MEB.utilities.i18n.contact_us.translate("markup","FATAL_ERROR_CLOSE_LINK")+"</a>");this._flightDetailsPopup.render(document.body);var A=$jq("#popup_details .bd");A[0].style.overflowX="hidden";if(A.height()>550){A.height(550);A[0].style.overflowY="scroll"}this._flightDetailsPopup.show();var D=this;$jq("#flight_details_close").click(function(){D._flightDetailsPopup.hide();A.height("auto");A[0].style.overflowY="visible"})}catch(B){}};MEB.popups.PopupManager.prototype._onEvent=function(A,D){try{var C=D[0];switch(C.eventName){case"onShowFlightDetails":this._showFlightDetails(C.data.link);break;default:break}}catch(B){}};MEB.popups.waiting=new MEB.popups.PopupManager();c.onLoad("init",MEB.popups.waiting);(function(){if(typeof YAHOO_config==="undefined"){YAHOO_config={}}var B={info:{base:"http://yui.yahooapis.com/2.3.1/build/",skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",rollup:3},moduleInfo:{animation:{type:"js",path:"animation/animation-min.js",requires:["dom","event"]},autocomplete:{type:"js",path:"autocomplete/autocomplete-min.js",requires:["dom","event"],optional:["connection","animation"],skinnable:true},button:{type:"js",path:"button/button-beta-min.js",requires:["element"],optional:["menu"],skinnable:true},calendar:{type:"js",path:"calendar/calendar-min.js",requires:["event","dom"],skinnable:true},colorpicker:{type:"js",path:"colorpicker/colorpicker-beta-min.js",requires:["slider","element"],optional:["animation"],skinnable:true},connection:{type:"js",path:"connection/connection-min.js",requires:["event"]},container:{type:"js",path:"container/container-min.js",requires:["dom","event"],optional:["dragdrop","animation"],supersedes:["containercore"],skinnable:true},containercore:{type:"js",path:"container/container_core-min.js",requires:["dom","event"]},datasource:{type:"js",path:"datasource/datasource-beta-min.js",requires:["event"],optional:["connection"]},datatable:{type:"js",path:"datatable/datatable-beta-min.js",requires:["element","datasource"],optional:["calendar","dragdrop"],skinnable:true},dom:{type:"js",path:"dom/dom-min.js",requires:["yahoo"]},dragdrop:{type:"js",path:"dragdrop/dragdrop-min.js",requires:["dom","event"]},editor:{type:"js",path:"editor/editor-beta-min.js",requires:["menu","element","button"],optional:["animation","dragdrop"],skinnable:true},element:{type:"js",path:"element/element-beta-min.js",requires:["dom","event"]},event:{type:"js",path:"event/event-min.js",requires:["yahoo"]},fonts:{type:"css",path:"fonts/fonts-min.css"},grids:{type:"css",path:"grids/grids-min.css",requires:["fonts"],optional:["reset"]},history:{type:"js",path:"history/history-beta-min.js",requires:["event"]},imageloader:{type:"js",path:"imageloader/imageloader-experimental-min.js",requires:["event","dom"]},logger:{type:"js",path:"logger/logger-min.js",requires:["event","dom"],optional:["dragdrop"],skinnable:true},menu:{type:"js",path:"menu/menu-min.js",requires:["containercore"],skinnable:true},reset:{type:"css",path:"reset/reset-min.css"},"reset-fonts-grids":{type:"css",path:"reset-fonts-grids/reset-fonts-grids.css",supersedes:["reset","fonts","grids"]},slider:{type:"js",path:"slider/slider-min.js",requires:["dragdrop"],optional:["animation"]},tabview:{type:"js",path:"tabview/tabview-min.js",requires:["element"],optional:["connection"],skinnable:true},treeview:{type:"js",path:"treeview/treeview-min.js",requires:["event"],skinnable:true},utilities:{type:"js",path:"utilities/utilities.js",supersedes:["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event"],rollup:6},yahoo:{type:"js",path:"yahoo/yahoo-min.js"},"yahoo-dom-event":{type:"js",path:"yahoo-dom-event/yahoo-dom-event.js",supersedes:["yahoo","event","dom"],rollup:3},yuiloader:{type:"js",path:"yuiloader/yuiloader-beta-min.js"},yuitest:{type:"js",path:"yuitest/yuitest-beta-min.js",requires:["logger"],skinnable:true}}},ObjectUtil:{appendArray:function(A,F){if(F){for(var E=0;E<F.length;E=E+1){A[F[E]]=true}}},clone:function(E){var A={};for(var F in E){A[F]=E[F]}return A},merge:function(){var A={},H=arguments,F,G;for(F=0;F<H.length;F=F+1){for(G in H[F]){A[G]=H[F][G]}}return A},keys:function(A,G){var H=[],F;for(F in A){H.push(F)}return H}},ArrayUtil:{appendArray:function(A,D){Array.prototype.push.apply(A,D)},indexOf:function(F,A){for(var E=0;E<F.length;E=E+1){if(F[E]===A){return E}}return -1},toObject:function(F){var A={};for(var E=0;E<F.length;E=E+1){A[F[E]]=true}return A},uniq:function(A){return B.ObjectUtil.keys(B.ArrayUtil.toObject(A))}},loaders:[],finishInit:function(A){A=A||YAHOO;A.env.YUIInfo=B.info;A.util.YUILoader=B.YUILoader},onModuleLoaded:function(G){var A=G.name,H;for(var F=0;F<B.loaders.length;F=F+1){B.loaders[F].loadNext(A)}},init:function(){var A=YAHOO_config,F=A.load,G=(typeof YAHOO!=="undefined"&&YAHOO.env);if(G){YAHOO.env.listeners.push(B.onModuleLoaded)}else{if(A.listener){B.cachedCallback=A.listener}A.listener=function(C){B.onModuleLoaded(C);if(B.cachedCallback){B.cachedCallback(C)}}}if(F||!G){F=F||{};var H=new B.YUILoader(F);H.onLoadComplete=function(){B.finishInit();if(F.onLoadComplete){H._pushEvents();F.onLoadComplete(H)}};if(!G){H.require("yahoo")}H.insert(null,F)}else{B.finishInit()}}};B.YUILoader=function(A){YAHOO_config.injecting=true;A=A||{};this._internalCallback=null;this.onLoadComplete=null;this.base=("base" in A)?A.base:B.info.base;this.allowRollup=("allowRollup" in A)?A.allowRollup:true;this.filter=A.filter;this.sandbox=A.sandbox;this.required={};this.moduleInfo=A.moduleInfo||B.info.moduleInfo;this.rollups=null;this.loadOptional=A.loadOptional||false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};this.skin=A.skin||B.ObjectUtil.clone(B.info.skin);if(A.require){this.require(A.require)}B.loaders.push(this)};B.YUILoader.prototype={FILTERS:{RAW:{searchExp:"-min\\.js",replaceStr:".js"},DEBUG:{searchExp:"-min\\.js",replaceStr:"-debug.js"}},SKIN_PREFIX:"skin-",addModule:function(A){if(!A||!A.name||!A.type||(!A.path&&!A.fullpath)){return false}this.moduleInfo[A.name]=A;this.dirty=true;return true},require:function(A){var H=(typeof A==="string")?arguments:A;this.dirty=true;for(var G=0;G<H.length;G=G+1){this.required[H[G]]=true;var F=this.parseSkin(H[G]);if(F){this._addSkin(F.skin,F.module)}}B.ObjectUtil.appendArray(this.required,H)},_addSkin:function(A,E){var F=this.formatSkin(A);if(!this.moduleInfo[F]){this.addModule({name:F,type:"css",path:this.skin.base+A+"/"+this.skin.path,rollup:this.skin.rollup})}if(E){F=this.formatSkin(A,E);if(!this.moduleInfo[F]){this.addModule({name:F,type:"css",path:E+"/"+this.skin.base+A+"/"+E+".css"})}}},getRequires:function(M){if(!this.dirty&&M.expanded){return M.expanded}M.requires=M.requires||[];var N,A=[],K=M.requires,I=M.optional,L=M.supersedes,J=this.moduleInfo;for(N=0;N<K.length;N=N+1){A.push(K[N]);B.ArrayUtil.appendArray(A,this.getRequires(J[K[N]]))}if(I&&this.loadOptional){for(N=0;N<I.length;N=N+1){A.push(I[N]);B.ArrayUtil.appendArray(A,this.getRequires(J[I[N]]))}}M.expanded=B.ArrayUtil.uniq(A);return M.expanded},getProvides:function(H){var G=this.moduleInfo[H];var A={};A[H]=true;var F=G&&G.supersedes;B.ObjectUtil.appendArray(A,F);return A},calculate:function(A){if(this.dirty){this._setup(A);this._explode();this._skin();if(this.allowRollup){this._rollup()}this._reduce();this._sort();this.dirty=false}},_setup:function(A){A=A||{};this.loaded=B.ObjectUtil.clone(this.inserted);if(!this.sandbox&&typeof YAHOO!=="undefined"&&YAHOO.env){this.loaded=B.ObjectUtil.merge(this.loaded,YAHOO.env.modules)}if(A.ignore){B.ObjectUtil.appendArray(this.loaded,A.ignore)}if(A.force){for(var D=0;D<A.force.length;D=D+1){if(A.force[D] in this.loaded){delete this.loaded[A.force[D]]}}}},_explode:function(){var A=this.required,G,H;for(G in A){H=this.moduleInfo[G];if(H){var F=this.getRequires(H);if(F){B.ObjectUtil.appendArray(A,F)}}}},_skin:function(){var G=this.required,H,I;for(H in G){I=this.moduleInfo[H];if(I&&I.skinnable){var A=this.skin.overrides,J;if(A&&A[H]){for(J=0;J<A[H].length;J=J+1){this.require(this.formatSkin(A[H][J],H))}}else{this.require(this.formatSkin(this.skin.defaultSkin,H))}}}},formatSkin:function(A,F){var E=this.SKIN_PREFIX+A;if(F){E=E+"-"+F}return E},parseSkin:function(A){if(A.indexOf(this.SKIN_PREFIX)===0){var D=A.split("-");return{skin:D[1],module:D[2]}}return null},_rollup:function(){var R,S,T,N,P={},M=this.required,A;if(this.dirty||!this.rollups){for(R in this.moduleInfo){T=this.moduleInfo[R];if(T&&T.rollup){P[R]=T}}this.rollups=P}for(;;){var L=false;for(R in P){if(!M[R]&&!this.loaded[R]){T=this.moduleInfo[R];N=T.supersedes;A=true;if(!T.rollup){continue}var O=this.parseSkin(R),Q=0;if(O){for(S in M){if(R!==S&&this.parseSkin(S)){Q++;A=(Q>=T.rollup);if(A){break}}}}else{for(S=0;S<N.length;S=S+1){if(this.loaded[N[S]]){A=false;break}else{if(M[N[S]]){Q++;A=(Q>=T.rollup);if(A){break}}}}}if(A){M[R]=true;L=true;this.getRequires(T)}}}if(!L){break}}},_reduce:function(){var L,M,J,N,I=this.required;for(L in I){if(L in this.loaded){delete I[L]}else{var K=this.parseSkin(L);if(K){if(!K.module){var A=this.SKIN_PREFIX+K.skin;for(M in I){if(M!==L&&M.indexOf(A)>-1){delete I[M]}}}}else{N=this.moduleInfo[L];J=N&&N.supersedes;if(J){for(M=0;M<J.length;M=M+1){if(J[M] in I){delete I[J[M]]}}}}}}},_sort:function(){var Q=[],N=this.moduleInfo,U=this.loaded;var P=function(E,C){if(U[C]){return false}var F,D=N[E],H=D&&D.expanded;if(H&&B.ArrayUtil.indexOf(H,C)>-1){return true}var G=N[C]&&N[C].supersedes;if(G){for(F=0;F<G.length;F=F+1){if(P(E,G[F])){return true}}}return false};for(var V in this.required){Q.push(V)}var O=0;for(;;){var A=Q.length,R,S,W,X,T=false;for(W=O;W<A;W=W+1){R=Q[W];for(X=W+1;X<A;X=X+1){if(P(R,Q[X])){S=Q.splice(X,1);Q.splice(W,0,S[0]);T=true;break}}if(T){break}else{O=O+1}}if(!T){break}}this.sorted=Q},insert:function(A,G,I){if(!I){var J=this;this._internalCallback=function(){J._internalCallback=null;J.insert(A,G,"js")};this.insert(null,G,"css");return }G=G||{};this.onLoadComplete=A||this.onLoadComplete;var H=G&&G.filter||null;if(typeof H==="string"){H=H.toUpperCase();if(H==="DEBUG"){this.require("logger")}}this.filter=this.FILTERS[H]||H||this.FILTERS[this.filter]||this.filter;this.insertOptions=G;this.calculate(G);this.loading=true;this.loadType=I;this.loadNext()},loadNext:function(O){if(O){this.inserted[O]=true}if(!this.loading){return }if(O&&O!==this.loading){return }var M=this.sorted,P=M.length,R,A,L;for(R=0;R<P;R=R+1){if(M[R] in this.inserted){continue}if(M[R]===this.loading){return }A=this.moduleInfo[M[R]];if(!this.loadType||this.loadType===A.type){this.loading=M[R];if(A.type==="css"){L=A.fullpath||this._url(A.path);this.insertCss(L);this.inserted[M[R]]=true}else{L=A.fullpath||this._url(A.path);this.insertScript(L);if(A.verifier){var N=this,K=M[R];A.verifier(K,function(){N.loadNext(K)})}return }}}this.loading=null;if(this._internalCallback){var Q=this._internalCallback;this._internalCallback=null;Q(this)}else{if(this.onLoadComplete){this._pushEvents();this.onLoadComplete(this)}}},_pushEvents:function(){if(typeof YAHOO!=="undefined"&&YAHOO.util&&YAHOO.util.Event){YAHOO.util.Event._load()}},_url:function(A){var F=this.base||"",E=this.filter;F=F+A;if(E){F=F.replace(new RegExp(E.searchExp),E.replaceStr)}return F},insertScript:function(K,I){var L=I||window,H=L.document,A=H.createElement("script"),J=H.getElementsByTagName("head")[0];A.src=K;A.type="text/javascript";J.appendChild(A)},insertCss:function(K,I){var L=I||window,H=L.document,A=H.createElement("link"),J=H.getElementsByTagName("head")[0];A.href=K;A.type="text/css";A.rel="stylesheet";J.appendChild(A)},sandbox:function(A){}};B.init()})();c.require("aria");a.namespace("MEB.behaviors");a.namespace("MEB.objects");MEB.behaviors.Banners=function(){this._section="banners";this._slideShow=null};MEB.behaviors.Banners.prototype.init=function(){try{this._slideShow=new SlideShow();this._slideShow.init({id:"banners_slider",contentsource:["inline",""],toc:"#increment",nextprev:['<img src="'+MEB.resources.base+'/apps/meb/img/homepage/slideshow/previous.gif" />','<img src="'+MEB.resources.base+'/apps/meb/img/homepage/slideshow/next.gif" />'],enablefade:[true,0.1],autorotate:[true,10000],onChange:function(C,B){}});$jq("."+this._section+" button").click(function(){window.location.href=this.getAttribute("link")})}catch(A){}};MEB.objects.banners=new MEB.behaviors.Banners();c.onLoad("init",MEB.objects.banners);c.require("aria");a.namespace("MEB.behaviors.global");a.namespace("MEB.objects.global");MEB.behaviors.global.Header=function(){this._section="gl_header"};MEB.behaviors.global.Header.prototype.init=function(){try{jQuery("#"+this._section+"_menu li").each(function(){jQuery(this).hover(function(){jQuery(this).addClass("menuhover")},function(){jQuery(this).removeClass("menuhover")})});jQuery("#secondary-menu a").hover(function(){jQuery(this).fadeTo("fast",1);jQuery(this).addClass("sec-menu-hover");jQuery(this).next("em").animate({opacity:"show"},"slow");jQuery(this).next("em").text(jQuery(this).attr("title"))},function(){jQuery(this).fadeTo("fast",0.5);jQuery(this).removeClass("sec-menu-hover");jQuery(this).next("em").animate({opacity:"hide"},"fast")});this._addFocusBehaviorToParentElement("menuhover","#top-menu .primary-menu li.primary-menu-item a");this._addFocusBehaviorToSubMenu("menuhover");$jq("#top-menu .secondary-menu a").attachFocusBehavior("with-focus")}catch(A){}};MEB.behaviors.global.Header.prototype._addFocusBehaviorToParentElement=function(C,B){try{$jq(B).each(function(){$jq(this).focus(function(){$jq(this).parent().addClass(C)}).blur(function(){$jq(this).parent().removeClass(C)})})}catch(A){}};MEB.behaviors.global.Header.prototype._addFocusBehaviorToSubMenu=function(B){try{var C="#top-menu .primary-menu li.primary-menu-item ul li a";$jq(C).each(function(){$jq(this).focus(function(){$jq(this).parent().addClass(B);$jq(this).parent().parent().parent().addClass(B)}).blur(function(){$jq(this).parent().removeClass(B);$jq(this).parent().parent().parent().removeClass(B)})})}catch(A){}};MEB.objects.global.header=new MEB.behaviors.global.Header();c.onLoad("init",MEB.objects.global.header);c.require("aria");a.namespace("MEB.behaviors.global");a.namespace("MEB.objects.global");MEB.behaviors.global.Footer=function(){this._section="gl_footer"};MEB.behaviors.global.Footer.prototype.init=function(){try{var B=this;jQuery(".language-selection li").click(function(C){C.preventDefault();C.stopPropagation();var D=this.getAttribute("value");YAHOO.util.Cookie.remove(MEB.cookies.LANGUAGE);YAHOO.util.Cookie.set(MEB.cookies.LANGUAGE,D,MEB.cookies.options);window.location.href=jQuery("#"+B._section+"_baseUrl")[0].value.replace("@language@",D)})}catch(A){}};MEB.objects.global.footer=new MEB.behaviors.global.Footer();c.onLoad("init",MEB.objects.global.footer);c.require("aria");c.require("uic.Errors");c.require("uic.Check");c.require("yui.container");c.require("yui.animation");a.namespace("MEB.behaviors.contact_us");a.namespace("MEB.objects.contact_us");MEB.behaviors.contact_us.ContactUs=function(){this._section="cous";this._contactUsPopup=null;this._mailActionUri=null;this._default_error_message=null};MEB.behaviors.contact_us.ContactUs.prototype.init=function(){try{this._contactUsPopup=new YAHOO.widget.Panel("contactus",{width:"700px",fixedcenter:true,close:false,draggable:false,modal:true,zindex:999,visible:false,underlay:"none"});this._contactUsPopup.render(document.body);this._addValidatorsToForm();this._presetTopic();var A=$jq(".contact_us_link");var C=0;for(C=0;C<=A.length;C++){YAHOO.util.Event.addListener(A[C],"click",this.popupContactUsForm,this)}YAHOO.util.Event.addListener(this._section+"_close_link","click",this._closeContactUsForm,this);YAHOO.util.Event.addListener(this._section+"_submit","click",this._sendMail,this);this._default_error_message=MEB.utilities.i18n.contact_us.translate("error","DEFAULT_MESSAGE");$jq(".form-common-button").hoverClass("form-common-button-hover");$jq(".mail-button").hoverClass("mail-button-hover");$("MAIL_BODY",this).setContextErrorText(MEB.utilities.i18n.contact_us.translate("error","MAIL_BODY_ERROR"))}catch(B){}};MEB.behaviors.contact_us.ContactUs.prototype._presetTopic=function(){try{if(c.isInDom("contact_us_topic")){var B=$("contact_us_topic").value;var A=$("MAIL_SUBJECT",this);switch(B){case"about_us":A.setIndex(1);break;case"advertise":A.setIndex(2);break;case"help_faq":A.setIndex(3);break;case"privacy":A.setIndex(4);break;case"legal_notice":A.setIndex(5);break;default:break}}}catch(C){}};MEB.behaviors.contact_us.ContactUs.prototype._addValidatorsToForm=function(){try{$("MAIL_SUBJECT",this).addValidator("METHOD","error",this._checkSelectTopic.createDelegate(this,[$("MAIL_SUBJECT",this)]))}catch(A){}};MEB.behaviors.contact_us.ContactUs.prototype._updateErrorMessageAndDisplay=function(B){try{$(this._section+"_error_message_panel").style.display="block"}catch(A){}};MEB.behaviors.contact_us.ContactUs.prototype._displayErrorMessage=function(){try{if(arguments.length>=1){if(2==arguments.length){var B=arguments[1];if("3001"==B){window.location="http://"+window.document.location.host+$("homepage_url_redirect",this).value}}$jq("#"+this._section+"_error_message_panel p")[0].innerHTML=arguments[0]}else{$jq("#"+this._section+"_error_message_panel p")[0].innerHTML=this._default_error_message}$(this._section+"_error_message_panel").style.display="block"}catch(A){}};MEB.behaviors.contact_us.ContactUs.prototype._displayContactForm=function(){$(this._section+"_form_content").style.display="block";$jq("#contactus")[0].style.display="block"};MEB.behaviors.contact_us.ContactUs.prototype._displayThrobber=function(){$(this._section+"_throbber").style.visibility="visible"};MEB.behaviors.contact_us.ContactUs.prototype._hideThrobber=function(){$(this._section+"_throbber").style.visibility="hidden"};MEB.behaviors.contact_us.ContactUs.prototype._displayConfirmation=function(){$(this._section+"_confirmation_content").style.display="block";$(this._section+"_form_content").style.display="none";$(this._section+"_error_message_panel").style.display="none";YAHOO.util.Event.addListener(this._section+"_confirmation_close_link","click",this._closeContactUsForm,this)};MEB.behaviors.contact_us.ContactUs.prototype._checkSelectTopic=function(C){try{var A=C.getValue();if(A=="default_topic"){return false}return true}catch(B){}};MEB.behaviors.contact_us.ContactUs.prototype._closeContactUsForm=function(A,C){try{if(null!=A){YAHOO.util.Event.stopEvent(A)}C._resetContactUsForm();$jq("#contactus")[0].style.display="none";C._hideThrobber();C._contactUsPopup.hide()}catch(B){}};MEB.behaviors.contact_us.ContactUs.prototype._resetContactUsForm=function(){try{$(this._section+"_confirmation_content").style.display="none";$(this._section+"_error_message_panel").style.display="none";$jq($("MAIL_NAME",this).getInput()).removeClass("error");$jq($("MAIL_FROM",this).getInput()).removeClass("error");$jq($("MAIL_SUBJECT",this).getInput()).removeClass("error");$jq($("MAIL_BODY",this).getInput()).removeClass("error");$("MAIL_NAME",this).getInput().value="";$("MAIL_FROM",this).getInput().value="";$("MAIL_SUBJECT",this).setValue("default_topic");$("MAIL_BODY",this).getInput().value="";this._displayContactForm()}catch(A){}};MEB.behaviors.contact_us.ContactUs.prototype._sendMail=function(evt,obj){try{YAHOO.util.Event.stopEvent(evt);obj._displayThrobber();if(MEB.errors.manager.formIsOk(obj._section+"_contact_us_form")){var mailActionUri=$(obj._section+"_contact_us_form",obj).action;var postParams="MAIL_FROM_PAGE="+$("MAIL_FROM_PAGE",obj).value+"&";postParams+="MAIL_CC="+$("MAIL_CC",obj).value+"&";postParams+="MAIL_NAME="+$("MAIL_NAME",obj).getInput().value+"&";postParams+="MAIL_FROM="+$("MAIL_FROM",obj).getInput().value+"&";postParams+="MAIL_SUBJECT="+$("MAIL_SUBJECT",obj).getInput().value+"&";postParams+="MAIL_BODY="+$("MAIL_BODY",obj).getInput().value;var callback={scope:obj,success:function(o){if(o.responseText!=""){var json_response=eval("("+o.responseText+")");if("success"==json_response.GENERAL.status){this._displayConfirmation()}else{if("generr"==json_response.GENERAL.status){var firstError=json_response.ERRORS[0];if(null!=firstError.text){this._displayErrorMessage(firstError.text,firstError.number)}}}}else{this._displayErrorMessage()}},failure:function(o){this._displayErrorMessage()}};var transaction=YAHOO.util.Connect.asyncRequest("POST",mailActionUri,callback,postParams)}else{obj._displayErrorMessage()}setTimeout(function(){obj._hideThrobber()},"1000")}catch(exception){}};MEB.behaviors.contact_us.ContactUs.prototype.popupContactUsForm=function(A,C){try{if(null!=A){YAHOO.util.Event.stopEvent(A)}C._displayContactForm();C._contactUsPopup.show()}catch(B){}};MEB.objects.contact_us.contactUsForm=new MEB.behaviors.contact_us.ContactUs();c.onLoad("init",MEB.objects.contact_us.contactUsForm,MEB.objects.contact_us.contactUsForm._section);c.require("aria");a.namespace("MEB.behaviors.poll");a.namespace("MEB.objects.poll");MEB.behaviors.poll.Poll=function(){this._section="poll"};MEB.behaviors.poll.Poll.prototype.init=function(){try{$jq(".pds-votebutton").hoverClass("pds-votebutton-hover")}catch(A){}};MEB.objects.poll.pollInstance=new MEB.behaviors.poll.Poll();c.onLoad("init",MEB.objects.poll.pollInstance);c.require("aria");c.require("uic.Errors");c.require("uic.Check");c.require("yui.container");c.require("util.simpleDateFormat");a.namespace("MEB.behaviors.air.search");a.namespace("MEB.objects.air.search");MEB.behaviors.air.search.SearchForm=function(){this._section="aise_form";this._tripType="R";this._tripTypeHasChanged=false;this._isShowingPrefAir=false;this._mapIcon="<div class='pushpin {className}'><div>{text}</div></div>";this._maxDest=6;this._visibleDest=2;this._locations={};this._redrawIndex=0;this.isDrawComplete=true;this._isTimetableSearch=false};MEB.behaviors.air.search.SearchForm.prototype.init=function(){try{MEB.eventBus.subscribe(this._onEvent.createDelegate(this));var obj=eval("("+YAHOO.util.Cookie.get(MEB.cookies.LAST_AIR_DEPARTURE_CITY)+")");if(typeof obj!="undefined"&&obj!=null){if(("undefined"==typeof (obj.lang))||(("undefined"!=typeof (obj.lang))&&(obj.lang==MEB.meta.current_language))){if($("from",this).getValue()==""){$("from",this).setValue(obj.value);$("from",this).setCode(obj.code)}if($("from_0",this).getValue()==""){$("from_0",this).setValue(obj.value);$("from_0",this).setCode(obj.code)}}}if(c.isInDom("isTimetableSearch")){this._isTimetableSearch=true}YAHOO.util.Event.addListener($(this._section+"_radio_round",this),"click",this._onChooseTripType,this);YAHOO.util.Event.addListener($(this._section+"_radio_oneway",this),"click",this._onChooseTripType,this);if(!this._isTimetableSearch){YAHOO.util.Event.addListener($(this._section+"_radio_multi",this),"click",this._onChooseTripType,this)}this._addValidator();jQuery("#"+this._section+"_search").hoverClass("flight-search-button-hover");if(!this._tripTypeHasChanged){this._chooseTripType($(this._section+"_trip_type",this).value)}YAHOO.util.Event.addListener($(this._section+"_search",this),"click",this._onSubmit,this);if($("to",this).getValue()==""){$("date_to",this).setDate(new Date($("date_from",this).getDate().getTime()+7*24*60*60*1000))}var datePicker=$("date_from_1",this);if(datePicker.getValue()==""){var oneWeekLater=new Date($("date_from_0",this).getDate().getTime()+7*24*60*60*1000);datePicker.setDate(oneWeekLater)}if($jq("#aise_form_trip_type")[0].value!="R"){$("date_to",this).setDate(new Date($("date_from",this).getDate().getTime()+7*24*60*60*1000))}$("date_to",this).bind($("date_from",this),7);if(!this._isTimetableSearch){for(var i=1;i<6;i++){$("date_from_"+i,this).bind($("date_from_"+(i-1),this),7)}}$("from",this).addACEvent("itemSelectEvent",this._onChooseLocation,this,true);$("to",this).addACEvent("itemSelectEvent",this._onChooseLocation,this,true);if(!this._isTimetableSearch){for(var i=0;i<6;i++){YAHOO.util.Event.addListener($(this._section+"_remDest_"+i,this),"click",this._onRemoveDestination,this);$("from_"+i,this).addACEvent("itemSelectEvent",this._onChooseLocation,this,true);$("to_"+i,this).addACEvent("itemSelectEvent",this._onChooseLocation,this,true)}YAHOO.util.Event.addListener($(this._section+"_complex_options_link",this),"click",this._onAddDestination,this);$jq("#"+this._section+"_basic_options_link").toggle(function(){this._isShowingPrefAir=true;$jq("#form_supp_options").show();this._toggleText($(this._section+"_basic_options_link",this))}.createDelegate(this),function(){this._isShowingPrefAir=false;$jq("#form_supp_options").hide();this._toggleText($(this._section+"_basic_options_link",this))}.createDelegate(this));for(var i=1;i<4&&!this._isShowingPrefAir;i++){if($("prefAirline_"+i,this).getValue()!=""){$jq("#"+this._section+"_basic_options_link").click()}}var add_EM_tag=function(dom_position){var e=$jq(dom_position)[0];var parts=e.innerHTML.split("(");e.innerHTML=parts[0]+"<em>("+parts[1]+"</em>"};add_EM_tag(".child_traveller label");add_EM_tag(".adult_traveller label");add_EM_tag(".baby_traveller label")}if(this._isTimetableSearch){var keyManager=new MEB.keys.Manager(MEB.keys.codes.ENTER,$jq(".search-form input[type=text]"),this._submitTimetableForm.createDelegate(this))}else{var keyManager=new MEB.keys.Manager(MEB.keys.codes.ENTER,$jq(".search-form input[type=text]"),this._submitForm.createDelegate(this))}}catch(exception){}};MEB.behaviors.air.search.SearchForm.prototype._addValidator=function(){try{$("from",this).addValidator("METHOD","error",this._checkDestination.createDelegate(this,["from"]));$("to",this).addValidator("METHOD","error",this._checkDestination.createDelegate(this,["to"]));$("from_0",this).addValidator("METHOD","error",this._checkDestination.createDelegate(this,["from_0"]));$("to_0",this).addValidator("METHOD","error",this._checkDestination.createDelegate(this,["to_0"]));$("date_to",this).getTextField().addValidator("METHOD","error",this._checkDate.createDelegate(this,["date_to"]));for(var A=1;A<6;A++){$("date_from_"+A,this).getTextField().addValidator("METHOD","error",this._checkDate.createDelegate(this,["date_from_"+A]))}if(!this._isTimetableSearch){$("baby_traveller",this).addValidator("METHOD","error",this._checkBabies.createDelegate(this))}}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._checkBabies=function(){try{return MEB.errors.manager.checkSelect($("baby_traveller",this),$("adult_traveller",this).getValue())<1}catch(A){}};MEB.behaviors.air.search.SearchForm.prototype._checkDate=function(F){try{var D=F.split("_");if((this._tripType=="O")||(this._tripType=="R"&&D.length>2)||(this._tripType=="M"&&D.length==2)){return true}var A=0;if(this._tripType=="M"){var A=parseInt(D[D.length-1])+1;if(A>this._visibleDest){return true}}var C=$(F,this);var E=null;if(this._tripType=="R"){E=$(F.replace("to","from"),this)}else{D[D.length-1]=parseInt(D[D.length-1])-1;E=$(D.join("_"),this)}return(MEB.errors.manager.checkDate(C))&&(MEB.errors.manager.checkDate(C,E.getDate().getTime())>-1)}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._checkDestination=function(C){try{var B=C.split("_");if(B.length>1&&(this._tripType=="R"||this._tripType=="O")){return true}else{if(B.length==1&&this._tripType=="M"){return true}}return MEB.errors.manager.checkTextField($(C,this))}catch(A){}};MEB.behaviors.air.search.SearchForm.prototype._chooseLocation=function(H,B,C){try{C=typeof C!="undefined"?false:true;this._locations[H]=B.length>0?B:null;var A=null;var F={bLoc:"",eLoc:""};if(this._tripType!="M"){F.bLoc=this._mapIcon.replace("{className}","pin1").replace("{text}","A");F.eLoc=this._mapIcon.replace("{className}","pin2").replace("{text}","B")}else{var G=H.split("_");var D=parseInt(G[G.length-1])+1;F.bLoc=this._mapIcon.replace("{className}","pin"+D).replace("{text}",D+"A");F.eLoc=this._mapIcon.replace("{className}","pin"+D).replace("{text}",D+"B")}if(H.indexOf("from")>-1){if(typeof this._locations[H.replace("from","to")]!="undefined"&&this._locations[H.replace("from","to")]!=null){A={bLoc:{id:H,location:this._locations[H],icon:F.bLoc},eLoc:{id:H.replace("from","to"),location:this._locations[H.replace("from","to")],icon:F.eLoc},adjustView:C}}}if(H.indexOf("to")>-1){if(this._locations[H.replace("to","from")]!="undefined"&&this._locations[H.replace("from","to")]!=null){A={bLoc:{id:H.replace("to","from"),location:this._locations[H.replace("to","from")],icon:F.bLoc},eLoc:{id:H,location:this._locations[H],icon:F.eLoc},adjustView:C}}}if(A){MEB.eventBus.fire({eventName:"onChooseCityPair",data:A})}}catch(E){}};MEB.behaviors.air.search.SearchForm.prototype._chooseTripType=function(D){try{if(this._tripTypeHasChanged){jQuery("#"+MEB.errors.container).hide()}if(D==this._tripType){return }var C=this._tripType;this._tripType=D;$jq("#"+this._section+"_trip_type_"+C).removeClass("selected");$jq("#"+this._section+"_trip_type_"+this._tripType).addClass("selected");switch(this._tripType){case"R":if(C=="M"){$jq("#"+this._section+"_basicBlock").show();$jq("#"+this._section+"_basic_options_link").show();$jq("#"+this._section+"_complexBlock").hide();$jq("#"+this._section+"_complex_options").hide();var A={name:$("from_0",this).getValue(),code:$("from_0",this).getCode()};var E={name:$("to_0",this).getValue(),code:$("to_0",this).getCode()};this._reset();MEB.eventBus.fire({eventName:"onChangeTripType"});$("from",this).setValue(A.name);$("from",this).setCode(A.code);$("to",this).setValue(E.name);$("to",this).setCode(E.code);$("date_from",this).setDate($("date_from_0",this).getDate());this._chooseLocation(this._section+"_from",A.name);this._chooseLocation(this._section+"_to",E.name)}$jq("#"+this._section+"_return_date").show();break;case"O":if(C=="M"){$jq("#"+this._section+"_basicBlock").show();$jq("#"+this._section+"_basic_options_link").show();$jq("#"+this._section+"_complexBlock").hide();$jq("#"+this._section+"_complex_options").hide();var A={name:$("from_0",this).getValue(),code:$("from_0",this).getCode()};var E={name:$("to_0",this).getValue(),code:$("to_0",this).getCode()};this._reset();MEB.eventBus.fire({eventName:"onChangeTripType"});$("from",this).setValue(A.name);$("from",this).setCode(A.code);$("to",this).setValue(E.name);$("to",this).setCode(E.code);$("date_from",this).setDate($("date_from_0",this).getDate());this._chooseLocation(this._section+"_from",A.name);this._chooseLocation(this._section+"_to",E.name)}$jq("#"+this._section+"_return_date").hide();break;case"M":$jq("#"+this._section+"_basicBlock").hide();$jq("#"+this._section+"_basic_options_link").hide();$jq("#"+this._section+"_complexBlock").show();$jq("#"+this._section+"_complex_options").show();if(this._isShowingPrefAir){$jq("#"+this._section+"_basic_options_link").click()}var A={name:$("from",this).getValue(),code:$("from",this).getCode()};var E={name:$("to",this).getValue(),code:$("to",this).getCode()};this._reset();MEB.eventBus.fire({eventName:"onChangeTripType"});$("date_from_0",this).setDate($("date_from",this).getDate());$("from_0",this).setValue(A.name);$("from_0",this).setCode(A.code);$("to_0",this).setValue(E.name);$("to_0",this).setCode(E.code);this._copy(0);this._chooseLocation(this._section+"_from_0",A.name);this._chooseLocation(this._section+"_to_0",E.name);break}}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._copy=function(A){try{if($("from_"+(A+1),this._section).getValue()==""){var C=$("to_"+A,this._section).getValue();$("from_"+(A+1),this._section).setValue(C);$("from_"+(A+1),this._section).setCode($("to_"+A,this._section).getCode());C+=" "+$("to_"+A,this._section).getCountry();this._chooseLocation(this._section+"_from_"+(A+1),C)}}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._getDate=function(D){try{var A=$(D,this).getDate();var C;return{day:A.getDate(),day_2dig:(day_2dig=parseInt(A.getDate()))<10?"0"+day_2dig:day_2dig,month:(C=parseInt(A.getMonth()))<10?"0"+C:C,shift_month:(C=parseInt(A.getMonth()+1))<10?"0"+C:C,year:A.getFullYear()}}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._onAddDestination=function(A,E){try{if(E._visibleDest<E._maxDest){$(E._section+"_remDest_"+(E._visibleDest-1),E).innerHTML=$(E._section+"_remDest_"+E._visibleDest,E).innerHTML;$jq("#"+E._section+"_dest_"+E._visibleDest).show();var C=$("date_from_"+E._visibleDest,E);if(C.getValue()==""){var D=new Date($("date_from_"+(E._visibleDest-1),E).getDate().getTime()+7*24*60*60*1000);C.setDate(D)}E._visibleDest++}if(E._visibleDest>1){$jq("#"+E._section+"_remDest_0").show()}if(E._visibleDest>5){$jq("#"+E._section+"_complex_options_link").addClass("link-button-inactive");$jq("#"+E._section+"_complex_options_link").removeClass("link-button-plain")}}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._onChooseLocation=function(B,F){try{var G=F[0]._oTextbox.id.replace("_id_input","");var E=F[2][1];var A=E._cityName+", "+E._countryName;this._chooseLocation(G,A);if(this._tripType=="M"&&G.indexOf("to")>0){var D=G.split("_");this._copy(parseInt(D[D.length-1]))}}catch(C){}};MEB.behaviors.air.search.SearchForm.prototype._onChooseTripType=function(A,C){try{C._tripTypeHasChanged=true;C._chooseTripType(this.value)}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._onEvent=function(A,D){try{var C=D[0];switch(C.eventName){case"onPlotCityPair":if(!this.isDrawComplete){this._redraw()}break;case"onMapLoaded":this._updateLocations();break;case"onGALoaded":this._trackReferrer();break;default:break}}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._trackReferrer=function(){try{var C=function(G){G=G.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var D="[\\?&]"+G+"=([^&#]*)";var F=new RegExp(D);var E=F.exec(window.location.href);if(E==null){return""}else{return E[1]}};var A=C("REDIRECTING_FROM");if(A=="flight"||A=="hotel"||A=="car"){if(typeof MEB.ga.tracker!="undefined"&&MEB.ga.tracker!=null){MEB.log("[INFO]: Tracking parameter REDIRECTING_FROM: "+A,"info");MEB.ga.tracker._trackPageview("/banners/"+A)}else{MEB.log("[ERROR]: No google analytics tracker set !","error")}}}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._onRemoveDestination=function(A,G){try{if(G._visibleDest>5){$jq("#"+G._section+"_complex_options_link").removeClass("link-button-inactive");$jq("#"+G._section+"_complex_options_link").addClass("link-button-plain")}if(G._visibleDest>1){var E=this.id.split("_");var D=parseInt(E[E.length-1]);var F="";for(var C=D+1;C<G._maxDest;C++){$("from_"+(C-1),G).setValue((F=$("from_"+C,G).getValue())?F:"");$("to_"+(C-1),G).setValue((F=$("to_"+C,G).getValue())?F:"");$("date_from_"+(C-1),G).setValue($("date_from_"+C,G).getValue());$("time_from_"+(C-1),G).setValue($("time_from_"+C,G).getValue());G._locations[G._section+"_from_"+(C-1)]=$("from_"+C,G).getValue();G._locations[G._section+"_to_"+(C-1)]=$("to_"+C,G).getValue();G._raz(C)}MEB.eventBus.fire({eventName:"onRemoveDestination"});G.isDrawComplete=false;G._redraw();G._visibleDest--;$jq("#"+G._section+"_dest_"+G._visibleDest).hide();if(G._visibleDest==1){$(G._section+"_remDest_"+(G._visibleDest-1),G).innerHTML="";$jq("#"+G._section+"_remDest_"+(G._visibleDest-1)).hide()}}}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._onSubmit=function(A,C){try{YAHOO.util.Event.stopEvent(A);YAHOO.util.Event.stopPropagation(A);if(C._isTimetableSearch){C._submitTimetableForm()}else{C._submitForm()}}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._raz=function(A){try{A=(typeof A!="undefined")?"_"+A:"";$("from"+A,this).reset();$("to"+A,this).reset();this._locations[this._section+"_from"+A]=null;this._locations[this._section+"_to"+A]=null}catch(B){}};MEB.behaviors.air.search.SearchForm.prototype._reset=function(){try{this._raz();for(var B=0;B<6;B++){if(B>1){$jq("#dest_"+B).hide()}this._raz(B)}}catch(A){}};MEB.behaviors.air.search.SearchForm.prototype._redraw=function(){try{if(this._tripType=="M"){this._redrawIndex++;if(this._redrawIndex<=this._visibleDest){var D=this._locations[this._section+"_from_"+(this._redrawIndex-1)];var C=this._locations[this._section+"_to_"+(this._redrawIndex-1)];var B=(typeof D!="undefined"&&D!=null)&&(typeof C!="undefined"&&C!=null);if(B){this._chooseLocation(this._section+"_from_"+(this._redrawIndex-1),D,false)}else{this._redraw()}}else{this._redrawIndex=0;this.isDrawComplete=true}}else{var D=this._locations[this._section+"_from"];var C=this._locations[this._section+"_to"];var B=(typeof D!="undefined"&&D!=null)&&(typeof C!="undefined"&&C!=null);if(B){this._chooseLocation(this._section+"_from",D,false)}}}catch(A){}};MEB.behaviors.air.search.SearchForm.prototype._submitForm=function(){try{if(MEB.errors.manager.checkForm(this._section+"_user_input")){$("TRIP_TYPE",this).value=this._tripType;$("DIRECT_NON_STOP",this).value=$("check_nonstop",this).isCheck();$("FIELD_ADT_NUMBER",this).value=$("adult_traveller",this).getValue();$("FIELD_CHD_NUMBER",this).value=$("child_traveller",this).getValue();$("FIELD_INFANTS_NUMBER",this).value=$("baby_traveller",this).getValue();var C="";for(var H=1;H<4;H++){$("AIRLINE_"+H,this).value=(C=$("prefAirline_"+H,this).getCode())==""?$("prefAirline_"+H,this).getValue():C}var D="";if(this._tripType=="R"||this._tripType=="O"){$("B_LOCATION_1",this).value=(D=$("from",this).getCode())==""?$("from",this).getValue():D;$("E_LOCATION_1",this).value=(D=$("to",this).getCode())==""?$("to",this).getValue():D;var B=this._getDate("date_from");$("Month1",this).value=B.year+""+B.month;$("Day1",this).value=B.day;$("Hours1",this).value=$("time_from",this).getValue();if(this._tripType=="R"){var J=this._getDate("date_to");$("Month2",this).value=J.year+""+J.month;$("Day2",this).value=J.day;$("Hours2",this).value=$("time_to",this).getValue()}}else{var A,F;for(var H=0;H<6;H++){A=$("from_"+H,this).getCode()==""?$("from_"+H,this).getValue():$("from_"+H,this).getCode();F=$("to_"+H,this).getCode()==""?$("to_"+H,this).getValue():$("to_"+H,this).getCode();if(A!=""&&F!=""){$("B_LOCATION_"+(H+1)+"_Cpx",this).value=A;$("E_LOCATION_"+(H+1)+"_Cpx",this).value=F}else{$("B_LOCATION_"+(H+1)+"_Cpx",this).value="";$("E_LOCATION_"+(H+1)+"_Cpx",this).value=""}var B=this._getDate("date_from_"+H);$("Month"+(H+1)+"Cpx",this).value=B.year+""+B.month;$("Day"+(H+1)+"Cpx",this).value=B.day;$("Hours"+(H+1)+"Cpx",this).value=$("time_from_"+H,this).getValue()}}var I;if(this._tripType=="R"||this._tripType=="O"){I=$("from",this)}else{I=$("from_0",this)}var G='{code : "'+I.getCode()+'",value : "'+I.getValue()+'",lang : "'+MEB.meta.current_language+'"}';YAHOO.util.Cookie.set(MEB.cookies.LAST_AIR_DEPARTURE_CITY,G,MEB.cookies.options);MEB.popups.waiting.displayAirPopupAndSubmit(this._section+"_ADVS")}}catch(E){}};MEB.behaviors.air.search.SearchForm.prototype._submitTimetableForm=function(){try{if(MEB.errors.manager.checkForm(this._section+"_user_input")){$("TRIP_TYPE",this).value=this._tripType;var B="";$("B_LOCATION",this).value=(B=$("from",this).getCode())==""?$("from",this).getValue():B;$("E_LOCATION",this).value=(B=$("to",this).getCode())==""?$("to",this).getValue():B;var D=this._getDate("date_from");$("Month1",this).value=D.year+""+D.month;$("B_Month",this).value=D.year+""+D.shift_month;$("Day1",this).value=D.day;$("B_Day",this).value=D.day;var E=$("time_from",this).getValue();if("ANY"==E){$("B_DATE",this).value=D.year+""+D.shift_month+""+D.day_2dig+"0000";$("B_Time",this).value="ANY";$("B_ANY_TIME",this).value="TRUE"}else{$("B_DATE",this).value=D.year+""+D.shift_month+""+D.day_2dig+""+E;$("B_Time",this).value=E;$("B_ANY_TIME",this).value="FALSE"}if(this._tripType=="R"){var A=this._getDate("date_to");$("Month2",this).value=A.year+""+A.month;$("E_Month",this).value=A.year+""+A.shift_month;$("Day2",this).value=A.day;$("E_Day",this).value=A.day;var E=$("time_to",this).getValue();if("ANY"==E){$("E_DATE",this).value=A.year+""+A.shift_month+""+A.day_2dig+"0000";$("E_Time",this).value="ANY";$("E_ANY_TIME",this).value="TRUE"}else{$("E_DATE",this).value=A.year+""+A.shift_month+""+A.day_2dig+""+E;$("E_Time",this).value=E;$("E_ANY_TIME",this).value="FALSE"}}var G=$("from",this);var F='{code : "'+G.getCode()+'",value : "'+G.getValue()+'",lang : "'+MEB.meta.current_language+'"}';YAHOO.util.Cookie.set(MEB.cookies.LAST_AIR_DEPARTURE_CITY,F,MEB.cookies.options);MEB.popups.waiting.displayAirPopupAndSubmit(this._section+"_TIMS")}}catch(C){}};MEB.behaviors.air.search.SearchForm.prototype._submitBestFareForm=function(){try{if($(this._section+"_BF",this)&&MEB.errors.manager.checkForm(this._section+"_user_input")){var D=this._section+"_BF";var B;$(D+"_from",this).value=(B=$("from",this).getCode())==""?$("from",this).getValue():B;$(D+"_to",this).value=(B=$("to",this).getCode())==""?$("to",this).getValue():B;$(D+"_time_from",this).value=$("time_from",this).getValue()=="ANY"?"a":MEB.utilities.modifiers.toBestFareTime($("time_from",this).getValue().substring(0,2));$(D+"_time_to",this).value=$("time_to",this).getValue()=="ANY"?"a":MEB.utilities.modifiers.toBestFareTime($("time_to",this).getValue().substring(0,2));var A=new util.simpleDateFormat();$(D+"_date_from",this).value=A.format("MM/dd/yyyy",$("date_from",this).getDate());$(D+"_date_to",this).value=A.format("MM/dd/yyyy",$("date_to",this).getDate());$(D+"_trip_type",this).value=this._tripType=="O"?"ow":"rt";$(D+"_check_nonstop",this).value=$("check_nonstop",this).isCheck()?"y":"n";$(D+"_adult_traveller",this).value=$("adult_traveller",this).getValue();$(D+"_b",this).value=$("prefAirline_1",this).getCode();MEB.popups.waiting.displayAirPopupAndSubmit(D)}}catch(C){}};MEB.behaviors.air.search.SearchForm.prototype._toggleText=function(C){try{var B=C.getAttribute("toggleText");var D="";if(C.innerHTML){C.setAttribute("toggleText",C.innerHTML);C.innerHTML=B}}catch(A){}};MEB.behaviors.air.search.SearchForm.prototype._updateLocations=function(){try{var D=this;var C=function(F){var E=$(F,D).getValue().split(",")[0];if($(F,D).getValue()!=""){D._chooseLocation(D._section+"_"+F,E)}};if(this._tripType=="O"||this._tripType=="R"){C("from");C("to")}else{for(var B=0;B<6;B++){C("from_"+B);C("to_"+B)}}}catch(A){}};MEB.objects.air.search.form=new MEB.behaviors.air.search.SearchForm();c.onLoad("init",MEB.objects.air.search.form,MEB.objects.air.search.form._section);c.require("aria");a.namespace("MEB.behaviors.air.search");a.namespace("MEB.objects.air.search");MEB.behaviors.air.search.SearchHistory=function(){this._section="aise_history";this._tabIndex=0};MEB.behaviors.air.search.SearchHistory.prototype.init=function(){try{this._tabIndex=parseInt($(this._section+"_tabIndex",this).value,10);if(document.cookie!=""){MEB.data.searchHistory=null;MEB.data.searchHistoryDisplayRecap=null;this._getCookies();$jq("#"+this._section+"_list_container").show();var A=TrimPath.parseDOMTemplate(this._section+"_template");var D={tabIndex:this._tabIndex,data:MEB.data.searchHistory,history:MEB.data.searchHistoryDisplayRecap};$(this._section+"_list_container",this).innerHTML=A.process(D);for(var C=0;C<MEB.data.searchHistoryDisplayRecap.length;C++){YAHOO.util.Event.addListener($(this._section+"_link_"+C,this),"click",this._onSubmit,this)}}else{$jq("#"+this._section+"_cookie_disabled").show()}}catch(B){}};MEB.behaviors.air.search.SearchHistory.prototype._getCookies=function(){try{try{MEB.data.searchHistory=eval("("+YAHOO.util.Cookie.get(MEB.cookies.SEARCH_HISTORY_FORM_DATA)+")")}catch(exception){}try{MEB.data.searchHistoryDisplayRecap=eval("("+YAHOO.util.Cookie.get(MEB.cookies.SEARCH_HISTORY_DISPLAY_RECAP)+")")}catch(exception){}if(!((typeof (MEB.data.searchHistoryDisplayRecap)=="undefined")||(MEB.data.searchHistoryDisplayRecap==null))){var searchesToKeep=[];var today=new Date();today.setHours(0);today.setMinutes(0);today.setSeconds(0);today.setMilliseconds(0);for(var i=0;i<MEB.data.searchHistoryDisplayRecap.length;i++){var bDate=new Date(MEB.data.searchHistoryDisplayRecap[i][0].SEARCH_HISTORY_BEGIN_DATE_FOR_JS);if(bDate>=today){searchesToKeep.push(i)}}if(searchesToKeep.length<MEB.data.searchHistoryDisplayRecap.length){var historyCookie=YAHOO.util.Cookie.get(MEB.cookies.SEARCH_HISTORY_FORM_DATA);var displayRecapCookie=YAHOO.util.Cookie.get(MEB.cookies.SEARCH_HISTORY_DISPLAY_RECAP);var explodedHistoryRecap=historyCookie.match(/{([^}])*/g);var explodedDisplayRecap=displayRecapCookie.match(/\[{([^\]])*/g);var keepedDisplayRecap=[];var keepedHistoryRecap=[];for(var i=0;i<searchesToKeep.length;i++){keepedHistoryRecap.push(explodedHistoryRecap[searchesToKeep[i]]);keepedDisplayRecap.push(explodedDisplayRecap[searchesToKeep[i]])}historyCookie="["+keepedHistoryRecap.join("},")+"}]";displayRecapCookie="["+keepedDisplayRecap.join("],")+"]";MEB.data.searchHistory=eval("("+historyCookie+")");MEB.data.searchHistoryDisplayRecap=eval("("+displayRecapCookie+")");YAHOO.util.Cookie.set(MEB.cookies.SEARCH_HISTORY_FORM_DATA,historyCookie,MEB.cookies.options);YAHOO.util.Cookie.set(MEB.cookies.SEARCH_HISTORY_DISPLAY_RECAP,displayRecapCookie,MEB.cookies.options)}}}catch(exception){}};MEB.behaviors.air.search.SearchHistory.prototype._onSubmit=function(A){try{YAHOO.util.Event.preventDefault(A);YAHOO.util.Event.stopPropagation(A);var E=this.id.split("_");var B=E[E.length-1];var F=MEB.data.searchHistory[B];$jq("#TRIP_TYPE")[0].value=escape(F.TRIP_TYPE);$jq("#DIRECT_NON_STOP")[0].value=escape(F.DIRECT_NON_STOP);$jq("#FIELD_ADT_NUMBER")[0].value=escape(F.FIELD_ADT_NUMBER);$jq("#FIELD_CHD_NUMBER")[0].value=escape(F.FIELD_CHD_NUMBER);$jq("#FIELD_INFANTS_NUMBER")[0].value=escape(F.FIELD_INFANTS_NUMBER);$jq("#AIRLINE_1")[0].value=escape((typeof F.AIRLINE_1=="undefined"?"":F.AIRLINE_1));$jq("#AIRLINE_2")[0].value=escape((typeof F.AIRLINE_2=="undefined"?"":F.AIRLINE_2));$jq("#AIRLINE_3")[0].value=escape((typeof F.AIRLINE_3=="undefined"?"":F.AIRLINE_3));if(F.TRIP_TYPE=="R"||F.TRIP_TYPE=="O"){$jq("#B_LOCATION_1")[0].value=escape(F.B_LOCATION_1);$jq("#E_LOCATION_1")[0].value=escape(F.E_LOCATION_1);$jq("#Month1")[0].value=escape(F.Month1);$jq("#Day1")[0].value=escape(F.Day1);$jq("#Hours1")[0].value=escape(F.Hours1);if(F.TRIP_TYPE=="R"){$jq("#Month2")[0].value=escape(F.Month2);$jq("#Day2")[0].value=escape(F.Day2);$jq("#Hours2")[0].value=escape(F.Hours2)}}else{for(var D=0;D<6;D++){if(typeof F["B_LOCATION_"+(D+1)+"_Cpx"]!="undefined"){$jq("#B_LOCATION_"+(D+1)+"_Cpx")[0].value=escape(F["B_LOCATION_"+(D+1)+"_Cpx"]);$jq("#E_LOCATION_"+(D+1)+"_Cpx")[0].value=escape(F["E_LOCATION_"+(D+1)+"_Cpx"]);$jq("#Month"+(D+1)+"Cpx")[0].value=escape(F["Month"+(D+1)+"Cpx"]);$jq("#Day"+(D+1)+"Cpx")[0].value=escape(F["Day"+(D+1)+"Cpx"]);$jq("#Hours"+(D+1)+"Cpx")[0].value=escape(F["Hours"+(D+1)+"Cpx"])}}}MEB.popups.waiting.displayAirPopupAndSubmit("aise_form_ADVS")}catch(C){}};MEB.objects.air.search.history=new MEB.behaviors.air.search.SearchHistory();c.onLoad("init",MEB.objects.air.search.history);c.require("aria");a.namespace("MEB.behaviors.air.search");a.namespace("MEB.objects.air.search");MEB.behaviors.air.search.WorldMap=function(){this._section="aise_world_map";this._map=null;this._loader=null;this._mapIsLoaded=false;this._buffer=[]};MEB.behaviors.air.search.WorldMap.prototype.init=function(){try{MEB.eventBus.subscribe(this._onEvent.createDelegate(this));this._loader=new YAHOO.util.YUILoader();this._veVersion="6.1";this._loader.addModule({name:"virtual-earth-v"+this._veVersion,type:"js",fullpath:"http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v="+this._veVersion,verifier:MEB.behaviors.air.search.WorldMap.checkVE});this._loader.require("virtual-earth-v"+this._veVersion);this._loader.insert(this._onVELoad.createDelegate(this));YAHOO.util.Event.addListener($(this._section+"_toggle_map",this),"click",this._onToggleMap,this)}catch(A){}};MEB.behaviors.air.search.WorldMap.checkVE=function(A,C){try{if(typeof VEMap!="undefined"){C()}else{setTimeout(function(){MEB.behaviors.air.search.WorldMap.checkVE(A,C)},2000)}}catch(B){}};MEB.behaviors.air.search.WorldMap.prototype._fluchBuffer=function(){try{if(this._buffer.length>0){var B=this._buffer.pop();if(this._buffer.length==1){this._buffer[0].adjustView=true}this.plotCityPair(B,this._fluchBuffer.createDelegate(this))}else{this._mapIsLoaded=true;MEB.eventBus.fire({eventName:"onMapLoaded"})}}catch(A){}};MEB.behaviors.air.search.WorldMap.prototype._onEvent=function(A,D){try{var C=D[0];switch(C.eventName){case"onChangeTripType":case"onRemoveDestination":this._map.reset();break;case"onChooseCityPair":if(this._mapIsLoaded){this.plotCityPair(D[0].data)}else{D[0].data.adjustView=false;this._buffer[this._buffer.length]=D[0].data}break;default:break}}catch(B){}};MEB.behaviors.air.search.WorldMap.prototype._onToggleMap=function(A,D){try{$jq("#"+this.id).toggleClass("wm-close");$jq("#"+this.id).toggleClass("wm-open");var C=$jq("#"+D._section+"_conatiner");C.toggle();if($jq.browser.msie==true&&$jq.browser.version=="6.0"){D._map.resize(C.width(),C.height())}}catch(B){}};MEB.behaviors.air.search.WorldMap.prototype._onVELoad=function(){try{if($jq.browser.msie==true&&$jq.browser.version=="6.0"){YAHOO.util.Event.addListener($(this._section+"_toggle_map",this),"click",this._onToggleMap,this)}this._map=new MEB.utilities.VEWrapper(this._section+"_conatiner",{automaticLink:true,lineDisplay:"curve"});this._map.init();this._map.toggleNavigation();$jq("#"+this._section+"_conatiner").removeClass("vertical");this._buffer.reverse();this._fluchBuffer()}catch(A){}};MEB.behaviors.air.search.WorldMap.prototype.plotCityPair=function(B,C){try{this._map.setShapeIcon(B.bLoc.icon);var E=this;var D=function(){E._map.setShapeIcon(B.eLoc.icon);E._map.plot(B.eLoc.id,B.eLoc.location,function(){MEB.eventBus.fire({eventName:"onPlotCityPair"});if(B.adjustView){E._map.setBestView()}if(typeof C!="undefined"&&C!=null){C()}})};this._map.plot(B.bLoc.id,B.bLoc.location,D)}catch(A){}};MEB.objects.air.search.worldMap=new MEB.behaviors.air.search.WorldMap();c.onLoad("init",MEB.objects.air.search.worldMap);
