
/*** 
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.
**/

//Extra code to find position:
function findPos(){
  if(bw.ns4){   //Netscape 4
    x = document.layers.layerMenu.pageX
    y = document.layers.layerMenu.pageY
  }else{ //other browsers
    x=0; y=0; var el,temp
    el = bw.ie4?document.all["divMenu"]:document.getElementById("divMenu");
    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]
}

pos = findPos()

//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=pos[0]
oCMenu.fromTop=pos[1]
//We also need to "re place" the menu on resize. So:
oCMenu.onresize="pos = findPos(); oCMenu.fromLeft=pos[0]; oCMenu.fromTop=pos[1]"

oCMenu.rows=1
oCMenu.menuPlacement=0
                                                             
oCMenu.offlineRoot="file:///C|/EasyWAMP/www/WorkingOnFire/" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth="607"
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=86
oCMenu.level[0].height=24
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=150
oCMenu.level[1].height=22
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=0
oCMenu.level[1].borderY=0
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=0
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"

//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to specify 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)


/******************************************
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.asp','')

oCMenu.makeMenu('top1','','About us','')
	oCMenu.makeMenu('sub00','top1','A Brief History','history.php')
	oCMenu.makeMenu('sub01','top1','Vision & Mission','vision.php')
	oCMenu.makeMenu('sub02','top1','The Fire Situation','firesituation.php')	
	
	
oCMenu.makeMenu('top2','','Group Structure','')
	oCMenu.makeMenu('sub20','top2','Overview','group_structure.php')
	oCMenu.makeMenu('sub21','top2','WoF Programme','')
			oCMenu.makeMenu('sub211','sub21','Overview','wof_overview.php')
			oCMenu.makeMenu('sub212','sub21','Recruitment','wof_recruitment.php')
			oCMenu.makeMenu('sub213','sub21','Training','wof_training.php')
			oCMenu.makeMenu('sub214','sub21','Safety & Survival Camps','wof_safety.php')
			oCMenu.makeMenu('sub215','sub21','Leadership and Training','wof_leadership.php')
			oCMenu.makeMenu('sub216','sub21','Morale','wof_morale.php')
			oCMenu.makeMenu('sub217','sub21','Branding','wof_branding.php')			
			oCMenu.makeMenu('sub218','sub21','Sharing Lessons Learnt','wof_conclusion.php')
			oCMenu.makeMenu('sub219','sub21','Personalities','wof_profiles.php')
			oCMenu.makeMenu('sub2120','sub21','Bongani&rsquo;s Brag Book','wof_bragbook.php')
			oCMenu.makeMenu('sub2121','sub21','Wofire Newsletters','wof_wofirenews.php')
	oCMenu.makeMenu('sub22','top2','FFA Aviation','')
			oCMenu.makeMenu('sub221','sub22','Introduction','aviation_aerialfirefighting.php')	
			oCMenu.makeMenu('sub222','sub22','Aviation History','aviation_history.php')			
			oCMenu.makeMenu('sub223','sub22','Aviation Staffing','aviation_staffing.php')			
			oCMenu.makeMenu('sub224','sub22','Aviation Aircraft','')	
					oCMenu.makeMenu('sub2241','sub224','Spotters','aviation_spotters.php')
					oCMenu.makeMenu('sub2242','sub224','Bombers','aviation_bombers.php')
					oCMenu.makeMenu('sub2243','sub224','Helicopters','aviation_helicopters.php')
			oCMenu.makeMenu('sub225','sub22','Aviation Training','aviation_training.php')			
			oCMenu.makeMenu('sub226','sub22','Aviation Bases','aviation_bases.php')
			oCMenu.makeMenu('sub227','sub22','Operation Firewatch','aviation_research.php')		
	oCMenu.makeMenu('sub23','top2','FFA Operations','')
			oCMenu.makeMenu('sub231','sub23','Commercial','ops_commercial.php')
			oCMenu.makeMenu('sub232','sub23','Dispatch and Coordination','ops_dispatch.php')
			oCMenu.makeMenu('sub233','sub23','Transport','ops_transport.php')
			oCMenu.makeMenu('sub234','sub23','Training','ops_training.php')
			oCMenu.makeMenu('sub235','sub23','Social','ops_social.php')	
	oCMenu.makeMenu('sub24','top2','FFA Management','')
			oCMenu.makeMenu('sub241','sub24','Financial/Administration','man_financial.php')
			oCMenu.makeMenu('sub242','sub24','Corporate Services','man_corporate.php')
			
	oCMenu.makeMenu('sub25','top2','Section 21','section21.php')

oCMenu.makeMenu('top3','','FPAs','fpa.php')
	

oCMenu.makeMenu('top4','','Press Room','pressroom.php')

oCMenu.makeMenu('top5','','Partnerships','partnerships.php')

oCMenu.makeMenu('top6','','Vacancies','vacancies.php')



oCMenu.makeMenu('top7','','Gallery','')
	oCMenu.makeMenu('sub71','top7','Veldfires','photos.php?page=veld')
	oCMenu.makeMenu('sub72','top7','Informal Settlement Fires','photos.php?page=informal')
	oCMenu.makeMenu('sub73','top7','Aerial Firefighting','photos.php?page=aerial')
	oCMenu.makeMenu('sub74','top7','Prescribed Burning','photos.php?page=prescribed')
	oCMenu.makeMenu('sub75','top7','Training','photos.php?page=training')
	oCMenu.makeMenu('sub76','top7','Presentations','presentations.php')

	
//Leave this line - it constructs the menu
oCMenu.construct()	