/********************************************************************************Copyright (C) 1999 Thomas BrattliThis script is made by and copyrighted to Thomas Brattli at www.bratta.com********************************************************************************// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)Browsercheck:*/ie=document.all?1:0n=document.layers?1:0//Do you want it to move with the page if the user scroll the page?var moveOnScroll=truenumberOfMenus=5//How many menus do you have//Do you want to hide all the other submenus when you click a new?var hideAll=true/********************************************************************************If you want to change the appearans on the text, or background or anythingdo that in the style tag above, or in the table tag below.The different event handling on the different browsers makes this a littletricky. I had to make all divs absolute positioned to make it work in netscape.So if you ad or remove menuitems please play with the % values of each divTopin the stylesheet. I have not had all that much luck with % placement beforein netscape so if you encounter any errors let me know and I'll see what I can do.********************************************************************************//********************************************************************************Object constructor********************************************************************************/function makeMenuBar(obj,nest,vis){    nest=(!nest) ? '':'document.'+nest+'.'    this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style')	this.hideIt=b_hideIt;	this.showIt=b_showIt						if(ie && vis) this.css.visibility='hidden'	this.evnt=(n)? eval(nest+'document.'+obj):eval(obj);		this.go=0	this.height=n?this.css.document.height:eval(obj+'.offsetHeight')	this.top=b_gettop    this.obj = obj + "Object"; 	eval(this.obj + "=this")	}//Get's the top position.function b_gettop(){	var gleft=(n) ? eval(this.css.top):eval(this.css.pixelTop);	return gleft;}//The functions for showing and hidingfunction b_showIt(){	this.css.visibility="visible"}function b_hideIt(){	this.css.visibility="hidden"}/********************************************************************************Checking if the page is scrolled, if it is move the menu after********************************************************************************/function checkScrolled(){	if(!oMenu.go)oMenu.css.top=(!oMenu.state)?eval(scrolled):eval(scrolled)	if(n) setTimeout('checkScrolled()',30)}/********************************************************************************Inits the page, makes the menu object, moves it to the right place, show it..********************************************************************************/function menuBarInit(){	oSub=new Array()	oTop=new Array()	for(i=0;i<numberOfMenus;i++){		oTop[i]=new makeMenuBar('divTop'+i,'divBg')		oSub[i]=new makeMenuBar('divSub'+i,'divBg.document.divTop'+i,1)		oSub[i].evnt.onmouseout=evOut;	}	//Moving menuBar	oMenu=new makeMenuBar('divBg')	scrolled=n?"window.pageYOffset":"document.body.scrollTop"	oMenu.css.top=eval(scrolled)	oMenu.css.visibility='visible'	if(moveOnScroll) ie?window.onscroll=checkScrolled:checkScrolled();}/********************************************************************************Shows and hides the submenus********************************************************************************/function evOut(){	if(ie)this.style.visibility='hidden'	else if(n) this.visibility='hidden'}//Canceling event bubbling in iefunction ieShow(num){	if(ie){		oSub[num].showIt()		window.event.cancelBubble=true	}}function extract(num){	if(hideAll){		for(i=0;i<oSub.length;i++){			if(num!=i) oSub[i].hideIt()		}	}	oSub[num].showIt();}onload=menuBarInit;