// Version: 1.37 // Last updated: Wed, 03 Jul 2002 17:11:08 GMT //browser/platform checker function duk_checkBrowser(){ this.ver=navigator.appVersion this.dom=document.getElementById?1:0; this.mac=(this.ver.indexOf("PPC")!= -1)?1:0; this.win=(this.ver.indexOf("Win")!= -1)?1:0; this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0; this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ie=(this.ie6 || this.ie5 || this.ie4); this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.ns=(this.ns4 || this.ns5); this.duk=(this.ie || this.ns); return this; } duk= new duk_checkBrowser(); // reload the window if Nav4 resized // function duk_reloadPage(init) { if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.duk_pgW=innerWidth; document.duk_pgH=innerHeight; onresize=duk_reloadPage; }} else if (innerWidth!=document.duk_pgW || innerHeight!=document.duk_pgH) location.reload(); } duk_reloadPage(true); //if(!duk.duk) location.href='sorry.html' function duk_doc_size(){ //Page positions - needed! this.x=0;this.x2=duk.ie && document.body.offsetWidth-5||innerWidth||0; this.y=0;this.y2=duk.ie && document.body.offsetHeight-5||innerHeight||0; if(!this.x2||!this.y2) return message('Document has no width or height') this.x50=this.x2/2; this.y50=this.y2/2; this.x10=(this.x2*10)/100;this.y10=(this.y2*10)/100 return this; } function duk_message(txt){ //Error feedback function alert(txt) return false } //Default duk functions function duk_obj(obj,nest){ function duk_moveIt(x,y){ //Move to a spesified position this.x=x; this.y=y if ((duk.mac)&&(duk.ie)){ this.css.left = x+'px'; this.css.top = y +'px'; }else{ this.css.left = x; this.css.top = y; } } function duk_moveBy(x,y){ //Move by a spesified number of pixels this.moveIt(this.x+x,this.y+y) } function duk_showIt(){ //Show a layer this.css.visibility="visible" } function duk_hideIt(){ //Hide a layer this.css.visibility="hidden" } function duk_bg(color){ //Changing backgroundcolor if(duk.dom || duk.ie4) this.css.backgroundColor=color else if(duk.ns4) this.css.bgColor=color } function duk_writeIt(text,startHTML,endHTML){ //Writing new content to a layer if(duk.ns4){ if(!startHTML){startHTML=""; endHTML=""} this.ref.open("text/html"); this.ref.write(startHTML+text+endHTML); this.ref.close() }else this.evnt.innerHTML=text //NOTE: This only works on Explorer4+5 and Gecko M16+ } function duk_clipTo(t,r,b,l,setwidth){ //Clip to a spesified setting this.ct=t; this.cr=r; this.cb=b; this.cl=l if(duk.ns4){ this.css.clip.top=t;this.css.clip.right=r this.css.clip.bottom=b;this.css.clip.left=l }else{ if(t<0)t=0;if(r<0)r=0;if(b<0)b=0;if(b<0)b=0 this.css.clip="rect("+t+","+r+","+b+","+l+")"; if(setwidth){this.css.width=r; this.css.height=b} } } function duk_clipBy(t,r,b,l,setwidth){ //Clip by a spesified number of pixels this.clipTo(this.ct+t,this.cr+r,this.cb+b,this.cl+l,setwidth) } if(!duk.duk) return message('Old browser') this.evnt=duk.dom && document.getElementById(obj)||duk.ie4 && document.all[obj]|| (nest?duk.ns4 && document[nest].document[obj]:duk.ns4 && document.layers[obj]); if(!this.evnt) return duk_message('The layer does not exist ('+obj+') - exiting script\n\nIf you are using Netscape please check the nesting of your tags!') this.css=duk.dom||duk.ie4?this.evnt.style:this.evnt; this.ref=duk.dom||duk.ie4?document:this.css.document; this.x=this.css.left||this.css.pixelLeft||this.evnt.offsetLeft||0 this.y=this.css.top||this.css.pixelTop||this.evnt.offsetTop||0 this.w=this.ref.width||this.evnt.offsetWidth||this.css.pixelWidth||0 this.h=this.ref.height||this.evnt.offsetHeight||this.css.pixelHeight||0 this.moveIt=duk_moveIt; this.moveBy=duk_moveBy; this.showIt=duk_showIt; this.hideIt=duk_hideIt; this.writeIt=duk_writeIt; this.bg=duk_bg; this.down=goDown; //Clip values this.c=0 if((duk.dom || duk.ie4) && this.css.clip) { this.c=this.css.clip; this.c=this.c.slice(5,this.c.length-1); this.c=this.c.split(' '); for(var i=0;i<4;i++){this.c[i]=parseInt(this.c[i])} } this.ct=this.css.clip.top||this.c[0]||0; this.cr=this.css.clip.right||this.c[1]||this.w||0 this.cb=this.css.clip.bottom||this.c[2]||this.h||0; this.cl=this.css.clip.left||this.c[3]||0 this.clipTo=duk_clipTo; this.clipBy=duk_clipBy; this.obj = obj + "Object"; eval(this.obj + "=this") return this } var pauseTimer = 0; function goDown(move){ if (rollIt<=rollStop && !(rollIt == 0 && pauseTimer == 1)) { if(this.y>-conTent){ this.moveIt(0,this.y-move) if(loop) { timer = setTimeout(this.obj+".down("+move+")",speed); } rollIt=rollIt+1; } else if (this.y<=-conTent){ this.moveIt(0,-overflow); oText.down(move); } } else { noScroll(); setTimeout("scroll("+1+")",pause); } }