//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=140  //was 115  
oCMenu.rows=0
oCMenu.menuPlacement=0
                                                             
oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1 
oCMenu.wait=100 
oCMenu.fillImg=""
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth="menu" 
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=118
oCMenu.level[0].height=25
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=1
oCMenu.level[0].borderY=1
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=125 //to make sub level 1 wider
oCMenu.level[1].height=25
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=-(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=120
oCMenu.level[2].height=20
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=0
oCMenu.level[2].regClass="clLevel1"
oCMenu.level[2].overClass="clLevel1over"
oCMenu.level[2].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','/index.shtml','')
	
oCMenu.makeMenu('top1','','ABOUT MMC','/about/welcome.shtml')

oCMenu.makeMenu('top2','','THE COMMISSION','/commission/welcome.shtml')
	
oCMenu.makeMenu('top3','','COMMISSION POLICIES','/commission_policies/welcome.shtml')

/*oCMenu.makeMenu('top3','','SOUND PROGRAM','/sound/welcome.shtml')*/

oCMenu.makeMenu('top4','','LEGISLATION AND AGREEMENTS','/legislation/welcome.shtml')

oCMenu.makeMenu('top5','','REPORTS')
	oCMenu.makeMenu('sub50','top5','Annual Reports','/reports/annual/welcome.shtml')	
	oCMenu.makeMenu('sub51','top5','Project & Workshop Reports','/reports/workshop/welcome.shtml')	
	oCMenu.makeMenu('sub52','top5','Earlier Commission Publications','/reports/comm_pub/welcome.shtml')
	oCMenu.makeMenu('sub53','top5','Administrative  Reports','/reports/administrative/welcome.shtml')
	oCMenu.makeMenu('sub54','top5','Other Publications','/reports/publications/welcome.shtml')
	
oCMenu.makeMenu('top6','','LETTERS','/letters/welcome.shtml')

oCMenu.makeMenu('top7','','DRAKES ESTERO REVIEW','/drakes_estero/welcome.shtml')
/*oCMenu.makeMenu('top','','','')*/

oCMenu.makeMenu('top8','','DEEPWATER HORIZON OIL   SPILL','/oil_spill/welcome.shtml')

/*oCMenu.makeMenu('top','','','')*/
oCMenu.makeMenu('top9','','FEDERALLY FUNDED RESEARCH SURVEY','/survey_ffr/welcome.shtml')

/*oCMenu.makeMenu('top','','','')*/
oCMenu.makeMenu('top10','','TESTIMONY','/testimony/welcome.shtml')

oCMenu.makeMenu('top11','','SPECIES','/species/welcome.shtml')

oCMenu.makeMenu('top12','','GRANT OPPORTUNITIES', '/research/welcome.shtml')
	oCMenu.makeMenu('sub120','top12','Research Priorities','/research/guide.shtml')	
	oCMenu.makeMenu('sub121','top12','Funding Opportunities ','/research/funding_opportunities.shtml')
	oCMenu.makeMenu('sub122','top12','Proposal Format','/research/funding.shtml')	
	oCMenu.makeMenu('sub123','top12','Policy on Indirect Costs','/research/policy.shtml')
	oCMenu.makeMenu('sub124','top12','Recent Grant Awards ','/research/projects09_list.shtml')
	
/*oCMenu.makeMenu('top13','','','')*/		
oCMenu.makeMenu('top13','','CALENDAR','/calendar/welcome.shtml')

oCMenu.makeMenu('top14','','EMPLOYMENT','/backmatter/jobvacancies.shtml')

//Leave this line - it constructs the menu
oCMenu.construct()	

/******************
CM_ADD-IN - foldoutmenu (last updated: 1/26/02)
Test foldoutmenu behaviour.
Only for level 0
*****************/
makeCM.prototype.onshow+="if(l==1) this.foldout(pm,pm.subx,pm.suby,maxw,maxh,pm.lev)"
makeCM.prototype.foldout=function(pm,x,y,w,h,l){
//First only toplevel
c = this
curr = 0
pm.mout=""
for(var i=0;i<c.l[l].m.length;i++){
//move back in place, just in case
m = this.m[c.l[l].m[i]]
if(m.b.orgy){
if(m.b.y!=m.b.orgy) m.b.moveIt(m.b.x,m.b.orgy)
}
//find current
if(curr){ //move'em
m.b.orgy = m.b.y
m.b.orgsuby = m.suby
m.b.moveIt(m.b.x,m.b.y+h)
m.mover="pm.b.moveIt(pm.b.x,pm.b.orgy)"
}
if(c.l[l].m[i] == pm.name) curr = 1
}
}
makeCM.prototype.onhide+="this.foldin()"
makeCM.prototype.foldin=function(){
//First only toplevel
c = this
curr = 0
l=0
for(var i=0;i<c.l[l].m.length;i++){
m = this.m[c.l[l].m[i]]
if(m.b.orgy) m.b.moveIt(m.b.x,m.b.orgy)
}
}

