/*************************** Set Vars and Blots ***************************/ EnVar = { speed: 100, time: 2000 } EnVar.colors = new Array("292272","423BB2","66619A","8E8AB4","B2AFCC","CAC8DC"); blots=new Array(); blotsCount = 1; blots[0]= { text: "NJ TRANSIT Service Information in the Event of an MTA Strike", lk: "http://www.njtransit.com/ta_adjustment_project.jsp?ID=523" } blots[1]= { text: "", lk: false } blots[2]= { text: "", lk: false } blots[3]= { text: "", lk: false } blots[4]= { text: "", lk: false } blots[5]= { text: "", lk: false } /*************************** You're Done! ***************************/ is = new userIs(); function userIs() { this.dom = (document.getElementById)? true:false; this.ns = (document.layers)? true:false; this.ie = (document.all)? true:false; this.mac = (navigator.userAgent.indexOf("Mac") > -1)? true:false; } if (is.dom && navigator.userAgent.indexOf("Netscape") > -1) { EnVar.speed=20; EnVar.time=3000; } function LayerWrite(b,cl) { if (is.mac && is.ie) tag='
\n'; else tag='
\n'; if (b.lk) { tag+='' + b.text + ''; } else { tag+=''+ b.text + ''; } tag+='
'; if (is.ie || is.dom) { this.call.innerHTML=tag; } else if (is.ns) { this.call.document.open(); this.call.document.write(tag); this.call.document.close(); } } function SetLayerPos(x,y) { if (is.dom && navigator.userAgent.indexOf("Netscape") > -1) { this.css.left=x; this.css.top=y; } if (is.dom || is.ie) { this.css.pixelLeft=x; this.css.pixelTop=y; } else if (is.ns) { this.css.left=x; this.css.top=y; } } function SetLayer(id) { this.call = (is.dom)? document.getElementById(id):(is.ie)? document.all[id]:document.layers[id]; this.css = (is.dom || is.ie)? this.call.style:this.call; this.setPos = SetLayerPos; this.writeTo = LayerWrite; } s=0; dir="in"; v=0; function StartFade() { FadeBlot.writeTo(blots[v],EnVar.colors[s]); if (dir == "in") { if (s == EnVar.colors.length-1) { dir="out"; s--; tout=setTimeout("StartFade()",EnVar.time); } else { s++; tout=setTimeout("StartFade()",EnVar.speed); } } else { if (s == 0) { dir="in"; if (v == blotsCount-1) { v=0; } else { v++; } tout=setTimeout("StartFade()",EnVar.speed); } else { s--; tout=setTimeout("StartFade()",EnVar.speed); } } } function FadeInit() { FadeBlot=new SetLayer("blot"); newx=CenterBlot(); if (is.mac && is.ie) FadeBlot.setPos(newx,20); else FadeBlot.setPos(newx,20); StartFade(); } function CenterBlot() { if (is.ns || navigator.userAgent.indexOf("Netscape") > -1) { height=window.innerHeight; width=window.innerWidth; } else { height=document.body.clientHeight; width=document.body.clientWidth; } center=width/2; newspot=(center-(751/2)) + 175; if (is.ns) newspot+= -10; return newspot; } function Loader() { FadeInit(); foldInit(); } function Loader2() { if (is.ns) { location.reload(); } else { clearTimeout(tout); FadeInit(); foldInit(); } } if(is2.bw) onload=Loader if(is.ns && parseFloat(navigator.appVersion) > 4.19) onresize=Loader2; else if(!is.ns) onresize=Loader2;