/********************************************************************************** FoldoutMenu2 * 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 *********************************************************************************/ function lib_bwcheck(){ //Browsercheck (needed) this.ver=navigator.appVersion this.agent=navigator.userAgent this.dom=document.getElementById?1:0 this.opera5=this.agent.indexOf("Opera 5")>-1 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0; this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0; this.ie8=(this.ver.indexOf("MSIE 8")>-1 && this.dom && !this.opera5)?1:0; this.ie4=(document.all && !this.dom && !this.opera5)?1:0; this.ie=this.ie4||this.ie5||this.ie6||this.ie7||this.ie8 this.mac=this.agent.indexOf("Mac")>-1 this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie8 || this.ie7 || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5) return this } var bw=new lib_bwcheck() if(document.layers){ //NS4 resize fix... scrX= innerWidth; scrY= innerHeight; onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} } } if(navigator.userAgent.indexOf('Opera')>-1 && document.getElementById){ //Opera 5 resize fix. scrX= innerWidth; scrY= innerHeight; document.onmousemove= function(){ if(scrXinnerWidth+10 || scrY>innerHeight+10){ scrX = innerWidth; scrY = innerHeight; foldInit(); } }; } /************************************************************************************ This is the new foldoutmenu, with more levels! This is in some ways a rather advanced menu so please read every note in this script and in the comments in the page to understand how it works. NOTE: if you change the position of divFoldCont from absolute to relative, you can put the menu in a table. HOWEVER it will no longer work in netscape 4. If you wish to support netscape 4, you have to use absolute positioning. ************************************************************************************/ //Do you want images (if not set to 0 and remove the images from the body)? foldImg=1 //Here are the images for the top links. foldinImg=new Image(); foldinImg.src="/C1256ED600446B80/foldoutmenu2_arrow.gif" //The image for the closed state. foldoutImg=new Image(); foldoutImg.src="/C1256ED600446B80/foldoutmenu2_arrow_open.gif" //The image for the open state. //Here are the images for the sub links. foldsubinImg=new Image(); foldsubinImg.src="/C1256ED600446B80/foldoutmenu2_arrow.gif" //The image for the "in" state. foldsuboutImg=new Image(); foldsuboutImg.src="/C1256ED600446B80/foldoutmenu2_arrow_open.gif" //The image for the "out" state. //If you change the images above please remember to change the images in the actual page as well. // add by mni start foldsubinImgLink=new Image(); foldsubinImgLink.src="/C1256ED600446B80/branch.gif" foldsubinImgNotLink=new Image(); foldsubinImgNotLink.src="/C1256ED600446B80/foldoutmenu2_arrow2.gif" foldsuboutImgNotLink=new Image(); foldsuboutImgNotLink.src="/C1256ED600446B80/foldoutmenu2_arrow_open2.gif" function openMenuPunkt(varTopPunkt,varSubPunkt){ if (varTopPunkt != ''){ foldmenu(varTopPunkt); if (varSubPunkt != ''){ subfoldmenu(varTopPunkt,varSubPunkt); } } } pxbetweenmain = 0 //How much space should there be between the main menus - eSphere 05.08.04 pxbetweensub = 0 //How much space should there be between the sub menus mainstayfolded = false //Should the main menus stay folded? substayfolded = false //Should the sub menus stay folded? Play with these 2 variables. /************************************************************************************ Making cross-browser objects ************************************************************************************/ function makeMenu(obj,nest){ nest=(!nest) ? "":'document.'+nest+'.'; this.css= bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0; this.elm= bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; this.ref= bw.dom || bw.ie4? document:bw.ns4?eval(nest+"document.layers." +obj+".document"):0; this.x= bw.ns4?this.css.left:bw.opera5?this.css.pixelLeft:this.elm.offsetLeft; this.y= bw.ns4?this.css.top:bw.opera5?this.css.pixelTop:this.elm.offsetTop; this.height= bw.ns4?this.ref.height:bw.opera5?this.css.pixelHeight:this.elm.offsetHeight; this.hideIt= b_hideIt; this.showIt= b_showIt; this.moveIt= b_moveIt; this.status= 0; return this; } // A unit of measure that will be added when setting the position of a layer. var px = bw.ns4||window.opera?"":"px"; function b_showIt(){this.css.visibility="visible"; this.status=1} function b_hideIt(){this.css.visibility="hidden"; this.status=0} function b_moveIt(x,y){this.x=x; this.y=y; /*this.css.left=this.x+px;*/ this.css.top=this.y+px;} /************************************************************************************ Initiating the page and making the menu ************************************************************************************/ function foldInit(){ mainmenus= counter + 1; submenus = liste; //Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!! bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false if (bw.opera5) bw.ns6 = 0 //Creating the foldoutmenu oFold = new Array(); y = 0; for (var i=0; i 0 && !oFold[num].sub[0].status) { oFold[num].subs(1,num); //oFold[num].css.background = '#DBD5B0'; // i-Seven 25.11.2004 } else { oFold[num].subs(0,num); //oFold[num].css.background = 'transparent'; // i-Seven 25.11.2004 } checkheight(num) } //Initiating the menus onload, if the browser is ok. if(bw.bw) onload = foldInit;