/*** 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 //Menu properties oCMenu.pxBetween=0 //Using the cm_page object to place the menu ---- oCMenu.fromLeft=0 oCMenu.fromTop=0 oCMenu.rows=1 oCMenu.menuPlacement=0 oCMenu.offlineRoot="" oCMenu.onlineRoot="" oCMenu.resizeCheck=1 oCMenu.wait=1000 oCMenu.fillImg="images/spacer.gif" oCMenu.zIndex=0 //Background bar properties oCMenu.useBar=0 //Level properties - ALL properties have to be spesified in level 1 oCMenu.level[0]=new cm_makeLevel() //Add this for each new level oCMenu.level[0].width=174 oCMenu.level[0].height=32 oCMenu.level[0].regClass="clLevel1" oCMenu.level[0].overClass="clLevel1over" oCMenu.level[0].borderX=0 oCMenu.level[0].borderY=0 oCMenu.level[0].borderClass="clLevel1border" oCMenu.level[0].offsetX=0 oCMenu.level[0].offsetY=0 oCMenu.level[0].rows=0 oCMenu.level[0].arrow="images/arrow.gif" oCMenu.level[0].arrowWidth=0 oCMenu.level[0].arrowHeight=0 oCMenu.level[0].align="right" oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)" //Level properties - ALL properties have to be spesified in level 2 oCMenu.level[1]=new cm_makeLevel() //Add this for each new level oCMenu.level[1].width=200 oCMenu.level[1].height=25 oCMenu.level[1].regClass="clLevel2" oCMenu.level[1].overClass="clLevel2over" oCMenu.level[1].borderX=-1 oCMenu.level[1].borderY=1 oCMenu.level[1].borderClass="clLevel2border" oCMenu.level[1].offsetX=-1 oCMenu.level[1].offsetY=-1 oCMenu.level[1].rows=0 oCMenu.level[1].arrow="images/arrow.gif" oCMenu.level[1].arrowWidth=0 oCMenu.level[1].arrowHeight=0 oCMenu.level[1].align="right" oCMenu.level[1].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)" //Level properties - ALL properties have to be spesified in level 3 oCMenu.level[2]=new cm_makeLevel() //Add this for each new level oCMenu.level[2].width=200 oCMenu.level[2].height=25 oCMenu.level[2].regClass="clLevel3" oCMenu.level[2].overClass="clLevel3over" oCMenu.level[2].borderX=1 oCMenu.level[2].borderY=1 oCMenu.level[2].borderClass="clLevel3border" oCMenu.level[2].offsetX=-1 oCMenu.level[2].offsetY=-1 oCMenu.level[2].rows=0 oCMenu.level[2].arrow="images/arrow.gif" oCMenu.level[2].arrowWidth=0 oCMenu.level[2].arrowHeight=0 oCMenu.level[2].align="right" oCMenu.level[2].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)" //Level properties - ALL properties have to be spesified in level 4 oCMenu.level[3]=new cm_makeLevel() //Add this for each new level oCMenu.level[3].width=200 oCMenu.level[3].height=25 oCMenu.level[3].regClass="clLevel4" oCMenu.level[3].overClass="clLevel4over" oCMenu.level[3].borderX=1 oCMenu.level[3].borderY=1 oCMenu.level[3].borderClass="clLevel4border" oCMenu.level[3].offsetX=-1 oCMenu.level[3].offsetY=-1 oCMenu.level[3].rows=0 oCMenu.level[3].arrow="images/arrow.gif" oCMenu.level[3].arrowWidth=0 oCMenu.level[3].arrowHeight=0 oCMenu.level[3].align="bottom" oCMenu.level[3].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)" /****************************************** Menu item creation: myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass, align, rows, nolink, onclick, onmouseover, onmouseout) *************************************/ // Level1 (id=92) - Home (no parent) oCMenu.makeMenu('920','',"Home",'http://www.marinelife.org/index.htm','_self','','','','','','','','','','','','') // Level1 (id=352) - Track Sea Turtles! (no parent) oCMenu.makeMenu('3520','',"Track Sea Turtles!",'http://www.marinelife.org/track_turtles.htm','_self','','','','','','','','','','','','') // Level1 (id=191) - Newsroom (no parent) oCMenu.makeMenu('1910','',"Newsroom",'http://www.marinelife.org/newsroom','_self','','','','','','','','','','','','') // Level2 (id=331) - 2009 Annual Report (parent of Level1 (id=191) - Newsroom) oCMenu.makeMenu('3310191','1910','2009 Annual Report','https://www.trustedpartner.com/docs/library/000187/LMC_annual_report09(web).pdf','_blank','','25','','','','','','','','','','') // Level2 (id=332) - 5-Year Strategic Plan (parent of Level1 (id=191) - Newsroom) oCMenu.makeMenu('3320191','1910','5-Year Strategic Plan','https://www.trustedpartner.com/docs/library/000187/Strategic%20Plan%20New%20from%20QuarkSmall.pdf','_blank','','25','','','','','','','','','','') // Level2 (id=333) - 2008 Annual Report (parent of Level1 (id=191) - Newsroom) oCMenu.makeMenu('3330191','1910','2008 Annual Report','https://www.trustedpartner.com/docs/library/000187/marinelife%20annual%202008.pdf','_blank','','25','','','','','','','','','','') // Level1 (id=314) - Site Map (no parent) oCMenu.makeMenu('3140','',"Site Map",'http://www.marinelife.org/sitemap','_self','','','','','','','','','','','','') // Level1 (id=315) - Go Blue Awards (no parent) oCMenu.makeMenu('3150','',"Go Blue Awards",'http://www.marinelife.org/goblueawards','_self','','','','','','','','','','','','') // Level1 (id=241) - Plan a Visit (no parent) oCMenu.makeMenu('2410','',"Plan a Visit",'http://www.marinelife.org/planavisit','_self','','','','','','','','','','','','') // Level2 (id=242) - Sea Turtle Hospital (parent of Level1 (id=241) - Plan a Visit) oCMenu.makeMenu('2420241','2410','Sea Turtle Hospital','http://www.marinelife.org/seaturtleyard','_self','','25','','','','','','','','','','') // Level2 (id=38) - Hours and Location (parent of Level1 (id=241) - Plan a Visit) oCMenu.makeMenu('380241','2410','Hours and Location','http://www.marinelife.org/location.htm','_self','','25','','','','','','','','','','') // Level2 (id=243) - Exhibits (parent of Level1 (id=241) - Plan a Visit) oCMenu.makeMenu('2430241','2410','Exhibits','http://www.marinelife.org/Exhibits','_self','','25','','','','','','','','','','') // Level2 (id=245) - Gift Shop (parent of Level1 (id=241) - Plan a Visit) oCMenu.makeMenu('2450241','2410','Gift Shop','http://www.marinelife.org/giftshop2','_self','','25','','','','','','','','','','') // Level1 (id=246) - Conservation (no parent) oCMenu.makeMenu('2460','',"Conservation",'http://www.marinelife.org/Conservation','_self','','','','','','','','','','','','') // Level2 (id=248) - Mission Statement (parent of Level1 (id=246) - Conservation) oCMenu.makeMenu('2480246','2460','Mission Statement','http://www.marinelife.org/missionstatement','_self','','25','','','','','','','','','','') // Level2 (id=37) - Leatherback Research (parent of Level1 (id=246) - Conservation) oCMenu.makeMenu('370246','2460','Leatherback Research','http://www.marinelife.org/leatherback_turtle_research.htm','_self','','25','','','','','','','','','','') // Level3 (id=36) - Leatherback Project (parent of Level2 (id=37) - Leatherback Research) oCMenu.makeMenu('360370246','370246','Leatherback Project','http://www.floridaleatherbacks.com/','_blank','','25','','','','','','','','','','') // Level2 (id=44) - Nesting Research (parent of Level1 (id=246) - Conservation) oCMenu.makeMenu('440246','2460','Nesting Research','http://www.marinelife.org/nesting_research.htm','_self','','25','','','','','','','','','','') // Level2 (id=249) - Green Certification (parent of Level1 (id=246) - Conservation) oCMenu.makeMenu('2490246','2460','Green Certification','http://www.marinelife.org/greencertification','_self','','25','','','','','','','','','','') // Level2 (id=250) - Conservation Partners (parent of Level1 (id=246) - Conservation) oCMenu.makeMenu('2500246','2460','Conservation Partners','http://www.marinelife.org/currentsponsor','_self','','25','','','','','','','','','','') // Level1 (id=59) - Rehabilitation (no parent) oCMenu.makeMenu('590','',"Rehabilitation",'http://www.marinelife.org/rehabilitation','_self','','','','','','','','','','','','') // Level2 (id=280) - Photo Gallery (parent of Level1 (id=59) - Rehabilitation) oCMenu.makeMenu('280059','590','Photo Gallery','http://www.marinelife.org/PhotoGallery','_self','','25','','','','','','','','','','') // Level2 (id=281) - Current Patients (parent of Level1 (id=59) - Rehabilitation) oCMenu.makeMenu('281059','590','Current Patients','http://www.marinelife.org/Currentpatients','_self','','25','','','','','','','','','','') // Level2 (id=282) - Past Patients (parent of Level1 (id=59) - Rehabilitation) oCMenu.makeMenu('282059','590','Past Patients','http://www.marinelife.org/pastpatients','_self','','25','','','','','','','','','','') // Level1 (id=22) - Education (no parent) oCMenu.makeMenu('220','',"Education",'http://www.marinelife.org/education.htm','_self','','','','','','','','','','','','') // Level2 (id=211) - Sea Turtle Facts (parent of Level1 (id=22) - Education) oCMenu.makeMenu('211022','220','Sea Turtle Facts','http://www.marinelife.org/Allaboutturtles','_self','','25','','','','','','','','','','') // Level2 (id=17) - Education Programs (parent of Level1 (id=22) - Education) oCMenu.makeMenu('17022','220','Education Programs','http://www.marinelife.org/community_programs.htm','_self','','25','','','','','','','','','','') // Level2 (id=35) - Junior Marine Biologist Program (camp) (parent of Level1 (id=22) - Education) oCMenu.makeMenu('35022','220','Junior Marine Biologist Program (camp)','http://www.marinelife.org/camp','_self','','46','','','','','','','','','','') // Level2 (id=62) - School Programs (parent of Level1 (id=22) - Education) oCMenu.makeMenu('62022','220','School Programs','http://www.marinelife.org/school_programs.htm','_self','','25','','','','','','','','','','') // Level1 (id=77) - Donate (no parent) oCMenu.makeMenu('770','',"Donate",'http://www.marinelife.org/Donate','_self','','','','','','','','','','','','') // Level2 (id=278) - Donate (parent of Level1 (id=77) - Donate) oCMenu.makeMenu('278077','770','Donate ','http://www.marinelife.org/donations.htm','_self','','25','','','','','','','','','','') // Level2 (id=287) - Turtle Plaque Campaign (parent of Level1 (id=77) - Donate) oCMenu.makeMenu('287077','770','Turtle Plaque Campaign','http://www.marinelife.org/Turtleplaquecampaign','_self','','25','','','','','','','','','','') // Level2 (id=9) - Sea Turtle Adoption Program (parent of Level1 (id=77) - Donate) oCMenu.makeMenu('9077','770','Sea Turtle Adoption Program','http://www.marinelife.org/adopt_a_turtle.htm','_self','','46','','','','','','','','','','') // Level2 (id=42) - Sponsorship Opportunities (parent of Level1 (id=77) - Donate) oCMenu.makeMenu('42077','770','Sponsorship Opportunities','http://www.marinelife.org/naming_ops.htm','_self','','25','','','','','','','','','','') // Level2 (id=264) - Current Sponsors (parent of Level1 (id=77) - Donate) oCMenu.makeMenu('264077','770','Current Sponsors','http://www.marinelife.org/currentsponsor','_self','','25','','','','','','','','','','') // Level2 (id=43) - Items Needed (parent of Level1 (id=77) - Donate) oCMenu.makeMenu('43077','770','Items Needed','http://www.marinelife.org/needed_items.htm','_self','','25','','','','','','','','','','') // Level1 (id=330) - Special Events (no parent) oCMenu.makeMenu('3300','',"Special Events",'http://www.marinelife.org/eventscalendar','_self','','','','','','','','','','','','') // Level2 (id=256) - EVENTS CALENDAR (parent of Level1 (id=330) - Special Events) oCMenu.makeMenu('2560330','3300','EVENTS CALENDAR','http://www.marinelife.org/eventscalendar','_self','','25','','','','','','','','','','') // Level2 (id=335) - Earth Day 2010 (parent of Level1 (id=330) - Special Events) oCMenu.makeMenu('3350330','3300','Earth Day 2010','http://www.marinelife.org/earthday','_self','','25','','','','','','','','','','') // Level2 (id=354) - World Oceans Day 2010 (parent of Level1 (id=330) - Special Events) oCMenu.makeMenu('3540330','3300','World Oceans Day 2010','http://www.marinelife.org/oceansday','_self','','25','','','','','','','','','','') // Level2 (id=212) - TurtleFest 2010 (parent of Level1 (id=330) - Special Events) oCMenu.makeMenu('2120330','3300','TurtleFest 2010','http://www.marinelife.org/turtlefest','_self','','25','','','','','','','','','','') // Level2 (id=322) - A Night in Havana 2010 (parent of Level1 (id=330) - Special Events) oCMenu.makeMenu('3220330','3300','A Night in Havana 2010','http://www.marinelife.org/havana','_self','','25','','','','','','','','','','') // Level2 (id=284) - Loggerhead Luau 2009 (parent of Level1 (id=330) - Special Events) oCMenu.makeMenu('2840330','3300','Loggerhead Luau 2009','http://www.marinelife.org/luau','_self','','25','','','','','','','','','','') // Level1 (id=74) - Get Involved (no parent) oCMenu.makeMenu('740','',"Get Involved",'http://www.marinelife.org/Getinvolved.htm','_self','','','','','','','','','','','','') // Level2 (id=40) - Membership (parent of Level1 (id=74) - Get Involved) oCMenu.makeMenu('40074','740','Membership ','http://www.marinelife.org/membership_levels.htm','_self','','25','','','','','','','','','','') // Level2 (id=275) - Volunteer (parent of Level1 (id=74) - Get Involved) oCMenu.makeMenu('275074','740','Volunteer','http://www.marinelife.org/Volunteer.htm','_self','','25','','','','','','','','','','') // Level2 (id=309) - Go Blue (parent of Level1 (id=74) - Get Involved) oCMenu.makeMenu('309074','740','Go Blue ','http://www.marinelife.org/GoBlue','_self','','25','','','','','','','','','','') // Level3 (id=310) - GO Blue Lifestyle Choices (parent of Level2 (id=309) - Go Blue ) oCMenu.makeMenu('3100309074','309074','GO Blue Lifestyle Choices','http://www.marinelife.org/Lifestylechoices','_self','','25','','','','','','','','','','') // Level2 (id=276) - Blue Friends (parent of Level1 (id=74) - Get Involved) oCMenu.makeMenu('276074','740','Blue Friends','http://www.marinelife.org/BlueFriends','_self','','25','','','','','','','','','','') // Level1 (id=18) - Contact Us (no parent) oCMenu.makeMenu('180','',"Contact Us",'http://www.marinelife.org/contact_form.htm','_self','','','','','','','','','','','','') // Level2 (id=8) - About Us-History (parent of Level1 (id=18) - Contact Us) oCMenu.makeMenu('8018','180','About Us-History','http://www.marinelife.org/about_us.htm','_self','','25','','','','','','','','','','') // Level2 (id=253) - Rental Opportunities (parent of Level1 (id=18) - Contact Us) oCMenu.makeMenu('253018','180','Rental Opportunities','https://www.trustedpartner.com/docs/library/000187/Facility Rental Guide 52708 for web[1].pdf ','_blank','','25','','','','','','','','','','') // Level2 (id=14) - Birthday Parties (parent of Level1 (id=18) - Contact Us) oCMenu.makeMenu('14018','180','Birthday Parties','http://www.marinelife.org/birthday_parties.htm','_self','','25','','','','','','','','','','') // Level2 (id=54) - Staff Directory (parent of Level1 (id=18) - Contact Us) oCMenu.makeMenu('54018','180','Staff Directory','http://www.marinelife.org/stafflist','_self','','25','','','','','','','','','','') // Level2 (id=15) - Board of Directors (parent of Level1 (id=18) - Contact Us) oCMenu.makeMenu('15018','180','Board of Directors','http://www.marinelife.org/board.htm','_self','','25','','','','','','','','','','') // Level2 (id=158) - Employment & Internships (parent of Level1 (id=18) - Contact Us) oCMenu.makeMenu('158018','180','Employment & Internships','http://www.marinelife.org/jobpositions','_self','','25','','','','','','','','','','') // Level2 (id=19) - Contact Us Form (parent of Level1 (id=18) - Contact Us) oCMenu.makeMenu('19018','180','Contact Us Form','http://www.marinelife.org/contact_form.htm','_self','','25','','','','','','','','','','') //Leave this line - it constructs the menu oCMenu.construct() //Extra code to find position: function findPos(num){ //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["divMenu"+num]:document.getElementById("divMenu"+num); 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(920) oCMenu.m["920"].b.moveIt(pos[0],pos[1]) pos = findPos(3520) oCMenu.m["3520"].b.moveIt(pos[0],pos[1]) pos = findPos(1910) oCMenu.m["1910"].b.moveIt(pos[0],pos[1]) pos = findPos(3140) oCMenu.m["3140"].b.moveIt(pos[0],pos[1]) pos = findPos(3150) oCMenu.m["3150"].b.moveIt(pos[0],pos[1]) pos = findPos(2410) oCMenu.m["2410"].b.moveIt(pos[0],pos[1]) pos = findPos(2460) oCMenu.m["2460"].b.moveIt(pos[0],pos[1]) pos = findPos(590) oCMenu.m["590"].b.moveIt(pos[0],pos[1]) pos = findPos(220) oCMenu.m["220"].b.moveIt(pos[0],pos[1]) pos = findPos(770) oCMenu.m["770"].b.moveIt(pos[0],pos[1]) pos = findPos(3300) oCMenu.m["3300"].b.moveIt(pos[0],pos[1]) pos = findPos(740) oCMenu.m["740"].b.moveIt(pos[0],pos[1]) pos = findPos(180) oCMenu.m["180"].b.moveIt(pos[0],pos[1]) //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()"