oM=new makeCM("oM"); /*Menu properties*/ oM.pxBetween=5; oM.fromTop=103; oM.fromLeft=86; oM.wait=300; oM.resizeCheck=1; oM.zIndex=400; oM.onlineRoot="/"; oM.rows=1; oM.offlineRoot="file:///C|/My%20Web%20Sites/EAS/design/"; oM.fillImg="nav_images/cm_fill.gif"; /*Level properties*/ oM.level[0]=new cm_makeLevel(100,16,"clT","clTover",1,1,"clTB",0,"bottom",0,0,0,0,0); oM.level[1]=new cm_makeLevel(150,30,"clS","clSover",1,1,"clB",0,"right",0,0,"nav_images/menu_arrow.gif",10,10); oM.level[2]=new cm_makeLevel(150,30); oM.level[3]=new cm_makeLevel(150,30); /*Background bar properties*/ oM.useBar=0; oM.barWidth="100%"; oM.barHeight="24"; oM.barX="80"; oM.barY="menu"; oM.barClass="clBar"; oM.barBorderX=0; oM.barBorderY=0; /*Item properties*/ /*oM.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout)*/ oM.makeMenu('m1','m0','Home','index.php?page_id=1'); oM.makeMenu('m81','m0','General Information',''); oM.makeMenu('m83','m81','About Fuel Poverty','index.php?page_id=83'); oM.makeMenu('m142','m81','Grants / Schemes Information','index.php?page_id=142'); oM.makeMenu('m143','m81','About Us','index.php?page_id=143'); oM.makeMenu('m79','m81','Become a Member','index.php?page_id=79'); oM.makeMenu('m7','m81','Contact Us','index.php?page_id=7'); oM.makeMenu('m94','m81','Links','index.php?page_id=94'); oM.makeMenu('m52','m0','Current Issues',''); oM.makeMenu('m146','m52','Consumer Advocacy Issues','index.php?page_id=146'); oM.makeMenu('m92','m52','Fuel Poverty Policy','index.php?page_id=92'); oM.makeMenu('m135','m52','Fuel Poverty Schemes','index.php?page_id=135'); oM.makeMenu('m147','m52','Fuel Poverty Review','index.php?page_id=147'); oM.makeMenu('m144','m52','Fuel Poverty Data','index.php?page_id=144'); oM.makeMenu('m145','m52','Poverty in Scotland','index.php?page_id=145'); oM.makeMenu('m96','m52','UK Energy Policy','index.php?page_id=96'); oM.makeMenu('m134','m52','EU Energy Policy','index.php?page_id=134'); oM.makeMenu('m11','m0','Press & Responses',''); oM.makeMenu('m4','m11','Recent','index.php?page_id=4'); oM.makeMenu('m5','m11','Archived','index.php?page_id=5'); oM.makeMenu('m59','m0','Training',''); oM.makeMenu('m61','m59','General Information','index.php?page_id=61'); oM.makeMenu('m62','m59','EAS Accredited Courses','index.php?page_id=62'); oM.makeMenu('m63','m59','City and Guilds 6176 Energy Awareness Courses','index.php?page_id=63'); oM.makeMenu('m64','m59','Scottish Building Standards Compliance: Energy','index.php?page_id=64'); oM.makeMenu('m65','m59','National Home Energy Rating Courses','index.php?page_id=65'); oM.makeMenu('m66','m0','Events',''); oM.makeMenu('m68','m66','Events Diary','index.php?page_id=68'); oM.makeMenu('m67','m66','Ongoing Events','index.php?page_id=67'); oM.makeMenu('m80','m0','Publications','index.php?page_id=80'); var avail="86+((cmpage.x2-175)/6)"; oM.menuPlacement=new Array(86,avail+"*1-40",avail+"*2-13",avail+"*3+5",avail+"*4",avail+"*5-27",avail+"*6-65") /*oM.menuPlacement="left"*/ oM.construct() /****************************************** 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) }