﻿/*** 
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
oCMenu2=new makeCM("oCMenu2") //Making the menu object. Argument: menuname

//Menu properties   
oCMenu2.pxBetween=0
oCMenu2.fromLeft=19
oCMenu2.fromTop=210 
oCMenu2.rows=0 
oCMenu2.menuPlacement=0

oCMenu2.offlineRoot="" 
oCMenu2.onlineRoot="" 
oCMenu2.resizeCheck=1 
oCMenu2.wait=1000 
oCMenu2.fillImg=""
oCMenu2.zIndex=0

//Background bar properties
oCMenu2.useBar=1
oCMenu2.barWidth="menu"
oCMenu2.barHeight="menu" 
oCMenu2.barClass="aclBar"
oCMenu2.barX="menu"
oCMenu2.barY="menu"
oCMenu2.barBorderX=1
oCMenu2.barBorderY=0
oCMenu2.barBorderClass=""

//Level properties - ALL properties have to be spesified in level 0
oCMenu2.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu2.level[0].width=160
oCMenu2.level[0].height=20
oCMenu2.level[0].regClass="aclLevel0"
oCMenu2.level[0].overClass="aclLevel0over"
oCMenu2.level[0].borderX=0 
oCMenu2.level[0].borderY=1
oCMenu2.level[0].borderClass="aclLevel0border"
oCMenu2.level[0].offsetX=1
oCMenu2.level[0].offsetY=0
oCMenu2.level[0].rows=0
oCMenu2.level[0].align="right" 


//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to spesify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
oCMenu2.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu2.level[1].width=115
oCMenu2.level[1].height=20
oCMenu2.level[1].regClass="aclLevel1"
oCMenu2.level[1].overClass="aclLevel1over"
oCMenu2.level[1].style=""
oCMenu2.level[1].align="right" 
oCMenu2.level[1].offsetX=0
oCMenu2.level[1].offsetY=0
oCMenu2.level[1].borderClass="aclLevel1border"
oCMenu2.level[1].borderX=1 
oCMenu2.level[1].borderY=1
oCMenu2.level[1].rows=0
oCMenu2.level[1].align="right" 

//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
oCMenu2.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu2.level[2].width=115
oCMenu2.level[2].height=20
oCMenu2.level[2].offsetX=0
oCMenu2.level[2].offsetY=0
oCMenu2.level[2].regClass="aclLevel2"
oCMenu2.level[2].overClass="aclLevel2over"
oCMenu2.level[2].borderClass="aclLevel2border"

/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/

oCMenu2.makeMenu('topa1','','<strong>Robotics</strong>','../what_we_do/robotics.html','',140,20)
oCMenu2.makeMenu('suba01','topa1','&nbsp;&nbsp; Orbital Robotics','../what_we_do/orbital.html','',140,20)
	oCMenu2.makeMenu('suba21','suba01','Human & Robotic Solutions','','',140,32)
		oCMenu2.makeMenu('subaa003','suba21','Canadarm','../what_we_do/canadarm.html','',140)
		oCMenu2.makeMenu('subaa004','suba21','Mobile Servicing System','../what_we_do/mss.html','',140,32)
				oCMenu2.makeMenu('subaa00003','subaa004','Canadarm2','../what_we_do/canadarm2.html','',140)
				oCMenu2.makeMenu('subaa00004','subaa004','SPDM - Dextre','../what_we_do/spdm.html','',140)
				oCMenu2.makeMenu('subaa00005','subaa004','MBS','../what_we_do/mbs.html','',140)
				oCMenu2.makeMenu('subaa00006','subaa004','Robotic Workstation','../what_we_do/rwst.html','',140)		
		oCMenu2.makeMenu('subaa005','suba21','Berthing Cues System','../what_we_do/bcs.html','',140)
		oCMenu2.makeMenu('subaa006','suba21','Inspection Boom','../what_we_do/rtf.html','',140)
	oCMenu2.makeMenu('suba22','suba01','Unmanned Robotic Solutions','','',140,32)
		oCMenu2.makeMenu('subaa007','suba22','Orbital Express','../what_we_do/index.html','',140)
	oCMenu2.makeMenu('suba23','suba01','On-Orbit Servicing Missions','','',140,32)
oCMenu2.makeMenu('suba02','topa1','&nbsp;&nbsp; Planetary Robotics','','',140)
oCMenu2.makeMenu('suba03','topa1','&nbsp;&nbsp; Terrestrial','','',140)
	oCMenu2.makeMenu('suba24','suba03','neuroArm','../what_we_do/neuroarm.html','',140,20)
	oCMenu2.makeMenu('suba25','suba03','Instant Scene Modeler','../what_we_do/ism.html','',140)
	oCMenu2.makeMenu('suba26','suba03','Spectral Camera','../what_we_do/spec_cam.html','',140)
	oCMenu2.makeMenu('suba27','suba03','Autonomous Vehicle Development','../what_we_do/auto_veh_dev.html','',140,32)

oCMenu2.makeMenu('topa5','','<strong>Satellite Missions</strong>','../what_we_do/sat_miss.html','',140)
	oCMenu2.makeMenu('subaa012','topa5','Earth Observation','../what_we_do/earth_observation.html','',140)
	    oCMenu2.makeMenu('subaa0050','subaa012','RADARSAT-1','../what_we_do/radarsat_1.html','',140)
	    oCMenu2.makeMenu('subaa0051','subaa012','RADARSAT-2','../what_we_do/radarsat_2.html','',140)
	    oCMenu2.makeMenu('subaa0052','subaa012','RADARSAT Constellation Mission','../what_we_do/radarsat_con.html','',140, 32)
	    oCMenu2.makeMenu('subaa0053','subaa012','RapidEye','../what_we_do/rapideye.html','',140)
	    oCMenu2.makeMenu('subaa0054','subaa012','HERO','../what_we_do/hero.html','',140)
	oCMenu2.makeMenu('subaa021','topa5','Space Surveillance','../what_we_do/space_surveillance.html','',140)
	    oCMenu2.makeMenu('subaa0055','subaa021','Sapphire','../what_we_do/sapphire.html','',140)
	oCMenu2.makeMenu('subaa013','topa5','Space Science','','',140)
	    oCMenu2.makeMenu('subaa0056','subaa013','CASSIOPE','../what_we_do/cassiope.html','',140)
	oCMenu2.makeMenu('subaa014','topa5','Communications','http://www.spacecourier.ca','',140)

oCMenu2.makeMenu('topa6','','<strong>Enabling Technologies</strong>','../what_we_do/en_tech.html','',140)
	oCMenu2.makeMenu('subaa018','','&nbsp;&nbsp; Payloads','../what_we_do/ets_pay.html','',140)
		oCMenu2.makeMenu('subaa0031','subaa018','Communications','../what_we_do/ets_pay_com.html','',140)		
		oCMenu2.makeMenu('subaa0032','subaa018','Earth Observation','../what_we_do/ets_pay_obs.html','',140)		
		oCMenu2.makeMenu('subaa0033','subaa018','Manned Space','../what_we_do/ets_pay_man.html','',140)		
	oCMenu2.makeMenu('subaa019','','&nbsp;&nbsp; Antenna Products','../what_we_do/ets_ant_prod.html','',140)
		oCMenu2.makeMenu('subaa0014','subaa019','Reflector Antennas','../what_we_do/ets_ant_refl.html','',140)
		oCMenu2.makeMenu('subaa0015','subaa019','Array Antennas','../what_we_do/ets_ant_array.html','',140)
		oCMenu2.makeMenu('subaa0016','subaa019','Wide and Global Antennas','../what_we_do/ets_ant_wide.html','',140,32)
		oCMenu2.makeMenu('subaa0017','subaa019','Lens Antennas','../what_we_do/ets_ant_lens.html','',140)
		oCMenu2.makeMenu('subaa0018','subaa019','Gimbaled and Steerable Antennas','../what_we_do/ets_ant_gim.html','',140,32)
		oCMenu2.makeMenu('subaa0057','subaa019','Ruggedized Satellite Terminals','../what_we_do/ets_ap_rst.html','',140, 32)
		oCMenu2.makeMenu('subaa0019','subaa019','Related Products','../what_we_do/ets_ant_rel.html','',140)
		oCMenu2.makeMenu('subaa0020','subaa019','Specialized Services','../what_we_do/ets_ant_sp_serv.html','',140)
		oCMenu2.makeMenu('subaa0021','subaa019','Resources','','',140)				
			oCMenu2.makeMenu('subaa000014','subaa0021','Technical Staff','../what_we_do/ets_ant_res_tech.html','',140)
			oCMenu2.makeMenu('subaa000015','subaa0021','Test Facilities','../what_we_do/ets_ant_res_test.html','',140)
			oCMenu2.makeMenu('subaa000016','subaa0021','Software','../what_we_do/ets_ant_res_soft.html','',140)
		oCMenu2.makeMenu('subaa0022','subaa019','Customer List','../what_we_do/ets_ant_cust.html','',140)	
	oCMenu2.makeMenu('subaa020','','&nbsp;&nbsp; Electronic Products','../what_we_do/ets_elec_prod.html','',140)
		oCMenu2.makeMenu('subaa0023','subaa020','Power Products','../what_we_do/ets_ep_power.html','',140)
			oCMenu2.makeMenu('subaa000017','subaa0023','PD Series','../what_we_do/ets_ep_pwr_pds.html','',140)
			oCMenu2.makeMenu('subaa000018','subaa0023','PDHN Series','../what_we_do/ets_ep_pwr_pdhn.html','',140)
			oCMenu2.makeMenu('subaa000019','subaa0023','P2R & PRHN Series','../what_we_do/ets_ep_pwr_p2r.html','',140)
			oCMenu2.makeMenu('subaa000028','subaa0023','PR Series','../what_we_do/ets_ep_pwr_pr.html','',140)				
			oCMenu2.makeMenu('subaa000029','subaa0023','VRM Series','../what_we_do/ets_ep_pwr_vrm.html','',140)				
			oCMenu2.makeMenu('subaa000030','subaa0023','Custom Design','../what_we_do/ets_ep_pwr_cus.html','',140)				
		oCMenu2.makeMenu('subaa0024','subaa020','Digital Products','../what_we_do/ets_ep_digital.html','',140)
			oCMenu2.makeMenu('subaa000020','subaa0024','Enhanced Space Processors','../what_we_do/ets_ep_dig_esp.html','',140,32)
			oCMenu2.makeMenu('subaa000021','subaa0024','On-Board Processing (OBP)','../what_we_do/ets_ep_dig_obp.html','',140,32)
			oCMenu2.makeMenu('subaa000022','subaa0024','Command & Data Handling Units','../what_we_do/ets_ep_dig_cdh.html','',140,32)
			oCMenu2.makeMenu('subaa000023','subaa0024','Multi-Format Data Compressor','../what_we_do/ets_ep_dig_mfdc.html','',140,32)
			oCMenu2.makeMenu('subaa000024','subaa0024','Specialized Engineering Services','../what_we_do/ets_ep_dig_eng.html','',140,32)
		oCMenu2.makeMenu('subaa0025','subaa020','Software Products','../what_we_do/ets_ep_software.html','',140)
		oCMenu2.makeMenu('subaa0026','subaa020','RF Products','../what_we_do/ets_ep_rf.html','',140)
	oCMenu2.makeMenu('subaa022','','&nbsp;&nbsp; Facilities','../what_we_do/ets_fac.html','',140)

oCMenu2.makeMenu('topa11','','<strong>Engineering Services</strong>','http://www.mdafederal.com/engineering-services/','_blank',140,20,'','','','','','','','pushbuttonsubs2("../what_we_do/robotics.html")','','')
oCMenu2.makeMenu('topa12','','<strong>Geospatial Services</strong>','http://www.mdafederal.com','_blank',140,20,'','','','','','','','pushbuttonsubs2("../what_we_do/robotics.html")','','')

//Leave this line - it constructs the menu
oCMenu2.construct()
