/********************************************************************************** SideScrollMenu * Copyright (C) 2001 Thomas Brattli * This script was released at DHTMLCentral.com * Visit for more great scripts! * This may be used and changed freely as long as this msg is intact! * We will also appreciate any links you could give us. * * Made by Thomas Brattli and modified by Michael van Ouwerkerk *********************************************************************************/ // ......... Script adapte pour vertical à droite. var sLeft = 0; var sTop = 0; var sFlHaut = 24; var sArrowheight = 24; var sArrowwidth = 170; var sScrollspeed = 20; var sScrollPx = 8; var sScrollExtra = 15; var tim = 0; var noScroll = true; // ......... Scrolling functions function mTop(){if (!noScroll && oMenu.y-(oMenu.scrollHeight-(pageHeight))-sTop){ oMenu.moveBy(0,-sScrollPx); tim = setTimeout("mBot()",sScrollspeed)}} function noMove(){clearTimeout(tim); noScroll = true; sScrollPx = sScrollPxOriginal;} // ......... Refresh function mRef(oBg, oMenu, oArrowBot){ pageHeight = (bw.ns4 || bw.ns6 || window.opera)?innerHeight-24:document.body.offsetHeight; pageWidth = (bw.ns4 || bw.ns6 || window.opera)?innerWidth-24:document.body.offsetWidth; oBg.css.visibility = "hidden"; oBg.moveIt(pageWidth-sLeft-sArrowwidth,sTop) //Main div, holds all the other divs. oMenu.moveIt(null,sFlHaut); oArrowBot.css.height = sArrowheight; oArrowBot.moveIt(null,pageHeight-sTop-sArrowheight); if (!bw.ns4) oBg.css.overflow = "hidden"; if (bw.ns6) oMenu.css.position = "relative"; oBg.css.height = (pageHeight-sTop)+px; oBg.clipTo(0,sArrowwidth,pageHeight,0); oBg.css.visibility = "visible"; checkMenu(); } // ......... Construction function makeObj(obj,nest,menu){ nest = (!nest) ? "":'document.'+nest+'.'; this.elm = bw.ns4?eval(nest+"document.layers." +obj):bw.ie4?document.all[obj]:document.getElementById(obj); this.css = bw.ns4?this.elm:this.elm.style; this.scrollHeight = bw.ns4?this.css.document.height:this.elm.offsetHeight; this.x = bw.ns4?this.css.left:this.elm.offsetLeft; this.y = bw.ns4?this.css.top:this.elm.offsetTop; this.moveBy = b_moveBy; this.moveIt = b_moveIt; this.clipTo = b_clipTo; return this; } var px = bw.ns4||window.opera?"":"px"; function b_moveIt(x,y){if (x!=null){this.x=x; this.css.left=this.x+px;} if (y!=null){this.y=y; this.css.top=this.y+px;}} function b_moveBy(x,y){this.x=this.x+x; this.y=this.y+y; this.css.left=this.x+px; this.css.top=this.y+px;} function b_clipTo(t,r,b,l){ if(bw.ns4){this.css.clip.top=t; this.css.clip.right=r; this.css.clip.bottom=b; this.css.clip.left=l;} else this.css.clip="rect("+t+"px "+r+"px "+b+"px "+l+"px)"; } // ......... Init var sScrollPxOriginal = sScrollPx; function sideInit(){ //Making the objects... oBg = new makeObj('divBg'); oMenu = new makeObj('divMenu','divBg',1); oArrowBot = new makeObj('divArrowBot','divBg'); //alignements divers.. mRef(oBg, oMenu, oArrowBot); } //executing the init function on pageload if the browser is ok. if (bw.bw) onload = sideInit;