var agt=navigator.userAgent.toLowerCase(); var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('Safari')==-1)); var is_nav3 = (is_nav && (parseInt(navigator.appVersion) == 3)); var is_nav4 = (is_nav && (parseInt(navigator.appVersion) == 4)); var is_nav4up = (is_nav && (parseInt(navigator.appVersion) >= 4)); var is_nav5up = (is_nav && (parseInt(navigator.appVersion) >= 5)); var is_ie = (agt.indexOf("msie") != -1); var is_ie3 = (is_ie && (parseInt(navigator.appVersion) < 4)); var is_ie4 = (is_ie && (agt.indexOf("msie 4")!=-1)); var is_ie4up = (is_ie && (parseInt(navigator.appVersion) >= 4)); var is_ie5up = (is_ie && !is_ie3 && !is_ie4); var is_mac = (agt.indexOf("mac")!=-1); var is_safari = (agt.indexOf("afari")!=-1); var index_page=false; function getNav4Layer(layerId, parent) { var objLayer; var parentObj = (parent)? parent : document; for (var i=0; i-1) { s=(s.substring(0,i+2)); } else { s=(s.substring(0,2)); } return s; } // Invoked by 's onResize event handler to refresh the page for // Navigator 4 to assist in getting positioned elements back in place var origWidth; var origHeight; function restorePage() { if (is_nav4) { if (origWidth != window.innerWidth || origHeight != window.innerHeight) { history.go(0) } // jfs - added timer to check page resize setTimeout('restorePage()',500); } else window.location.reload(); } function checkPosChange() { //just checks y as scroll bar appearing/disappearing messes up checking x var ypos=0; var img_name='menuimg'; if (is_nav4) { eval('ypos = document.images["NAV'+img_name+'"].y'); } else if (is_nav5up || is_ie4up) { //get default image object if (is_ie4) { var elem = document.all[img_name]; } else { // nav5 or ie5 and up mac or win var elem = document.getElementById(img_name); } //add up offsets to get actual pixel location of default image while (elem.offsetParent != null) { ypos += elem.offsetTop; elem = elem.offsetParent; } ypos += elem.offsetTop; } if (ypos!=menuy) { restorePage(); } setTimeout('checkPosChange()',1000); } function verifyCompatibleBrowser(){ this.ver=navigator.appVersion this.dom=document.getElementById?1:0 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) return this } bw=new verifyCompatibleBrowser() var speed=10; //jfs 2-6-04 - needs lower numbers if safari //rwask3 04.04.29 -- added second conditional statement and 3rd case -- ie win was too slow if (is_nav5up && !is_safari) { var gVScroll=20; var gHScroll=10; } else if (is_safari) { var gVScroll=7; var gHScroll=3; } else { var gVScroll=7; var gHScroll=7; } var loop, timer function ConstructObject(obj,nest){ nest=(!nest) ? '':'document.'+nest+'.' this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight this.up=MoveAreaUp;this.down=MoveAreaDown; this.MoveArea=MoveArea; this.x; this.y; this.obj = obj + "Object" eval(this.obj + "=this") return this } function MoveArea(x,y){ this.x=x;this.y=y this.css.left=this.x this.css.top=this.y } function MoveAreaDown(move){ if(this.y+5>-this.scrollHeight+objContainer.clipHeight+move){ this.MoveArea(0,this.y-move) if(loop) setTimeout(this.obj+".down("+move+")",speed) } } function MoveAreaUp(move){ if(this.y<0){ this.MoveArea(0,this.y-move) if(loop) setTimeout(this.obj+".up("+move+")",speed) } } function PerformScroll(speed){ if(initialised){ loop=true; if(speed>0) objScroller.down(speed) else objScroller.up(speed) } } function stop_scroll(){ loop=false if(timer) clearTimeout(timer) } var initialised; var menux=0; var menuy=0; function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function changeImages(imgName,imgObj,thisWidth,thisHeight) { if (document.images) document.images[imgName].src = imgObj if (is_safari) { document.images[imgName].width = thisWidth document.images[imgName].height = thisHeight } }