/*** 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. **/ //Menu object creation oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname oCMenu.frames = 0 //Menu properties oCMenu.pxBetween=0 oCMenu.fromLeft=0 oCMenu.fromTop=194 oCMenu.rows=0 oCMenu.menuPlacement=0 oCMenu.offlineRoot="" oCMenu.onlineRoot="http://stoneforensics.com/" oCMenu.resizeCheck=1 oCMenu.wait=1000 oCMenu.fillImg="cm_fill.gif" oCMenu.zIndex=100 //Background bar properties oCMenu.useBar=0 oCMenu.barWidth="100%" oCMenu.barHeight="menu" oCMenu.barClass="clBar" oCMenu.barX=0 oCMenu.barY=0 oCMenu.barBorderX=0 oCMenu.barBorderY=0 oCMenu.barBorderClass="" //Background bar properties oCMenu.useBar=0 //Level properties - ALL properties have to be spesified in level 0 oCMenu.level[0]=new cm_makeLevel() //Add this for each new level oCMenu.level[0].width=133 oCMenu.level[0].height=26 oCMenu.level[0].regClass="clLevel0" oCMenu.level[0].overClass="clLevel0over" oCMenu.level[0].borderX=0 oCMenu.level[0].borderY=0 oCMenu.level[0].borderClass="clLevel0border" oCMenu.level[0].offsetX=1 oCMenu.level[0].offsetY=0 oCMenu.level[0].rows=0 oCMenu.level[0].align="bottom" oCMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number) oCMenu.level[1].width=180 oCMenu.level[1].height=23 oCMenu.level[1].regClass="clLevel1" oCMenu.level[1].overClass="clLevel1over" oCMenu.level[1].borderX=0 oCMenu.level[1].borderY=1 oCMenu.level[1].align="right" oCMenu.level[1].offsetX=0 oCMenu.level[1].offsetY=0 oCMenu.level[1].arrow="images/elements/menu_arrow.gif" oCMenu.level[1].arrowWidth=7 oCMenu.level[1].arrowHeight=7 oCMenu.level[1].borderClass="clLevel1border" /****************************************** Menu item creation: myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) *************************************/ oCMenu.makeMenu('top0','','  home  ','Home','','','','','','','','') oCMenu.makeMenu('top1','','  services','','','','','','','','') oCMenu.makeMenu('sub12','top1','  FAQs','faqs') oCMenu.makeMenu('sub1247','top1','  services','services','','','','','','','','','','','') oCMenu.makeMenu('top2','','  projects','','','','','','','','') oCMenu.makeMenu('sub23','top2','  case studies','') oCMenu.makeMenu('sub23265','sub23','  Owners representation stone installation','Owners_representation_stone_installation','','250','','','','','','','','','') oCMenu.makeMenu('sub23264','sub23','  Installation Specifications for stone','Installation_Specifications_for_stone','','250','','','','','','','','','') oCMenu.makeMenu('sub23260','sub23','  Going Green Sustainablitly','Going_Green__Sustainablitly','','250','','','','','','','','','') oCMenu.makeMenu('sub23263','sub23','  Stone Expert for legal case','Stone_Expert_for_legal_case','','250','','','','','','','','','') oCMenu.makeMenu('sub23262','sub23','  Restoration of Tennessee Pink marble','Restoration_of_Tennessee_Pink_marble','','250','','','','','','','','','') oCMenu.makeMenu('sub23261','sub23','  Church baptismal marble repair','Chruch_baptismal_marble_repair','','250','','','','','','','','','') oCMenu.makeMenu('sub23252','sub23','  Airport - Cracking limestone tiles','case-study-003','','250','','','','','','','','','') oCMenu.makeMenu('sub23251','sub23','  Discoloration (rust) granite flooring','case-study-002','','250','','','','','','','','','') oCMenu.makeMenu('sub23255','sub23','  Marble Water Fountain Deterioration','case-study-004','','250','','','','','','','','','') oCMenu.makeMenu('sub23256','sub23','  Terrazzo Expansion Joint','Case_Study_005_Terrazzo_Expansion_joint','','250','','','','','','','','','') oCMenu.makeMenu('sub23259','sub23','  Ager Enhancer Stain','Ager_enhancer_stain','','250','','','','','','','','','') oCMenu.makeMenu('sub2248','top2','  projects','projects','','','','','','','','','','','') oCMenu.makeMenu('top3','','  contact','Contact','','','','','','','') oCMenu.makeMenu('top4','','  about','','','','','','','','') oCMenu.makeMenu('sub4a1','top4','  whats new','News') oCMenu.makeMenu('sub4228','top4','  about','About','','','','','','','','','','','') oCMenu.makeMenu('sub4246','top4','  our team','our_team','','','','','','','','','','','') oCMenu.makeMenu('sub4131','top4','  site map','Site_Map','','','','','','','','','','','') oCMenu.makeMenu('sub4224','top4','  privacy policy','Privacy_Policy','','','','','','','','','','','') // JavaScript Document //Leave this line - it constructs the menu oCMenu.construct() //Extra code to find position: function findPos(num){ if(bw.ie3){ }else{ //alert(num) if(bw.ns4){ //Netscape 4 x = document.layers["layerMenu"+num].pageX y = document.layers["layerMenu"+num].pageY }else{ //other browsers x=0; y=0; var el,temp el = bw.ie4?document.all["Menu"+num]:document.getElementById("Menu"+num); el = bw.ie5?document.all["Menu"+num]:document.getElementById("Menu"+num); el = bw.ie6?document.all["Menu"+num]:document.getElementById("Menu"+num); el = bw.ie7?document.all["Menu"+num]:document.getElementById("Menu"+num); if(!bw.ie){ 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] } function placeElements(){ //Changing the position of ALL top items: pos = findPos(0) oCMenu.m['top0'].b.moveIt(pos[0],pos[1]) pos = findPos(1) oCMenu.m["top1"].b.moveIt(pos[0],pos[1]) pos = findPos(2) oCMenu.m["top2"].b.moveIt(pos[0],pos[1]) pos = findPos(3) oCMenu.m["top3"].b.moveIt(pos[0],pos[1]) pos = findPos(4) oCMenu.m["top4"].b.moveIt(pos[0],pos[1]) // JavaScript Document //Setting the fromtop value oCMenu.fromTop = pos[1] } placeElements() //Setting it to re place the elements after resize - the resize is not perfect though.. oCMenu.onafterresize="placeElements()"