if(clientSideBrowserSpecific){loadStylesheet("common","common.css");
if(browser.isMozilla){loadStylesheet("common","mozilla.css");
if(browser.versionMinor<1.6){loadStylesheet("common","mozilla_1.6down.css")
}else{if(browser.versionMinor<1.7){loadStylesheet("common","mozilla_1.7down.css")
}}}else{if(browser.isNS){loadStylesheet("common","nav.css");
if(browser.versionMinor<7.5){loadStylesheet("common","nav_7down.css")
}}else{if(browser.isIE){if(browser.isWin){loadStylesheet("common","ie_win.css");
if(browser.isIE55Down){loadStylesheet("common","ie_win_5.5down.css")
}else{if(!browser.isIE6up){loadStylesheet("common","ie_win_6down.css")
}}}else{if(browser.isMac){loadStylesheet("common","ie_mac.css")
}}}else{if(browser.isOpera){loadStylesheet("common","opera.css");
if(browser.versionMinor<7.5){loadStylesheet("common","opera_7.5down.css")
}else{if(browser.versionMinor<8){loadStylesheet("common","opera_8down.css")
}}}else{if(browser.isFirefox){loadStylesheet("common","firefox.css")
}else{if(browser.isKonqueror){loadStylesheet("common","konqueror.css")
}else{if(browser.isSafari){loadStylesheet("common","safari.css")
}}}}}}}loadStylesheet(tocId,"main.css")
}function loadStylesheet(b,a){document.write('<link href="'+resourcesPrefix+"/"+b+"/web/css/"+a+'" rel="stylesheet" type="text/css"/>')
}function correctPage(){hideHiddenElements();
if(document.forms[0]&&!(browser.isMac&&browser.isIE)){correctActionButtons()
}correctPNG();
correctLinks();
if(browser.PNGTransSupport==0){hideHiddenElements()
}}function validate(a){if(confirmSubmit){var b=true;
b=confirm(confirmationQuery);
if(b){return true
}else{return false
}}else{return true
}}function setConfirmSubmit(a){confirmationQuery=a;
confirmSubmit=true
}function correctLinks(){var a=document.getElementsByTagName("a");
for(i=0;
i<a.length;
i++){if(a[i].id=="termsAndConditions"){a[i].href="javascript:showBox('-termsAndConditions')"
}else{if(a[i].id=="iphone"){a[i].href="javascript:showBox('-iphone')"
}else{if(a[i].className=="help-other"){a[i].href="javascript:showBox('-other')"
}else{if(a[i].className=="help"){a[i].href="javascript:showBox('')"
}else{if(a[i].id=="captchaHelp"){a[i].href="javascript:showBox('-captchaHelp')"
}else{if(a[i].id=="departuresShowTimetableCallingStationsLink"&&browser.ajaxSupport){a[i].href="javascript:getTimetableCallingStations('timetableCallingStations?type=departures','show','departures')"
}else{if(a[i].id=="arrivalsShowTimetableCallingStationsLink"&&browser.ajaxSupport){a[i].href="javascript:getTimetableCallingStations('timetableCallingStations?type=arrivals','show','arrivals')"
}else{if(a[i].id=="departuresHideTimetableCallingStationsLink"&&browser.ajaxSupport){a[i].href="javascript:showHideTimetableCallingStations('hide','departures')"
}else{if(a[i].id=="arrivalsHideTimetableCallingStationsLink"&&browser.ajaxSupport){a[i].href="javascript:showHideTimetableCallingStations('hide','arrivals')"
}}}}}}}}}}}function hideHiddenElements(){var e=document.getElementsByTagName("div");
for(i=0;
i<e.length;
i++){if(e[i].className=="summary-level1-hidden"&&!getHasFurtherInfo(e[i])){e[i].style.display="none"
}else{if(e[i].className=="summary-level2-hidden"){e[i].style.display="none"
}else{if(e[i].className=="serviceCallingStations"){e[i].style.display="none"
}else{if(e[i].className=="serviceCallingStationsButton"){e[i].style.display="inline"
}}}}}e=document.getElementsByTagName("select");
for(i=0;
i<e.length;
i++){if(e[i].id.indexOf("updatesType")!=-1){var b=document.getElementById("smsUpdatesFields_"+e[i].id.substring(0,8)+".id");
if(b!=null){switch(e[i].options[e[i].selectedIndex].value){case"1":b.style.display="inline";
break;
case"2":b.style.display="none";
break;
default:b.style.display="none"
}}}}if(browser.PNGTransSupport!=1){var a=document.getElementsByTagName("img");
for(i=0;
i<a.length;
i++){if(a[i].className=="serviceCallingStationsButton-image"){a[i].style.display="block"
}}}var d;
if(document.getElementById("arrivalsShowTimetableCallingStationsLink")!=null){d=document.getElementById("arrivalsShowTimetableCallingStationsLink");
d.style.display="inline"
}if(document.getElementById("departuresShowTimetableCallingStationsLink")!=null){d=document.getElementById("departuresShowTimetableCallingStationsLink");
d.style.display="inline"
}displayUpdateMessageBox()
}function displayUpdateMessageBox(){if(document.getElementById("messageBox-update")!=null){var a=document.getElementById("messageBox-update");
a.style.display="block"
}}function getHasFurtherInfo(d){var a=false;
var b=d.getElementsByTagName("div");
for(s=0;
s<b.length;
s++){if(b[s].className=="summary-level2"){a=true;
break
}}return a
}function correctActionButtons(){for(f=0;
f<document.forms.length;
f++){var l=document.forms[f].getElementsByTagName("img");
for(i=0;
i<l.length;
i++){var t=l[i];
var v=t.src.toLowerCase();
var b=t.name;
var e=b.length;
var h=b.indexOf("_")+1;
var g=b.substring(e,h);
if(v.substring(v.length-4,v.length)==".png"){var d="id='"+t.id+"' ";
var u=(t.className)?"class='"+t.className+"' ":"";
var k=(t.title)?"title='"+t.title+"' ":"title='"+t.alt+"' ";
if(browser.PNGTransSupport==1&&(g=="allRoutes"||g=="alertMe")){var n="display:inline-block;";
var o=n+t.style.cssText;
if(t.align=="left"){o="float:left;"+o
}if(t.align=="right"){o="float:right;"+o
}var q=t.height;
var p=t.width;
o="cursor:hand;"+o;
if(v.indexOf("__t")!=-1){var m="";
if(t.src.indexOf("btn_remove_me")!=-1){m=",'Are you sure you want to remove your account and all your alerts for all operators?'"
}newHTML="<span "+d+u+k+' style="width:'+p+"px; height:"+q+"px;"+o+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+v+"', sizingMethod='image');\" onmouseover=\"iePngSwap('"+t.id+"')\" onmouseout=\"iePngSwap('"+t.id+"')\"></span>";
t.outerHTML=newHTML
}else{newHTML="<a title='"+k+"' href=\"javascript:action('"+g+'\')"><img src="'+v+'" width="'+t.width+'" height="'+t.height+'" border="0" '+u+k+d;
newHTML+=' onmouseover="imageSwap(this)" onmouseout="imageSwap(this)"';
newHTML+="/></a>";
t.outerHTML=newHTML;
t.display="block"
}i=i-1
}else{if(browser.PNGTransSupport==0){var a=t.src.substring(0,v.length-4)+".gif";
newHTML="<a href=\"javascript:action('"+g+'\')" id="'+t.id+'"><img src="'+a+'" width="'+t.width+'" height="'+t.height+'" border="0" '+u+k+' id="'+t.id+'-image"';
newHTML+=' onmouseover="gifSwap(this)" onmouseout="gifSwap(this)"';
newHTML+="/></a>";
t.outerHTML=newHTML;
t.display="block";
i=i-1
}}}}}}function correctPNG(){for(var e=0;
e<document.images.length;
e++){var g=document.images[e];
var o=g.src.toLowerCase();
if(o.substring(o.length-4,o.length)==".png"&&o.indexOf("__t")!=-1){var b=(g.id)?"id='"+g.id+"' ":"";
var n=(g.className)?"class='"+g.className+"' ":"";
var d=(g.title)?"title='"+g.title+"' ":"title='"+g.alt+"' ";
if(browser.PNGTransSupport==1&&b.search("notCorrectPNG")==-1){var h="display:inline-block;";
if(g.className=="block"){h="display:block;"
}var k=h+g.style.cssText;
if(g.align=="left"){k="float:left;"+k
}if(g.align=="right"){k="float:right;"+k
}var m=g.height;
var l=g.width;
if(o.indexOf("btn_hide")!=-1){m="18";
l="46"
}if(o.indexOf("btn_hide_calling-stations")!=-1){m="46";
l="136"
}if(o.indexOf("btn_calling_at_stations")!=-1){m="18";
l="121"
}if(g.parentElement.href&&b.indexOf("_norollover")==-1&&o.indexOf("nexusalpha")==-1&&o.indexOf("na")==-1){k="cursor:hand;"+k;
newHTML="<span "+b+n+d+' style="width:'+l+"px; height:"+m+"px;"+k+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+g.src+"', sizingMethod='image');\" onmouseover=\"iePngSwap('"+g.id+"')\" onmouseout=\"iePngSwap('"+g.id+"')\"></span>"
}else{if(g.parentElement.href){k="cursor:hand;"+k
}newHTML="<span "+b+n+d+' style="width:'+g.width+"px; height:"+g.height+"px;"+k+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+g.src+"', sizingMethod='image');\"></span>"
}g.outerHTML=newHTML;
e=e-1
}else{if(browser.PNGTransSupport==0){var a=o.substring(0,o.length-4)+".gif";
newHTML='<img src="'+a+'" width="'+g.width+'" height="'+g.height+'" border="0"'+n+d+b;
if(g.parentElement.href){newHTML+=' onmouseover="gifSwap(this)" onmouseout="gifSwap(this)"'
}newHTML+="/>";
g.outerHTML=newHTML;
g.style.display="block"
}}}}}function MM_reloadPage(init){if(init==true){with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;
document.MM_pgH=innerHeight;
onresize=MM_reloadPage
}}}else{if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH){location.reload()
}}}MM_reloadPage(true);
function MM_preloadImages(){var h=document;
if(h.images){if(!h.MM_p){h.MM_p=new Array()
}var g,e=h.MM_p.length,b=MM_preloadImages.arguments;
for(g=0;
g<b.length;
g++){if(b[g].indexOf("#")!=0){h.MM_p[e]=new Image;
h.MM_p[e++].src=b[g]
}}}}function MM_findObj(h,g){var e,b,a;
if(!g){g=document
}if((e=h.indexOf("?"))>0&&parent.frames.length){g=parent.frames[h.substring(e+1)].document;
h=h.substring(0,e)
}if(!(a=g[h])&&g.all){a=g.all[h]
}for(b=0;
!a&&b<g.forms.length;
b++){a=g.forms[b][h]
}for(b=0;
!a&&g.layers&&b<g.layers.length;
b++){a=MM_findObj(h,g.layers[b].document)
}if(!a&&g.getElementById){a=g.getElementById(h)
}return a
}function MM_swapImgRestore(){var e,b,d=document.MM_sr;
for(e=0;
d&&e<d.length&&(b=d[e])&&b.oSrc;
e++){b.src=b.oSrc
}}function MM_swapImage(){var g,e=0,b,d=MM_swapImage.arguments;
document.MM_sr=new Array;
for(g=0;
g<(d.length-2);
g+=3){if((b=MM_findObj(d[g]))!=null){document.MM_sr[e++]=b;
if(!b.oSrc){b.oSrc=b.src
}b.src=d[g+2]
}}}function showBox(b){if(browser.PNGTransSupport==1){var e=document.all;
for(i=0;
i<e.length;
i++){if(e[i].className=="helpBox-tr"){e[i].style.height="33";
e[i].style.width="26"
}else{if(e[i].className=="helpBox-tl"){e[i].style.height="33";
e[i].style.width="20"
}else{if(e[i].className=="helpBox-br"){e[i].style.height="20";
e[i].style.width="26"
}else{if(e[i].className=="helpBox-bl"){e[i].style.height="20";
e[i].style.width="20"
}else{if(e[i].className=="helpBox-closeButton"){e[i].style.height="20";
e[i].style.width="87"
}}}}}}}var d=document.getElementById("helpBox"+b);
if(d==null){d=document.getElementById(b)
}if(b=="-iphone"){var g=getAnchorPosition("iphone");
d.style.left=g.x+0+"px";
d.style.top=g.y-100+"px"
}if(b=="-termsAndConditions"){var g=getAnchorPosition("termsAndConditions");
d.style.left=g.x+200+"px";
d.style.top=g.y-380+"px"
}if(b=="-captchaHelp"){var g=getAnchorPosition("captchaHelp");
d.style.left=g.x+0+"px";
d.style.top=g.y-380+"px"
}d.style.display="block";
var a=document.getElementsByTagName("img");
for(i=0;
i<a.length;
i++){if(a[i].className=="helpBox-tr"){}else{if(a[i].className=="helpBox-tl"){a[i].height="33";
a[i].width="20"
}else{if(a[i].className=="helpBox-br"){a[i].height="20";
a[i].width="26"
}else{if(a[i].className=="helpBox-bl"){a[i].height="20";
a[i].width="20"
}else{if(a[i].className=="helpBox-closeButton"){a[i].height="20";
a[i].width="87"
}}}}}}}function help(e){var d=250;
var a=350;
if(arguments.length==3){d=arguments[1];
a=arguments[2]
}var b=window.open(urlPrefix+"help/"+e,"","width="+d+",height="+a+",scrollbars=yes");
b.moveTo(parseInt((screen.width-d)/2),parseInt((screen.height-a)/2))
}function action(a){var b=true;
if(arguments.length>1){b=confirm(arguments[1])
}if(b){if(a.indexOf("changeEngWorksPeriod")!=-1){document.formEngWorks.action.value=a;
_gaq.push(["_trackEvent","Scope Change Event",a]);
document.formEngWorks.submit()
}else{var d=document.form[a];
if(d!=null){d.value=a
}document.form.action.value=a;
_gaq.push(["_trackEvent","Route Event",a]);
document.form.submit()
}}}function hide(b){var a=document.getElementById(b);
a.style.display="none";
if(arguments.length>1){}}var lockedImages=new Array();
function showAltText(e,d,a){if(!lockedImages[e]){var b=document.getElementById(e+"-altText");
b.style.left=d;
b.style.top=a;
b.style.visibility="visible"
}}function hideAltText(b){var a=document.getElementById(b+"-altText");
a.style.visibility="hidden"
}function iePngSwap(e,d){if(e!=""){var b=document.getElementById(e);
var a=b.style.filter;
if(a.indexOf("_f2")!=-1){b.style.filter=a.replace("_f2","");
if(d){hideAltText(e);
lockedImages[e]=true
}}else{b.style.filter=a.replace(".png","_f2.png");
if(d){lockedImages[e]=false;
window.setTimeout('showAltText("'+e+'",'+(getIeMouseX())+","+(getIeMouseY()+15)+")",800)
}}}}function getIeMouseX(){return window.event.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)
}function getIeMouseY(){return window.event.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)
}function gifSwap(a){var b=a.src;
if(b.indexOf("_f2")!=-1){a.src=b.replace("_f2","")
}else{a.src=b.replace(".gif","_f2.gif")
}}function imageSwap(a){var b=a.src;
if(b.indexOf("_f2")!=-1){a.src=b.replace("_f2","")
}else{a.src=b.replace(".png","_f2.png")
}}function displayImage(d,b,e){var a='<div style="width:'+b+"px;height:"+e+"px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+d+".png', sizingMethod='scale')\"></div>";
document.write(a)
}function expandCollapseIncident(a,b){elem=document.getElementById(a);
image=document.getElementById("image_"+a);
link=document.getElementById("link_"+a);
if(elem.style.display=="none"){elem.style.display="block";
image.src=image.src.replace("plus","minus");
link.title=link.title.replace("show","hide")
}else{if(elem.style.display==""){if(b){elem.style.display="none";
image.src=image.src.replace("minus","plus");
link.title=link.title.replace("hide","show")
}else{elem.style.display="block";
image.src=image.src.replace("plus","minus");
link.title=link.title.replace("hide","show")
}}else{elem.style.display="none";
image.src=image.src.replace("minus","plus");
link.title=link.title.replace("hide","show")
}}}function showHideTimetableCallingStations(o,g){var h=document.getElementsByTagName("div");
var d;
var k;
var p;
var a;
var e;
var b="121";
var m="18";
if(o=="hide"){d="none";
k=g+"HideTimetableCallingStationsButton";
a=g+"HideTimetableCallingStationsLink";
p=g+"ShowTimetableCallingStationsButton";
e=g+"ShowTimetableCallingStationsLink"
}else{if(o=="show"){b=130;
d="block";
p=g+"HideTimetableCallingStationsButton";
e=g+"HideTimetableCallingStationsLink";
k=g+"ShowTimetableCallingStationsButton";
a=g+"ShowTimetableCallingStationsLink"
}}for(i=0;
i<h.length;
i++){if(h[i].className=="tCallingStations-"+g){h[i].style.display=d
}}if((browser.isMozilla&&browser.versionMinor<=1)||(browser.isIE&&browser.versionMinor<5.5)){document.getElementById(k).style.display="none"
}document.getElementById(a).style.display="none";
if(!browser.isIE){if(document.getElementById(p).src.indexOf("_f2")!=-1){var n=document.getElementById(p).src;
document.getElementById(p).src=n.replace("_f2","")
}}if((browser.isMozilla&&browser.versionMinor<=1)||(browser.isIE&&browser.versionMinor<5.5)){document.getElementById(p).style.display="inline";
document.getElementById(p).width=b;
document.getElementById(p).height=m
}document.getElementById(e).style.display="inline";
var l=getAnchorPosition(g);
document.documentElement.scrollTop=l.y;
document.body.scrollTop=l.y
}function showHideServiceCallingStations(b,g){if(b=="show"){document.getElementById("serviceCallingStationsLink-"+g).style.display="none";
document.getElementById("serviceCallingStations-"+g).style.display="block";
var e;
if(!browser.isIE){e=document.getElementById("hideServiceCallingStationsButton-"+g);
if(e.src.indexOf("_f2")!=-1){var d=e.src;
e.src=d.replace("_f2","")
}}else{var a=document.getElementsByTagName("img");
for(i=0;
i<a.length;
i++){if(a[i].id=="hideServiceCallingStationsButton-"+g){e=a[i]
}}}if(browser.PNGTransSupport!=1){e.height="18";
e.width="46";
e.style.display="block"
}}else{if(!browser.isIE){var e=document.getElementById("serviceCallingStationsButton-"+g);
if(e.src.indexOf("_f2")!=-1){var d=e.src;
e.src=d.replace("_f2","")
}}document.getElementById("serviceCallingStationsLink-"+g).style.display="block";
document.getElementById("serviceCallingStations-"+g).style.display="none"
}}function showHideElements(b,d,a){pause(1000);
document.getElementById(b).style.display="block";
document.getElementById(d).style.display="none";
if(arguments.length>2){document.getElementById(a).style.display="none"
}}function showHideSMSUpdatesFields(a,b){var d=document.getElementById(b);
if(d!=null){switch(a.options[a.selectedIndex].value){case"1":d.style.display="inline";
break;
case"2":d.style.display="none";
break;
default:d.style.display="none"
}}}function jumpMenu(b,d,e){var a="";
if(arguments.length>3){a=arguments[3]
}window.location="route?action="+d+"&"+e+"="+b.options[b.selectedIndex].value+a
}function beginDrag(l,b,e){var k=b.clientX-parseInt(l.style.left);
var g=b.clientY-parseInt(l.style.top);
if(document.addEventListener){document.addEventListener("mousemove",m,true);
document.addEventListener("mouseup",a,true)
}else{if(document.attachEvent){l.attachEvent("onmousemove",m);
l.attachEvent("onmouseup",a);
l.setCapture()
}else{var d=document.onmousemove;
var h=document.onmouseup;
document.onmousemove=m;
document.onmouseup=a
}}if(b.stopPropagation){b.stopPropagation()
}else{b.cancelBubble=true
}if(b.preventDefault){b.preventDefault()
}else{b.returnValue=false
}function m(n){if(!n){n=window.event
}var p=n.clientX-k;
var o=n.clientY-g;
if(p<0){p=0
}if(o<0){o=0
}if(p+300>document.body.clientWidth){p=document.body.clientWidth-320
}if(o>document.getElementById("form").scrollHeight){o=document.getElementById(e).scrollHeight
}l.style.left=p+"px";
l.style.top=o+"px";
if(n.stopPropagation){n.stopPropagation()
}else{n.cancelBubble=true
}}function a(n){if(!n){n=window.event
}if(document.removeEventListener){document.removeEventListener("mouseup",a,true);
document.removeEventListener("mousemove",m,true)
}else{if(document.detachEvent){l.detachEvent("onmouseup",a);
l.detachEvent("onmousemove",m);
l.releaseCapture()
}else{document.onmouseup=h;
document.onmousemove=d
}}if(n.stopPropagation){n.stopPropagation()
}else{n.cancelBubble=true
}}}function getAnchorPosition(b){var g=false;
var n=new Object();
var m=0,k=0;
var e=false,h=false,l=false;
if(document.getElementById){e=true
}else{if(document.all){h=true
}else{if(document.layers){l=true
}}}if(e&&document.all){m=AnchorPosition_getPageOffsetLeft(document.all[b]);
k=AnchorPosition_getPageOffsetTop(document.all[b])
}else{if(e){var a=document.getElementById(b);
m=AnchorPosition_getPageOffsetLeft(a);
k=AnchorPosition_getPageOffsetTop(a)
}else{if(h){m=AnchorPosition_getPageOffsetLeft(document.all[b]);
k=AnchorPosition_getPageOffsetTop(document.all[b])
}else{if(l){var p=0;
for(var d=0;
d<document.anchors.length;
d++){if(document.anchors[d].name==b){p=1;
break
}}if(p==0){n.x=0;
n.y=0;
return n
}m=document.anchors[d].x;
k=document.anchors[d].y
}else{n.x=0;
n.y=0;
return n
}}}}n.x=m;
n.y=k;
return n
}function AnchorPosition_getPageOffsetLeft(b){var a=b.offsetLeft;
while((b=b.offsetParent)!=null){a+=b.offsetLeft
}return a
}function AnchorPosition_getWindowOffsetLeft(a){return AnchorPosition_getPageOffsetLeft(a)-document.body.scrollLeft
}function AnchorPosition_getPageOffsetTop(a){var b=a.offsetTop;
while((a=a.offsetParent)!=null){b+=a.offsetTop
}return b
}function AnchorPosition_getWindowOffsetTop(a){return AnchorPosition_getPageOffsetTop(a)-document.body.scrollTop
}function getFurtherInfo(d,e){if(document.getElementById("further-info-span-"+e)){document.getElementById("furtherInfo-"+e).style.display="block";
document.getElementById("furtherInfo-link-"+e).style.display="none";
document.getElementById("furtherInfo-hideLink-"+e).style.display="block"
}else{var a=d;
var b="incidentId="+e;
a+="?"+b;
dojo.io.bind({url:a,load:function(k,l,h){var m=l.documentElement.childNodes[0].data;
var g=document.createElement("span");
g.id="further-info-span-"+e;
g.appendChild(document.createTextNode(m));
var n=document.getElementById("furtherInfo-"+e);
n.appendChild(g);
document.getElementById("furtherInfo-link-"+e).style.display="none";
n.style.display="block";
document.getElementById("furtherInfo-hideLink-"+e).style.display="block"
},mimetype:"text/xml"})
}}function pause(b){var a=new Date();
var d=a.getTime()+b;
while(true){a=new Date();
if(a.getTime()>d){return
}}}function showLoadingImg(b){var e=getAnchorPosition(b+"ShowTimetableCallingStationsLink");
var k,a;
if(browser.isIE){k=-13;
a=-27
}else{if(browser.isMozilla||browser.isFirefox){k=-10;
a=-19
}else{if(browser.isOpera){k=-8;
a=-19
}else{if(browser.isSafari){k=-17;
a=-25
}else{k=-13;
a=-21
}}}}var d=e.y+k;
var h=e.x+a;
var g=document.getElementById("loadingImg");
g.style.left=h+"px";
g.style.top=d+"px";
g.style.zIndex=10;
g.style.display="block"
}var depTimetableCallingStationsExist=false;
var arrTimetableCallingStationsExist=false;
function getTimetableCallingStations(g,e,b){if((b=="departures"&&depTimetableCallingStationsExist)||(b=="arrivals"&&arrTimetableCallingStationsExist)){showHideTimetableCallingStations(e,b)
}else{showLoadingImg(b);
var l=0;
var a=window.location.pathname.lastIndexOf("/")+1;
var h=window.location.hostname;
var k=window.location.pathname.substring(l,a);
var d="http://"+h+k+g;
dojo.io.bind({url:d,load:function(q,F,A){var n=F.documentElement.getElementsByTagName("service");
if(n.length>0){for(i=0;
i<n.length;
i++){var v=i+1;
var y=b+"-"+v;
var z=document.getElementById(y);
if(n[i].getElementsByTagName("error").length>0){var o=document.createElement("span");
var p=n[i].getElementsByTagName("error")[0].attributes.getNamedItem("message").value;
o.appendChild(document.createTextNode(p));
o.style.fontStyle="italic";
z.appendChild(o)
}else{if(n[i].getElementsByTagName("route").length>0){var m=n[i].getElementsByTagName("route");
for(r=0;
r<m.length;
r++){var t=document.createElement("span");
t.appendChild(document.createElement("p"));
if(m[r].attributes.getNamedItem("split-type")){if(m[r].attributes.getNamedItem("split-type").value=="divide"){var u="* Divides at: ";
u+=m[r].attributes.getNamedItem("split-station-name").value;
u+=", a seperate portion goes to: ";
t.appendChild(document.createTextNode(u))
}}var w=m[r].getElementsByTagName("calling-station");
for(c=0;
c<w.length;
c++){var C=w[c].attributes.getNamedItem("name").value;
var B=w[c].attributes.getNamedItem("time").value;
if(B!=""){var E=C+" ("+B+")"
}if(w[c].attributes.getNamedItem("split").value=="true"){E+=" *"
}var x=document.createElement("span");
if(w[c].attributes.getNamedItem("highlighted").value=="true"){x.style.fontWeight="bold";
x.appendChild(document.createTextNode(E))
}else{if(w[c].attributes.getNamedItem("split").value=="true"){x.style.fontStyle="italic";
x.appendChild(document.createTextNode(E))
}else{x.appendChild(document.createTextNode(E))
}}t.appendChild(x);
if(c!=w.length-1){t.appendChild(document.createTextNode(", "))
}}t.appendChild(document.createElement("p"));
z.appendChild(t)
}}}}}else{var D=getElementsByClassName("div","tCallingStations-"+b);
for(i=0;
i<D.length;
i++){var o=document.createElement("span");
o.appendChild(document.createTextNode("Could not get calling stations for this service."));
o.style.fontStyle="italic";
D[i].appendChild(o)
}}document.getElementById("loadingImg").style.display="none";
showHideTimetableCallingStations(e,b)
},mimetype:"text/xml"});
if(b=="departures"){depTimetableCallingStationsExist=true
}else{if(b=="arrivals"){arrTimetableCallingStationsExist=true
}}}}function getElementsByClassName(d,e){var a=document.getElementsByTagName(d);
var b=[];
for(i=0;
i<a.length;
i++){if(a[i].className==e){b.push(a[i])
}}return b
}function showElement(b){if(b!=null){var a=document.getElementsByName(b);
document.getElementById(b).style.display="inline";
for(i=0;
i<a.length;
i++){a.item(i).style.display="inline"
}}}function hideElement(a){if(a!=null){elements=document.getElementsByName(a);
document.getElementById(a).style.display="none";
for(i=0;
i<elements.length;
i++){elements.item(i).style.display="none"
}}}function showFurtherInfo(d,b,a){showElement(d);
hideElement(b);
showElement(a)
}function hideFurtherInfo(d,b,a){hideElement(d);
showElement(b);
hideElement(a)
}function showDivHideButton(a,d,b){showElement(a);
hideElement(d);
showElement(b)
}function hideDivShowButton(a,d,b){hideElement(a);
showElement(d);
hideElement(b)
}function showHideDivAndButton(a,d,b,e){showElement(a);
hideElement(d);
showElement(b);
hideElement(e)
}function formSubmit(a,b,h,g){var e=getFormObject(a);
if(e!=null){var d=getElement(e,h);
if(d!=null){d.value=g
}e.action.value=b;
e.submit()
}}function debugForms(){var a=document.forms;
for(i=0;
i<a.length;
i++){debugForm(a[i])
}}function debugForm(a){var b="";
var d=a.elements;
b+="form.name = "+a.name+"\nform.action = "+a.action.value;
for(j=0;
j<d.length;
j++){b+="\n\telements["+j+"].name = "+d[j].name+", value = "+d[j].value
}alert(b)
}function getFormObject(b){var a=document.forms;
for(i=0;
i<a.length;
i++){if(a[i].name==b){return a[i]
}}return null
}function getElement(a,b){var d=a.elements;
for(i=0;
i<d.length;
i++){if(d[i].name==b){return d[i]
}}return null
};
