/****************************************** 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 && selycmpage.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; if ( x < cmpage.x ) { x += cmpage.x-x; } else { if ( x + w > cmpage.x2 ) { x = -( x + w - cmpage.x2 ); } else { if ( y< cmpage.y ) { y = cmpage.y - y; } else { if ( h + y > cmpage.y2 ) { y = -( y + h - cmpage.y2 ); } } } } b.moveIt(x,y); } // B. Mergner 07.07.04 // Hier muß etwas gepfuscht werden um den Umbruch nach Links am Rechten Rand sauber hinzubekommen // TODO: // - Die "Hart" reingeschriebenen Werte für y = 106 und x -= 154 noch parametrisierbar machen. CSS? // if ( pm.align == 2 ) { if ( this.l[l-1].offsetX == -1 ) // wenn wir uns in der Top-Navi (der horizontalen) befinden { x = pm.b.x - (w / 2); // X-Positionsfehler korrigieren y = pm.b.y + 21; // Y-Positionsfehler korrigieren } else // in allen anderen Navigationsebenen { x -= 212; // !!! Links Offset für Stoko !!! muß der richtige Offset nach Links abgezogen werden. (154) } } b.moveIt(x,y); /* alert("pagecheckBM( " + b + ", " + pm + ", " + x + ", " + y + ", " + w + ", " + h + ", " + n +" )\n\n" + "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 + " );\n\n" + "Alignment: " + pm.align + "\n" + "this.l[l-1].offsetX: " + this.l[l-1].offsetX + "\n\n" + "w : " + w + "\n" + "h : " + h + "\n\n" + "pm.subx : " + pm.subx + "\n" + "pm.suby : " + pm.suby + "\n\n" + "cmpage.x : " + cmpage.x + "\n" + "cmpage.y : " + cmpage.y + "\n\n" + "cmpage.x2: " + cmpage.x2+ "\n" + "cmpage.y2: " + cmpage.y2+ "\n\n" + "x : " + x + "\n" + "y : " + y + "\n\n" + ""); */ } /****************************************** 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) } /****************************************** 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