/****************************************** CM_ADD-IN - hideselectboxes (last updated: 11/13/02) IE5+ and NS6+ only - ignores the other browsers Because of the selectbox bug in the browsers that makes selectboxes have the highest z-index whatever you do this script will check for selectboxes that interfear with your menu items and then hide them. Just add this code to the coolmenus js file or link the cm_addins.js file to your page as well. *****************************************/ 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) } /****************************************** CM_ADD-IN - pagecheck (last updated: 08/02/02) Simple code that *tries* to keep the menus inside the bounderies of the page. Code updated. It's still not perfect (obviosly) but it will now do another check to try and place the menus inside. Just add this code to the coolmenus js file or link the cm_addins.js file to your page. *****************************************/ makeCM.prototype.onshow+=";this.pagecheck(b,pm,pm.subx,pm.suby,maxw,maxh)" makeCM.prototype.pagecheck=function(b,pm,x,y,w,h,n){ var l=pm.lev+1,a=b.align; if(!n) n=1 var ok=1 if(xcmpage.x2){ pm.align=2; ok=0;} else if(ycmpage.y2) {pm.align=4; ok=0;} if(!ok) this.getcoords(pm,this.l[l-1].borderX,this.l[l-1].borderY,pm.b.x,pm.b.y,w,h,this.l[l-1].offsetX,this.l[l-1].offsetY) x=pm.subx; y=pm.suby //Added check --- still not ok? --- part of the code by Denny Caldwell (thanks) -- badly immplemented by me though if(xcmpage.x2){ x = -(x+w-cmpage.x2);} else if(ycmpage.y2) {y = -(y+h-cmpage.y2);} if(xcmpage.x2){ x = -(x+w-cmpage.x2);} else if(ycmpage.y2) {y = -(y+h-cmpage.y2);} b.moveIt(x,y) } /****************************************** CM_ADD-IN - pagecheck (last updated: 01/26/02) Simple code that *tries* to keep the menus inside thebounderies of the page.A more advanced version of this code will come later. Just add this code to the coolmenus js fileor link the cm_addins. js file to your page as well. *****************************************/ //makeCM.prototype.onshow+=";this.pagecheck2(b,pm,x,y,maxw,maxh)" makeCM.prototype.pagecheck2=function(b,pm,x,y,w,h){ var fixX = 0 var fixY = 0 var ok=1 if(x+w>cmpage.x2) { ; ok=0; }else if(xcmpage.y2){ fixY = -(y+h-cmpage.y2); ok=0; }else if(y(end-px*px-px) && px>1) px-=px/5; this.moveIt(this.x,this.y+px) this.clipTo(end-this.y,this.w,this.h,0) this.tim=setTimeout(this.obj+".slide("+end+","+px+","+tim+","+c.name+","+l+",'"+name+"')",tim) }else{this.moveIt(this.x,end)} } /****************** CM_ADD-IN - clipout (last updated: 01/26/02) This works in all browsers, but it can be unstable on all other browsers then Explorer. This function shows the submenus with a clipping effect. If you use this add-in you get two new level properties called "clippx" and "cliptim". You have to specify this for the levels you want this to happen on (these properties will also be inherited though) "clippx" is the number of pixels you want the div to slide each setTimout, while "cliptim" is the setTimeout speed (in milliseconds) Example setting: oCMenu.level[3].clippx=10 oCMenu.level[3].cliptim=20 Just add this code to the coolmenus js file or link the cm_addins.js file to your page as well. *****************/ makeCM.prototype.onshow+="if(c.l[pm.lev].clippx){h=b.h; if(!rows) b.clipTo(0,maxw,0,0,1); else b.clipTo(0,0,maxh,0,1); b.clipxy=0; b.showIt(); clearTimeout(b.tim); b.clipout(c.l[pm.lev].clippx,!rows?maxw:maxh,!rows?maxh:maxw,c.l[pm.lev].cliptim,rows)}" cm_makeObj.prototype.tim=10; cm_makeLevel.prototype.clippx=null cm_makeLevel.prototype.cliptim=30 cm_makeObj.prototype.clipxy=0 cm_makeObj.prototype.clipout=function(px,w,stop,tim,rows){ if(!this.vis) return; if(this.clipxy