/*** This is the menu creation code - place it right after you body tag Feel free to add this to a stand-alone js file and link it to your page. **/ //Extra code to find position: function findPos1(){ if(bw.ns4){ //Netscape 4 x = document.layers.layerMenu1.pageX y = document.layers.layerMenu1.pageY }else{ //other browsers x=0; y=0; var el,temp el = bw.ie4?document.all["divMenu1"]:document.getElementById("divMenu1"); if(el.offsetParent){ temp = el while(temp.offsetParent){ //Looping parent elements to get the offset of them as well temp=temp.offsetParent; x+=temp.offsetLeft y+=temp.offsetTop; } } x+=el.offsetLeft y+=el.offsetTop } //Returning the x and y as an array return [x,y] } pos = findPos1() //Menu object creation oCMenu1=new makeCM("oCMenu1") //Making the menu object. Argument: menuname //Netscape 4 - bug fix - //maybe -stupid NS4 - objects are not handled correctly when //the object creator is in a linked file if(bw.ns4) if(!oCMenu1["makeMenu"] || !bw["ns4"]) self.location.reload() oCMenu1.frames = oCMenu1.frameStartLevel = //Menu properties oCMenu1.pxBetween= oCMenu1.fromLeft=pos[0]+ oCMenu1.fromTop=pos[1]+ //We also need to "re place" the menu on resize. So: oCMenu1.onresize="pos1 = findPos1(); oCMenu1.fromLeft=pos1[0]+; oCMenu1.fromTop=pos1[1]+; oCMenu1.barX=pos1[0]; oCMenu1.barY=pos1[1];" //oCMenu1.onresize="location.href=location.href" oCMenu1.rows= oCMenu1.menuPlacement= "" oCMenu1.offlineRoot= "" oCMenu1.onlineRoot= "" oCMenu1.resizeCheck= oCMenu1.wait= oCMenu1.fillImg="includes/empty.gif" oCMenu1.zIndex= //Background bar properties oCMenu1.useBar= oCMenu1.barWidth="" oCMenu1.barHeight="" oCMenu1.barClass="cl1Bar" oCMenu1.barX=pos[0]+ oCMenu1.barY=pos[1]+ oCMenu1.barBorderX= oCMenu1.barBorderY= //oCMenu1.barBorderClass="cl1Barborder" //myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) //hide selectboxes if(bw.dom&&!bw.op){ makeCM.prototype.sel=0 makeCM.prototype.onshow+=";this.hideselectboxes(pm,pm.subx,pm.suby,maxw,maxh,pm.lev)" makeCM.prototype.hideselectboxes=function(pm,x,y,w,h,l){ var selx,sely,selw,selh,i if(!this.sel){ this.sel=this.doc.getElementsByTagName("SELECT") this.sel.level=0 } var sel=this.sel for(i=0;ix && selxy && selyc.fromTop&&c.scrollstop){ for(i=0;ic.bar.x?c.bar.x:c.m[c.l[0].m[0]].b.x:c.m[c.l[0].m[0]].b.x; var y = c.useBar?c.m[c.l[0].m[0]].b.y>c.bar.y?c.bar.y:c.m[c.l[0].m[0]].b.y:c.m[c.l[0].m[0]].b.y; var maxw = c.useBar?c.bar.w:c.rows?c.totw:c.maxw; var maxh = c.useBar?c.bar.h:!c.rows?c.toth:c.maxh c.hideselectboxes(0,x,y,maxw,maxh,0) } } if(!bw.ie) setTimeout(c.name+".checkscrolled()",200) }