/*** 
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=5
oCMenu2.fromTop=205 
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=1
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) 
*************************************/

 // IP
 oCMenu2.makeMenu('topa3','','<strong>Digital Imaging</strong>','/digital-imaging','',156)
  oCMenu2.makeMenu('suba18','topa3','EarthSat NaturalVue','/digital-imaging/earthsat-naturalvue','',156)
  oCMenu2.makeMenu('suba1801','suba18','Browse & Purchase NaturalVue','http://www.earthsat.com/ArcIMS/naturalvue','',190)
  oCMenu2.makeMenu('suba1802','suba18','Visualization & Simulation','/digital-imaging/earthsat-naturalvue/visualization-simulation/','',190)
  oCMenu2.makeMenu('suba1803','suba18','High Resolution Pricing','/digital-imaging/earthsat-naturalvue/highres-pricing/','',190)
  oCMenu2.makeMenu('suba1808','suba18','High Resolution Samples','/digital-imaging/earthsat-naturalvue/hires-sample/','',190)
  oCMenu2.makeMenu('suba1804','suba18','NaturalVue Advantages','/digital-imaging/earthsat-naturalvue/naturalvue-advantages/','',190)
  oCMenu2.makeMenu('suba1805','suba18','NaturalVue White Paper','/digital-imaging/earthsat-naturalvue/NaturalVueWhitePaper.pdf/view','',190)
  oCMenu2.makeMenu('suba1806','suba18','Regional Pricing','/digital-imaging/earthsat-naturalvue/naturalvue-pricing.pdf/view','',190)
  oCMenu2.makeMenu('suba1807','suba18','Distribution License','/digital-imaging/earthsat-naturalvue/distribution-license/','',190) 

  oCMenu2.makeMenu('suba19','topa3','EarthSat GeoCover','/geocover','',156)

  oCMenu2.makeMenu('suba20','topa3','Production Capabilities','/digital-imaging/production-capabilities-support/','',156)
  oCMenu2.makeMenu('suba2001','suba20','Hardware & Software','/digital-imaging/production-capabilities-support/hardware-software/','',190)
  oCMenu2.makeMenu('suba2003','suba20','Image Processing','/digital-imaging/production-capabilities-support/image-processing/','',190)
  oCMenu2.makeMenu('suba2002','suba20','Customer Services & Projects','/digital-imaging/production-capabilities-support/customer-services-project-management/','',190)
  oCMenu2.makeMenu('suba2004','suba20','Commercial Sensors','/digital-imaging/production-capabilities-support/commercial-sensors/','',190) 

  oCMenu2.makeMenu('suba21','topa3','Image Products/Services','/digital-imaging/image-products-services/','',156)
  oCMenu2.makeMenu('suba2101','suba21','Image Processing Services','/digital-imaging/image-products-services/image-processing-services/','',200)
  oCMenu2.makeMenu('suba2102','suba21','GeoCover Ortho Landsat Products','/digital-imaging/image-products-services/geocover-ortho-landsat-products/','',200)
  oCMenu2.makeMenu('suba2103','suba21','Example Projects','/digital-imaging/image-products-services/example-projects/','',200) 

  oCMenu2.makeMenu('suba22','topa3','Printing Services','/digital-imaging/printing-services/','',156)
  oCMenu2.makeMenu('suba2201','suba22','Printer Specifications','/digital-imaging/printing-services/printer-specifications/','',160)
  oCMenu2.makeMenu('suba2202','suba22','Print Pricing','/digital-imaging/printing-services/print-pricing/','',160)
  oCMenu2.makeMenu('suba2203','suba22','LightJet 50000RS Printer','/digital-imaging/printing-services/byronprinting.jpg/view','',160)

  oCMenu2.makeMenu('suba23','topa3','Research & Development','/digital-imaging/research-development/','',156)
  oCMenu2.makeMenu('suba2301','suba23','Hyperspectral','/digital-imaging/research-development/hyperspectral/','',220)
  oCMenu2.makeMenu('suba2302','suba23','Thermal IR','/digital-imaging/research-development/thermal-ir/','',220)
  oCMenu2.makeMenu('suba2303','suba23','Scientific Analysis','/digital-imaging/research-development/scientific-analysis/','',220)
  oCMenu2.makeMenu('suba2304','suba23','Multispectral Algorithm Development','/digital-imaging/research-development/multispectral-algorithm-development/','',220)

 // Environ GIS
oCMenu2.makeMenu('topa1','','<strong>Environment & GIS</strong>','/environment-gis','',156)
 oCMenu2.makeMenu('suba11','topa1','&nbsp;&nbsp;Remote Sensing','/environment-gis/remote-sensing','',156)
  oCMenu2.makeMenu('suba1101','suba11','Land Use/Land Cover','/environment-gis/remote-sensing/land-use-land-cover','',190)
  oCMenu2.makeMenu('suba1102','suba11','Change Detection','/environment-gis/remote-sensing/change-detection','',190)
  oCMenu2.makeMenu('suba1103','suba11','Agricultural Analysis','/environment-gis/remote-sensing/agricultural-analysis','',190)
  oCMenu2.makeMenu('suba1104','suba11','Disaster Response','/environment-gis/remote-sensing/disaster-response','',190)
  oCMenu2.makeMenu('suba1105','suba11','Petroleum/Water Exploration','/geology/mineral-exploration','',190)

 oCMenu2.makeMenu('suba12','topa1','&nbsp;&nbsp;Geographic Info. Systems','/environment-gis/geographic-information-systems','',156)
  oCMenu2.makeMenu('suba1201','suba12','Natural/Man Made Hazards','/environment-gis/geographic-information-systems/hazards','',190)
  oCMenu2.makeMenu('suba1202','suba12','Population Forecasting','/environment-gis/geographic-information-systems/population-forecasting','',190)
  oCMenu2.makeMenu('suba1203','suba12','Agriculture GIS','/environment-gis/geographic-information-systems/agriculture','',190)
  oCMenu2.makeMenu('suba1204','suba12','Hydrology','/environment-gis/geographic-information-systems/hydrology','',190)
  oCMenu2.makeMenu('suba1205','suba12','Food & Water Supply Modeling','/environment-gis/geographic-information-systems/supply-modeling','',190)
  oCMenu2.makeMenu('suba1206','suba12','Geology','/environment-gis/geographic-information-systems/geology','',190)
  oCMenu2.makeMenu('suba1207','suba12','Facilities Management','/environment-gis/geographic-information-systems/facilities-management','',190)
  oCMenu2.makeMenu('suba1208','suba12','GIS Education & Training','/environment-gis/geographic-information-systems/gis-training','',190)
  oCMenu2.makeMenu('suba1209','suba12','Internet Mapping','/environment-gis/geographic-information-systems/internet-mapping','',190)
  oCMenu2.makeMenu('suba1210','suba12','Applications Development','/environment-gis/geographic-information-systems/application-development','',190)
  oCMenu2.makeMenu('suba1211','suba12','Map Digitization & Conversion','/environment-gis/geographic-information-systems/map-conversion','',190)

  oCMenu2.makeMenu('suba13','topa1','&nbsp;&nbsp;National Security Support','/environment-gis/national-security-policy-support','',156)
   oCMenu2.makeMenu('suba1301','suba13','Land Use Analysis','/environment-gis/national-security-policy-support/land-use','',220)
   oCMenu2.makeMenu('suba1302','suba13','Disaster Analysis & Relief Support','/environment-gis/national-security-policy-support/disaster-support','',220)
   oCMenu2.makeMenu('suba1303','suba13','Scientific Research & Data Analysis','/environment-gis/national-security-policy-support/research-data','',220)
   oCMenu2.makeMenu('suba1304','suba13','End to End Solutions','/environment-gis/end-to-end-solutions','',220)
   oCMenu2.makeMenu('suba1305','suba13','GeoCover Ortho & LC','/geocover','',220)

// Geology
oCMenu2.makeMenu('topa2','','<strong>Geology</strong>','/geology','',156)
 oCMenu2.makeMenu('suba14','topa2','Oil & Gas Industry','/geology/oil-gas','',156)
 oCMenu2.makeMenu('suba1401','suba14','Geologic Interpretation','/geology/oil-gas/geomap','',160)
 oCMenu2.makeMenu('suba1402','suba14','Hydrocarbon Indications','/geology/oil-gas/hydrocarbon','',160)
   oCMenu2.makeMenu('subb01','suba1402','Seep Enhancement','/geology/oil-gas/hydrocarbon/seep-enhancement/','',156)
   oCMenu2.makeMenu('subb02','suba1402','Minimum Noise','/geology/oil-gas/hydrocarbon/minimum-noise/','',156)
   oCMenu2.makeMenu('subb03','suba1402','Aster Spectral Anomolies','/geology/oil-gas/hydrocarbon/aster-seeps/','',156)
 oCMenu2.makeMenu('suba1403','suba14','Fracture Analysis','/geology/oil-gas/fracture-analysis','',160)
 oCMenu2.makeMenu('suba1404','suba14','Special Methods','/geology/oil-gas/special-methods','',160)
 oCMenu2.makeMenu('suba1405','suba14','Integrated Studies','/geology/oil-gas/integrated-studies','',160)

 oCMenu2.makeMenu('suba15','topa2','Water Exploration','/geology/water-exploration','',156)
 oCMenu2.makeMenu('suba1501','suba15','Precipitation & Meteorology','/geology/water-exploration/precipitation-meteorology','',180)
 oCMenu2.makeMenu('suba1502','suba15','Geology & Hydrogeology','/geology/water-exploration/geology-hydrogeology','',180)
 oCMenu2.makeMenu('suba1503','suba15','GIS & Modeling','/geology/water-exploration/gis-modeling','',180)

 oCMenu2.makeMenu('suba16','topa2','Mineral Exploration','/geology/mineral-exploration','',156)
 oCMenu2.makeMenu('suba1601','suba16','Fracture Systems','/geology/oil-gas/fracture-analysis','',160)
 oCMenu2.makeMenu('suba1602','suba16','Lithology','/geology/oil-gas/geomap','',160)
 oCMenu2.makeMenu('suba1603','suba16','Geologic Structure','/geology/mineral-exploration/geologic-structure','',160)
 oCMenu2.makeMenu('suba1604','suba16','Alteration Zone Analysis','/geology/mineral-exploration/alteration-zone-analysis','',160)
 oCMenu2.makeMenu('suba1605','suba16','Image Processing','/geology/mineral-exploration/image-processing','',160)

 oCMenu2.makeMenu('suba17','topa2','Engineering Support','/geology/engineering-support','',156)
 oCMenu2.makeMenu('suba1701','suba17','Geologic Interpretation/Mapping','/geology/engineering-support/geointerp','',190)
 oCMenu2.makeMenu('suba1702','suba17','Land Use/Land Cover','/environment-gis/remote-sensing/land-use-land-cover','',190)
 oCMenu2.makeMenu('suba1703','suba17','Flooding','/mda-earthsat-weather/floodwatch','',190)

 // MDA Earthsat Weather
 oCMenu2.makeMenu('topa5','','<strong>MDA EarthSat Weather</strong>','/mda-earthsat-weather','',156)
	 oCMenu2.makeMenu('suba25','topa5','CROPCAST Ag Services','/mda-earthsat-weather/cropcast-ag-services/','',156)
		 oCMenu2.makeMenu('suba2501','suba25','About CROPCAST(Ag Weather)','/mda-earthsat-weather/cropcast-ag-services/about-cropcast','',190)
		 oCMenu2.makeMenu('suba2502','suba25','Daily Agricultural Updates','/mda-earthsat-weather/cropcast-ag-services/daily-agricultural-updates/','',190)
		 oCMenu2.makeMenu('suba2503','suba25','Weekly Crop Updates','/mda-earthsat-weather/cropcast-ag-services/weekly-crop-updates','',190)
		 oCMenu2.makeMenu('suba2504','suba25','Special Updates','/mda-earthsat-weather/cropcast-ag-services/special-updates','',190)
		 oCMenu2.makeMenu('suba2505','suba25','Crop Model Graphics','/mda-earthsat-weather/cropcast-ag-services/crop-model-graphics','',190)

	oCMenu2.makeMenu('suba26','topa5','EarthSat Energy Weather','/mda-earthsat-weather/earthsat-energy-weather','',156)
		 oCMenu2.makeMenu('suba2602','suba26','About Us','/mda-earthsat-weather/earthsat-energy-weather/about-us-energy-weather','',190)
		 oCMenu2.makeMenu('suba2603','suba26','Daily Products','/mda-earthsat-weather/earthsat-energy-weather/energy-weather-daily-products','',190)
		 oCMenu2.makeMenu('suba2604','suba26','Monthly Products','/mda-earthsat-weather/earthsat-energy-weather/energy-weather-monthly-products','',190)
		 oCMenu2.makeMenu('suba2605','suba26','Seasonal Products','/mda-earthsat-weather/earthsat-energy-weather/energy-weather-seasonal-products','',190)
		 oCMenu2.makeMenu('suba2606','suba26','Customized Services','/mda-earthsat-weather/earthsat-energy-weather/energy-weather-customized-services','',190)
		 oCMenu2.makeMenu('suba2607','suba26','Support of CME Contracts','/mda-earthsat-weather/earthsat-energy-weather/support-of-cme-contracts','',190)

 oCMenu2.makeMenu('suba27','topa5','Historical Weather Data','http://www.earthsat.com/misc/data-lookup/','',156)
 oCMenu2.makeMenu('suba28','topa5','Business Partners','/mda-earthsat-weather/mda-earthsat-business-partners','',156)

// Defense
 oCMenu2.makeMenu('topa8','','<strong>Defense</strong>','/defense','',156)
	 oCMenu2.makeMenu('suba29','topa8','Mission Rehearsal','/digital-imaging/earthsat-naturalvue/','',156)
	 oCMenu2.makeMenu('suba2901','topa8','Visualization & Simulation','digital-imaging/earthsat-naturalvue/visualization-simulation/','',156)
	 oCMenu2.makeMenu('suba2902','topa8','Land Cover Mapping','/geocover/geocoverlc/gclcdataproduct/','',156)
	 oCMenu2.makeMenu('suba2903','topa8','Satellite Image Processing','/digital-imaging/','',156)
	 oCMenu2.makeMenu('suba2904','topa8','Commercial/Civil Imagery','/digital-imaging/earthsat-naturalvue/highres-pricing/','',156)
	 oCMenu2.makeMenu('suba2905','topa8','Weather Data','http://www.earthsat.com/misc/data-lookup/','',156)
	 oCMenu2.makeMenu('suba2906','topa8','Cloud Forecasting','/defense/cloudcast/','',156)

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