/*Browsercheck object - we have to move this into the page to prevent an error in NS4*/
function cm_bwcheck(){
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent.toLowerCase()
	this.dom=document.getElementById?1:0
	this.op5=(this.agent.indexOf("opera 5")>-1 || this.agent.indexOf("opera/5")>-1) && window.opera 
  this.op6=(this.agent.indexOf("opera 6")>-1 || this.agent.indexOf("opera/6")>-1) && window.opera   
  this.ie5 = (this.agent.indexOf("msie 5")>-1 && !this.op5 && !this.op6)
  this.ie55 = (this.ie5 && this.agent.indexOf("msie 5.5")>-1)
  this.ie6 = (this.agent.indexOf("msie 6")>-1 && !this.op5 && !this.op6)
	this.ie4=(this.agent.indexOf("msie")>-1 && document.all &&!this.op5 &&!this.op6 &&!this.ie5&&!this.ie6)
  this.ie = (this.ie4 || this.ie5 || this.ie6)
	this.mac=(this.agent.indexOf("mac")>-1)
	this.ns6=(this.agent.indexOf("gecko")>-1 || window.sidebar)
	this.ns4=(!this.dom && document.layers)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5 || this.op6)
  this.usedom= this.ns6//Use dom creation
  this.reuse = this.ie||this.usedom //Reuse layers
  this.px=this.dom&&!this.op5?"px":""
	return this
}
var bw=new cm_bwcheck()

/*** 
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

//Frame Properties
oCMenu.frames = 0

//Menu properties   
oCMenu.pxBetween=1
oCMenu.fromLeft=331 
oCMenu.fromTop=91  
oCMenu.rows=1 
oCMenu.menuPlacement="left"
                                                             
oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0

//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=""

//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=85
oCMenu.level[0].height=20 
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=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="bottom"

//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[1].width=oCMenu.level[0].width-2
oCMenu.level[1].height=18
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=1
oCMenu.level[1].borderY=1
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=0
//oCMenu.level[1].offsetX=-(oCMenu.level[0].width-2)/2+20
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"


//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[2].width=150
oCMenu.level[2].height=20
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=0
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderClass="clLevel2border"

/******************************************
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','','&nbsp;Home','/index.shtml','top',49)
	
oCMenu.makeMenu('top1','','&nbsp;Products','/products.html','top',68)
    oCMenu.makeMenu('sub10','top1','Tides','','',120)
    	oCMenu.makeMenu('sub100','sub10','Observed Data - Active Stations','/station_retrieve.shtml?type=Tide+Data','',130,30)
        oCMenu.makeMenu('sub101','sub10','Historic Data','/station_retrieve.shtml?type=Historic+Tide+Data','',130,0)
		oCMenu.makeMenu('sub102','sub10','NOAA Tide Predictions','/tide_predictions.shtml','',130,0)
		oCMenu.makeMenu('sub103','sub10','High/Low Tide Predictions','/tide_pred.html','',130,30)
		    oCMenu.makeMenu('sub1031','sub103','2011','/tides11/','',35,0)
		    oCMenu.makeMenu('sub1032','sub103','2010','/tides10/','',35,0)
			oCMenu.makeMenu('sub1033','sub103','2009','/tides09/','',35,0)
			oCMenu.makeMenu('sub1034','sub103','2008','/tides08/','',35,0)
			oCMenu.makeMenu('sub1035','sub103','2007','/tides07/','',35,0)
			oCMenu.makeMenu('sub1036','sub103','2006','/tides06/','',35,0)
			oCMenu.makeMenu('sub1037','sub103','2005','/tides05/','',35,0)
			oCMenu.makeMenu('sub1038','sub103','2004','/tides04/','',35,0)
		oCMenu.makeMenu('sub104','sub10','\"Tides Online\"','http://tidesonline.nos.noaa.gov/','',130)
		oCMenu.makeMenu('sub105','sub10','1-Minute Water Level Data','/1mindata.shtml','',130,30)
		oCMenu.makeMenu('sub106','sub10','Station Index','/station_index_map.shtml','',130,0)
	oCMenu.makeMenu('sub11','top1','Great Lakes Water Level','','',120,30)
    	oCMenu.makeMenu('sub110','sub11','Active Stations','/station_retrieve.shtml?type=Great+Lakes+Water+Level+Data','',130,0)
        oCMenu.makeMenu('sub111','sub11','Historic Stations','/station_retrieve.shtml?type=Historic+Great+Lakes+Water+Level+Data','',130,0)
		oCMenu.makeMenu('sub112','sub11','\"Great Lakes Online\"','http://glakesonline.nos.noaa.gov/','',130)
		oCMenu.makeMenu('sub113','sub11','Great Lakes Low Water Datums','/gldatums.shtml','',130,30)
	oCMenu.makeMenu('sub12','top1','Currents','','',120,0)
		oCMenu.makeMenu('sub121','sub12','Current Observations - Active Stations','/cdata/StationList?type=Current+Data&filter=active','',150,30)
        oCMenu.makeMenu('sub122','sub12','Historic Data','/cdata/','',150,0)
		oCMenu.makeMenu('sub123','sub12','Max/Min Current Predictions','/curr_pred.html','',150,30)
			oCMenu.makeMenu('sub1220','sub123','2012','/currents12/','',35,0)
			oCMenu.makeMenu('sub1221','sub123','2011','/currents11/','',35,0)
			oCMenu.makeMenu('sub1222','sub123','2010','/currents10/','',35,0)
			oCMenu.makeMenu('sub1223','sub123','2009','/currents09/','',35,0)
			oCMenu.makeMenu('sub1224','sub123','2008','/currents08/','',35,0)
			oCMenu.makeMenu('sub1225','sub123','2007','/currents07/','',35,0)
			oCMenu.makeMenu('sub1226','sub123','2006','/currents06/','',35,0)
			oCMenu.makeMenu('sub1227','sub123','2005','/currents05/','',35,0)
			oCMenu.makeMenu('sub1228','sub123','2004','/currents04/','',35,0)
	oCMenu.makeMenu('sub14','top1','Meteorological Observations','/station_retrieve.shtml?type=Meteorological Observations','',120,30)
		oCMenu.makeMenu('sub141','top1','Conductivity','/station_retrieve.shtml?type=Conductivity','',120)
	oCMenu.makeMenu('sub15','top1','Bench Marks','','',120)
    	oCMenu.makeMenu('sub150','sub15','Present Epoch (1983-2001)','/station_retrieve.shtml?type=Bench+Mark+Data+Sheets','',130,30)
        oCMenu.makeMenu('sub151','sub15','Superseded Epoch (1960-1978)','/station_retrieve.shtml?type=Superseded+Bench+Mark','',130,30)
        oCMenu.makeMenu('storm_ql','top1','Storm QuickLook','/quicklook.shtml','',120);
	oCMenu.makeMenu('sub16','top1','Datums','/datum_options.html','',120)
    	oCMenu.makeMenu('sub160','sub16','Present Epoch (1983-2001)','/station_retrieve.shtml?type=Datums','',130,30)
        oCMenu.makeMenu('sub161','sub16','Superseded Epoch (1960-1978)','/station_retrieve.shtml?type=Superseded+Datums','',130,30)
		oCMenu.makeMenu('sub162','sub16','Great Lakes Low Water Datums','/gldatums.shtml','',130,30)
		oCMenu.makeMenu('sub163','sub16','VDatum','http://vdatum.noaa.gov/','',130,30)
	oCMenu.makeMenu('sub17','top1','Harmonic Constituents','/station_retrieve.shtml?type=Harmonic+Constituents','',120,30)
	oCMenu.makeMenu('sub18','top1','Operational Forecast System','/models.html','',120,30)
	        oCMenu.makeMenu('sub1801','sub18','Chesapeake Bay Operational Forecast System','/ofs/cbofs/cbofs.html','',170,30)
		oCMenu.makeMenu('sub1802','sub18','Delaware Bay Operational Forecast System','/ofs/dbofs/dbofs.html','',170,30)
		oCMenu.makeMenu('sub1803','sub18','Galveston Bay Operational Forecast System','/ofs/gbofs/gbofs.html','',170,30)
		oCMenu.makeMenu('sub1804','sub18','Lake Erie Operational Forecast System','/ofs/leofs/leofs.html','',170,30)
		oCMenu.makeMenu('sub1805','sub18','Lake Huron Operational Forecast System','/ofs/lhofs/lhofs.html','',170,30)	
		oCMenu.makeMenu('sub1806','sub18','Lake Michigan Operational Forecast System','/ofs/lmofs/lmofs.html','',170,30)
		oCMenu.makeMenu('sub1807','sub18','Lake Ontario Operational Forecast System','/ofs/loofs/loofs.html','',170,30)		
		oCMenu.makeMenu('sub1808','sub18','Lake Superior Operational Forecast System','/ofs/lsofs/lsofs.html','',170,30)		
		oCMenu.makeMenu('sub1809','sub18','New York and New Jersey Operational Forecast System','/ofs/nyofs/nyofs.html','',170,30)
		oCMenu.makeMenu('sub1810','sub18','St. Johns River Operational Forecast System','/ofs/sjofs/sjofs.html','',170,30)
		oCMenu.makeMenu('sub1811','sub18','Tampa Bay Operational Forecast System','/ofs/tbofs/tbofs.html','',170,30)
	oCMenu.makeMenu('sub191','top1','PORTS - Real Time Obs.','/ports.html','top',120,30)
        oCMenu.makeMenu('sub1910','sub191','Cherry Point','/ports/index.shtml?port=cp','',160,0)	
        oCMenu.makeMenu('sub1911','sub191','Chesapeake Bay North','/ports/index.shtml?port=cn','',160,0)
        oCMenu.makeMenu('sub1912','sub191','Chesapeake Bay South','/ports/index.shtml?port=cs','',160,0)
        oCMenu.makeMenu('sub1913','sub191','Delaware River and Bay','/ports/index.shtml?port=db','',160,0)
        oCMenu.makeMenu('sub1914','sub191','Gulfport','/ports/index.shtml?port=gp','',160,0)
        oCMenu.makeMenu('sub1915','sub191','Houston/ Galveston','/ports/index.shtml?port=hg','',160,0)
		oCMenu.makeMenu('sub1916','sub191','Lake Charles','/ports/index.shtml?port=lc','',160,0)
        oCMenu.makeMenu('sub1917','sub191','Los Angeles/Long Beach','/ports/index.shtml?port=ll','',160,0)
        oCMenu.makeMenu('sub1918','sub191','Lower Columbia River','/ports/index.shtml?port=cr','',160,0)
		oCMenu.makeMenu('sub1919','sub191','Lower Mississippi River','/ports/index.shtml?port=lm','',160,0)
        oCMenu.makeMenu('sub19110','sub191','Mobile Bay', '/ports/index.shtml?port=mb','',160,0)
        oCMenu.makeMenu('sub19111','sub191','Narragansett Bay','/ports/index.shtml?port=nb','',160,0)
        oCMenu.makeMenu('sub19112','sub191','New Haven','/ports/index.shtml?port=nh','',160,0)
        oCMenu.makeMenu('sub19113','sub191','New York/New Jersey Harbor','/ports/index.shtml?port=ny','',160,0)
        oCMenu.makeMenu('sub19114','sub191','Pascagoula','/ports/index.shtml?port=ps','',160,0)
        oCMenu.makeMenu('sub19115','sub191','Port of Anchorage','/ports/index.shtml?port=ak','',160,0)
        oCMenu.makeMenu('sub19116','sub191','Sabine Neches','/ports/index.shtml?port=sn','',160,0)
        oCMenu.makeMenu('sub19117','sub191','San Francisco Bay','/ports/index.shtml?port=sf','',160,0)
        oCMenu.makeMenu('sub19118','sub191','Soo Locks','/ports/index.shtml?port=sl','',160,0)
        oCMenu.makeMenu('sub19119','sub191','Tacoma','/ports/index.shtml?port=ta','',160,0)
        oCMenu.makeMenu('sub19120','sub191','Tampa Bay','/ports/index.shtml?port=tb','',160,0)
	oCMenu.makeMenu('sub192','top1','Sea Level Trends','/sltrends/index.shtml','top',120)
        oCMenu.makeMenu('sub1920','sub192','CO-OPS Stations','/sltrends/index.shtml','',120)
        oCMenu.makeMenu('sub1921','sub192','Global Stations','/sltrends/sltrends_global.shtml','',120)
	oCMenu.makeMenu('sub1933','top1','Inundation Analysis','/inundation/','',120, 30)		
	oCMenu.makeMenu('sub1934','top1','Extreme Water Levels','/est/','',120, 30)
	oCMenu.makeMenu('sub194','top1','Astronomical Data','/astronomical.html','self',120)
	oCMenu.makeMenu('sub195','top1','nowCOAST','/nowcoast.html','self',120)
	oCMenu.makeMenu('sub196','top1','Publications','/pub.html','self',120)
	oCMenu.makeMenu('sub197','top1','IOOS Data Portal','/opendap.html','self',120)
	oCMenu.makeMenu('sub198','top1','Request Products','/data_request.shtml','self',120)
	oCMenu.makeMenu('sub199','top1','HAB - Harmful Algal Blooms','','',120,30)
	oCMenu.makeMenu('sub1991','sub199','Gulf of Mexico HAB-OFS','/hab','',150,0)
	oCMenu.makeMenu('sub1992','top1','Google Earth/KML Files','/googleearth.shtml','',120,30)
	
oCMenu.makeMenu('top2','','&nbsp;Programs','/programs.html','top',74)
	oCMenu.makeMenu('sub20','top2','NWLON - Water Levels','/nwlon.html','top',160)
	oCMenu.makeMenu('sub21','top2','PORTS - Real Time Obs.','/ports.html','top',160)
        oCMenu.makeMenu('sub210','sub21','Cherry Point','/ports/index.shtml?port=cp','',160,0)	
        oCMenu.makeMenu('sub211','sub21','Chesapeake Bay North','/ports/index.shtml?port=cn','',160,0)
        oCMenu.makeMenu('sub212','sub21','Chesapeake Bay South','/ports/index.shtml?port=cs','',160,0)
        oCMenu.makeMenu('sub213','sub21','Delaware River and Bay','/ports/index.shtml?port=db','',160,0)
        oCMenu.makeMenu('sub214','sub21','Gulfport','/ports/index.shtml?port=gp','',160,0)		
        oCMenu.makeMenu('sub215','sub21','Houston/ Galveston','/ports/index.shtml?port=hg','',160,0)
        oCMenu.makeMenu('sub216','sub21','Lake Charles','/ports/index.shtml?port=lc','',160,0)
        oCMenu.makeMenu('sub217','sub21','Los Angeles/Long Beach','/ports/index.shtml?port=ll','',160,0)
        oCMenu.makeMenu('sub218','sub21','Lower Columbia River','/ports/index.shtml?port=cr','',160,0)
		oCMenu.makeMenu('sub219','sub21','Lower Mississippi River','/ports/index.shtml?port=lm','',160,0)
		oCMenu.makeMenu('sub2110','sub21','Mobile Bay','/ports/index.shtml?port=mb','',160,0)
        oCMenu.makeMenu('sub2111','sub21','Narragansett Bay','/ports/index.shtml?port=nb','',160,0)
        oCMenu.makeMenu('sub2112','sub21','New Haven','/ports/index.shtml?port=nh','',160,0)
        oCMenu.makeMenu('sub2113','sub21','New York/New Jersey Harbor','/ports/index.shtml?port=ny','',160,0)
        oCMenu.makeMenu('sub2114','sub21','Pascagoula','/ports/index.shtml?port=ps','',160,0)
        oCMenu.makeMenu('sub2115','sub21','Port of Anchorage','/ports/index.shtml?port=ak','',160,0)
        oCMenu.makeMenu('sub2116','sub21','Sabine Neches','/ports/index.shtml?port=sn','',160,0)
        oCMenu.makeMenu('sub2117','sub21','San Francisco Bay','/ports/index.shtml?port=sf','',160,0)
        oCMenu.makeMenu('sub2118','sub21','Soo Locks','/ports/index.shtml?port=sl','',160,0)
        oCMenu.makeMenu('sub2119','sub21','Tacoma','/ports/index.shtml?port=ta','',160,0)
        oCMenu.makeMenu('sub2120','sub21','Tampa Bay','/ports/index.shtml?port=tb','',160,0)
	oCMenu.makeMenu('sub22','top2','OSTEP - Testing','/ostep.html','top',160)
	oCMenu.makeMenu('sub23','top2','NCOP - Currents','/ncop.html','top',160)
	oCMenu.makeMenu('sub24','top2','NOCMP - Modeling','/nocmp.html','top',160)
	oCMenu.makeMenu('sub25','top2','CORMS - Monitoring','/corms.html','top',160)
	oCMenu.makeMenu('sub26','top2','COASTAL<br>Non-Navigational Applications','/coastal.html','top',160,40)

oCMenu.makeMenu('top3','','&nbsp;Partnerships','/partnerships.html','top',90)
	oCMenu.makeMenu('sub30','top3','Hydrographic Survey Support','/hydro.html','top',145,30)
	oCMenu.makeMenu('sub31','top3','Marsh Restoration','/marsh.html','top',145)
	oCMenu.makeMenu('sub32','top3','Army Corps. Projects','/army.html','top',145)
	oCMenu.makeMenu('sub33','top3','TCOON - Texas','/tcoon.shtml','top',145)
	oCMenu.makeMenu('sub34','top3','St. Charles Parish','/st_charles.html','top',145)
	oCMenu.makeMenu('sub35','top3','Caro-COOPS - Carolinas','/carocoops.html','top',145)
	oCMenu.makeMenu('sub36','top3','GoMOOS - Gulf of Maine','/gomoos.html','top',145)
	oCMenu.makeMenu('sub37','top3','Coast Survey Development Lab','/csdl.html','top',145,30)

oCMenu.makeMenu('top4','','&nbsp;Education','/education.html','top',74)
	oCMenu.makeMenu('sub40','top4','Tides','','',115,'','','','','','left')
        oCMenu.makeMenu('sub400','sub40','What are tides?','http://oceanservice.noaa.gov/education/kits/tides/tides01_intro.html','_blank',180,0)
        oCMenu.makeMenu('sub401','sub40','What causes tides?','http://oceanservice.noaa.gov/education/kits/tides/tides02_cause.html','_blank',180,0)
        oCMenu.makeMenu('sub402','sub40','Gravity, Inertia, and Bulges?','http://oceanservice.noaa.gov/education/kits/tides/tides03_gravity.html','_blank',180,0)
        oCMenu.makeMenu('sub403','sub40','Changing Angles and Tides?','http://oceanservice.noaa.gov/education/kits/tides/tides04_angle.html','_blank',180,0)
        oCMenu.makeMenu('sub404','sub40','Frequency of tides?','http://oceanservice.noaa.gov/education/kits/tides/tides05_lunarday.html','_blank',180,0)
        oCMenu.makeMenu('sub405','sub40','Tidal Variation?','http://oceanservice.noaa.gov/education/kits/tides/tides06_variations.html','_blank',180,0)
        oCMenu.makeMenu('sub406','sub40','Types and Causes of Tidal Cycles','http://oceanservice.noaa.gov/education/kits/tides/tides07_cycles.html','_blank',180,30)
        oCMenu.makeMenu('sub407','sub40','What Else Affects Tides?','http://oceanservice.noaa.gov/education/kits/tides/tides08_othereffects.html','_blank',180,0)
        oCMenu.makeMenu('sub408','sub40','Monitoring the Tides','http://oceanservice.noaa.gov/education/kits/tides/tides09_monitor.html','_blank',180,0)
        oCMenu.makeMenu('sub409','sub40','How are Tides Measured ? Pt. I','http://oceanservice.noaa.gov/education/kits/tides/tides10_oldmeasure.html','_blank',180,0)
        oCMenu.makeMenu('sub4010','sub40','How are Tides Measured? Pt. II','http://oceanservice.noaa.gov/education/kits/tides/tides11_newmeasure.html','_blank',180,0)
	oCMenu.makeMenu('sub41','top4','Tides Roadmap','http://oceanservice.noaa.gov/education/kits/tides/supp_tides_roadmap.html','_blank',115)
	oCMenu.makeMenu('sub42','top4','Tides Lesson Plans','http://oceanservice.noaa.gov/education/kits/tides/supp_tides_lessons.html','_blank',115)
	oCMenu.makeMenu('sub43','top4','Currents','http://oceanservice.noaa.gov/education/kits/currents/welcome.html','_blank',115)
	oCMenu.makeMenu('sub44','top4','History & Theory','/about2.html','',115)

oCMenu.makeMenu('top5','','&nbsp;Help','/help.html','top',40)
    oCMenu.makeMenu('sub50','top5','About Us','/about.html','top')
	oCMenu.makeMenu('sub51','top5','Contact Us','/contact.html','top')
	oCMenu.makeMenu('sub52','top5','Site Map','/sitemap.html','top')
	oCMenu.makeMenu('sub53','top5','FAQ','','top','','','','','','','left')
        oCMenu.makeMenu('sub530','sub53','Tide Predictions and Data','/faq2.html','',160,0)
        oCMenu.makeMenu('sub531','sub53','Tidal Current Predictions and Data','/faq4.html','',160,30)
        oCMenu.makeMenu('sub532','sub53','Having Problems Accessing Data','/faq5.html','',160,30)
	oCMenu.makeMenu('sub54','top5','Glossary','/publications/glossary2.pdf')
	oCMenu.makeMenu('sub55','top5','Suggestion Box','/suggestionbox.shtml','','',30)
//Leave this line - it constructs the menu
oCMenu.construct()		


