/*** 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://www.livingbreckenridge.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=23 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=12 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=1 oCMenu.level[1].offsetY=-1 oCMenu.level[1].arrow="images/controls/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','','  Properties','','','','','','','','') oCMenu.makeMenu('sub14','top1','  Best Buys','') oCMenu.makeMenu('sub140','sub14',' Residential','properties/?searchType=residential_r&limit=10&featured=1') oCMenu.makeMenu('sub141','sub14',' Land','properties/?searchType=land_r&limit=10&featured=1') oCMenu.makeMenu('sub142','sub14',' Commercial','properties/?searchType=commercial_r&limit=10&featured=1') oCMenu.makeMenu('sub12','top1','  Entire MLS','') oCMenu.makeMenu('sub121','sub12','  Residential','Search_the_MLS') oCMenu.makeMenu('sub122','sub12','  Land','Search_the_MLS_Land') oCMenu.makeMenu('sub123','sub12','  Commercial','Search_the_MLS_Commercial') oCMenu.makeMenu('sub124','sub12','  Partial Ownership','Search_the_MLS_Part') oCMenu.makeMenu('sub19','top1','  Special Offerings','properties/specials') oCMenu.makeMenu('sub1132','top1','  Buyers Tools and Tips','Buyers_Tips','','','','','','','','','','','') oCMenu.makeMenu('sub1133','top1','  Sellers Tools and Tips','Sellers_Tips','','','','','','','','','','','') oCMenu.makeMenu('sub172','top1','  Map','Map','','','','','','','','','','','') oCMenu.makeMenu('top2','','  Community','','','','','','','','') oCMenu.makeMenu('sub2207','top2','  Breckenridge White Water Rafting','Breckenridge_White_Water_Rafting','','','','','','','','','','','') oCMenu.makeMenu('sub2206','top2','  Breckenridge Spas','Breckenridge_Spas','','','','','','','','','','','') oCMenu.makeMenu('sub2204','top2','  Breckenridge Schools','Breckenridge_Schools','','','','','','','','','','','') oCMenu.makeMenu('sub2202','top2','  Breckenridge Interior Designers','Breckenridge_Interior_Designers','','','','','','','','','','','') oCMenu.makeMenu('sub2201','top2','  Breckenridge Home Builders','Breckenridge_Home_Builders','','','','','','','','','','','') oCMenu.makeMenu('sub2200','top2','  Breckenridge History','Breckenridge_History','','','','','','','','','','','') oCMenu.makeMenu('sub2197','top2','  Breckenridge Churches','Breckenridge_Churches','','','','','','','','','','','') oCMenu.makeMenu('sub2210','top2','  Living Breckenridge','Living_Breckenridge','','','','','','','','','','','') oCMenu.makeMenu('sub258','top2','  Mountain Cams','mountain_cams','','','','','','','','','','','') oCMenu.makeMenu('sub259','top2','  Weather','weather','','','','','','','','','','','') oCMenu.makeMenu('top3','','  Market','','','','','','','clLevel0over','') oCMenu.makeMenu('sub364','top3','  Sales Statistics','Sales_Statistics','','','','','','','','','','','') oCMenu.makeMenu('sub3211','top3','  Investors','Investors','','','','','','','','','','','') oCMenu.makeMenu('sub32','top3','  FAQs','FAQs','','','','','','','','','','','') oCMenu.makeMenu('top5','','  About','','','','','','','','') oCMenu.makeMenu('sub5209','top5','  Testimonials','Testimonials','','','','','','','','','','','') oCMenu.makeMenu('sub5134','top5','  The Cheryl Love Team','The_Cheryl_Love_Team','','','','','','','','','','','') oCMenu.makeMenu('sub5131','top5','  Site Map','Site_Map','','','','','','','','','','','') oCMenu.makeMenu('sub561','top5','  Contact Us','Contact_Us','','','','','','','','','','','') oCMenu.makeMenu('sub598','top5','  Privacy Policy','Privacy_Policy','','','','','','','','','','','') oCMenu.makeMenu('sub562','top5','  Real Estate News','News','','','','','','','','','','','') // JavaScript Document oCMenu.makeMenu('top7','','Keeper  ','','','100','','','','','','') oCMenu.makeMenu('sub71','top7',' About','About_Keeper','','','','','','','','') oCMenu.makeMenu('sub72','top7',' Sign Up','Sign_Up','','','','','','','','') oCMenu.makeMenu('sub73','top7',' Login','login','','','','','','','','') // 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]) pos = findPos(5) oCMenu.m["top5"].b.moveIt(pos[0],pos[1]) // JavaScript Document pos = findPos(7) oCMenu.m["top7"].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()"