function HelpPanels(A){this.helpPanelIds=A;this.initialised=false;this.showingHelpCount=0;this.enableLowestFareFinderHelp=false;this.dataLoaded=false;this.nextPanelReveal=0;this.revealDelay=3000}HelpPanels.prototype.Initialise=function(){if(!this.initialised){this.button=document.getElementById("ctl00_mainContentPlaceHolder_btnShowAllHelp").parentNode;this.helpPanels=new Array();for(var A in this.helpPanelIds){this.helpPanels[A]=document.getElementById(this.helpPanelIds[A]);if(A<2&&BrowserDetect.OS=="Mac"&&BrowserDetect.browser=="Firefox"&&(BrowserDetect.version=="2"||BrowserDetect.version=="1")){this.helpPanels[A].style.left="505px"}}this.disablePanel=GetCookie("WebTisDisableHelpPanel");if(this.disablePanel!=null){this.disablePanel=this.disablePanel*1}else{this.disablePanel=0}this.initialised=true}};HelpPanels.prototype.ShowPanelAndUpdateButton=function(D,B,A){if(D==this.helpPanels[2]&&!this.enableLowestFareFinderHelp){return }if((D.style.display=="block")^B){if(A&&B){var C=YAHOO.util.Dom.getElementsByClassName("DontShowHelpButton",undefined,D);if(C.length>0){ShowElement(C[0],false)}}ShowElement(D,B);if(B){this.showingHelpCount++}else{this.showingHelpCount--}this.UpdateHelpButtonText()}};HelpPanels.prototype.ShowPanel=function(A){this.Initialise();if(this.IsPanelShown(A)){this.ShowPanelAndUpdateButton(this.helpPanels[A],true)}};HelpPanels.prototype.IsPanelShown=function(A){return !(this.disablePanel&(1<<A))};HelpPanels.prototype.ShowFarePanel=function(){if(mixingDeck.disableHelp){return }this.ShowPanel(0);this.nextPanelReveal=1;if(this.IsPanelShown(0)){timer.SetTimer(this.revealDelay,helpPanels,helpPanels.ShowServicePanel)}else{this.ShowServicePanel()}};HelpPanels.prototype.ShowServicePanel=function(){if(mixingDeck.disableHelp){return }this.ShowPanel(1);this.nextPanelReveal=2;if(this.enableLowestFareFinderHelp){if(this.IsPanelShown(1)){timer.SetTimer(this.revealDelay,helpPanels,helpPanels.ShowLowFareFinderPanel)}else{helpPanels.ShowLowFareFinderPanel()}}};HelpPanels.prototype.ShowLowFareFinderPanel=function(){if(mixingDeck.disableHelp){return }this.ShowPanel(2);this.nextPanelReveal=3};HelpPanels.prototype.ShowAllPanels=function(A){this.Initialise();for(var B in this.helpPanels){this.ShowPanelAndUpdateButton(this.helpPanels[B],A,true)}};HelpPanels.prototype.DataLoaded=function(A){this.Initialise();this.dataLoaded=true;this.enableLowestFareFinderHelp=A;if(this.enableLowestFareFinderHelp&&this.nextPanelReveal==2){timer.SetTimer(this.revealDelay,helpPanels,helpPanels.ShowLowFareFinderPanel)}var B=YAHOO.util.Dom.getElementsByClassName("HelpText",undefined,this.helpPanels[0])[0];B.innerHTML=this.fareHelpTextLoaded;B=YAHOO.util.Dom.getElementsByClassName("HelpText",undefined,this.helpPanels[1])[0];B.innerHTML=this.serviceHelpTextLoaded};HelpPanels.prototype.OnClose=function(A){var B=GetParentWithStyle(A,"PopupPanel");this.ShowPanelAndUpdateButton(B,false)};HelpPanels.prototype.OnDontShow=function(B){var C=GetParentWithStyle(B,"PopupPanel");for(var A in this.helpPanels){if(this.helpPanels[A]==C){break}}this.disablePanel=this.disablePanel|(1<<A);SetCookie("WebTisDisableHelpPanel",this.disablePanel);this.ShowPanelAndUpdateButton(C,false)};HelpPanels.prototype.UpdateHelpButtonText=function(){if(this.showingHelpCount){SetWTButtonText(this.button,mixingDeck.resourceStrings.hideAllHelp)}else{SetWTButtonText(this.button,mixingDeck.resourceStrings.showAllHelp)}};HelpPanels.prototype.ShowAllHelp=function(){this.Initialise();this.ShowAllPanels(this.showingHelpCount==0)};HelpPanels.prototype.SetTicketSearchControlHelpZIndex=function(A){this.Initialise();if(A){this.helpPanels[4].style.zIndex=60}else{this.helpPanels[4].style.zIndex=45}};function GetCookie(D){var B=document.cookie.split("; ");for(var C=0;C<B.length;C++){var A=B[C].split("=");if(D==A[0]){return unescape(A[1])}}return null}function DelCookie(A){document.cookie=A+"=; expires=Fri, 21 Dec 1976 04:31:24 GMT;"}function SetCookie(A,B){var C=new Date(2100,11,31,0,0,0);setCookie(A,B,C,"/",false,false)}function setCookie(C,E,A,G,D,F){var B=C+"="+escape(E)+((A)?"; expires="+A.toGMTString():"")+((G)?"; path="+G:"")+((D)?"; domain="+D:"")+((F)?"; secure":"");document.cookie=B}