/*** 
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="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1
oCMenu.wait=600
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=0
oCMenu.barWidth=""
oCMenu.barHeight="" 
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=0
oCMenu.level[0].height=0
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=0
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=0
oCMenu.level[1].borderY=0
oCMenu.level[1].align= 
oCMenu.level[1].offsetX=111
oCMenu.level[1].offsetY=9
oCMenu.level[1].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('top10','','','major.htm','haupthaupt','120','19','Images/but_0_majorrides_on.gif','Images/but_0_majorrides_off.gif')
	oCMenu.makeMenu('sub101','top10','','Starshape.htm','haupthaupt','120','17','Images/but_1_starshape_on.gif','Images/but_1_starshape_off.gif')
	oCMenu.makeMenu('sub102','top10','','Suspendedfc.htm','haupthaupt','120','17','Images/but_2_suspendedfc_on.gif','Images/but_2_suspendedfc_off.gif')
	oCMenu.makeMenu('sub103','top10','','','haupthaupt','120','17','Images/but_3_others_on.gif','Images/but_3_others_off.gif')
		oCMenu.makeMenu('sub1031','sub103','','Observationplatform.htm','haupthaupt','120','17','Images/but_3_1_observationplatform_on.gif','Images/but_3_1_observationplatform_off.gif')
		oCMenu.makeMenu('sub1032','sub103','','Fireball.htm','haupthaupt','120','17','Images/but_3_2_fireball_on.gif','Images/but_3_2_fireball_off.gif')
		oCMenu.makeMenu('sub1033','sub103','','Hangglider.htm','haupthaupt','120','17','Images/but_3_3_hangglider_on.gif','Images/but_3_3_hangglider_off.gif')

oCMenu.makeMenu('top20','','','','','3','19','cm_fill.gif')

oCMenu.makeMenu('top30','','','carousels.htm','haupthaupt','120','19','Images/but_10_carousels_on.gif','Images/but_10_carousels_off.gif')
    oCMenu.makeMenu('sub301','top30','','Dragonrides.htm','haupthaupt','120','17','Images/but_dragon_ride_on.gif','Images/but_dragon_ride_off.gif')
    oCMenu.makeMenu('sub302','top30','','Dragonboats.htm','haupthaupt','120','17','Images/but_11_dragonboats_on.gif','Images/but_11_dragonboats_off.gif')
	oCMenu.makeMenu('sub303','top30','','Roundabouts.htm','haupthaupt','120','17','Images/but_12_roundabouts_on.gif','Images/but_12_roundabouts_off.gif')
	oCMenu.makeMenu('sub304','top30','','Flying_Fish.htm','haupthaupt','120','17','Images/but_13_flyingfish_on.gif','Images/but_13_flyingfish_off.gif')
	oCMenu.makeMenu('sub305','top30','','Jetskis.htm','haupthaupt','120','17','Images/but_14_jetskis_on.gif','Images/but_14_jetskis_off.gif')
	oCMenu.makeMenu('sub306','top30','','','haupthaupt','120','17','Images/but_15_others_on.gif','Images/but_15_others_off.gif')
		oCMenu.makeMenu('sub3061','sub306','','Typhoon.htm','haupthaupt','120','17','Images/but_15_1_typhoon_on.gif','Images/but_15_1_typhoon_off.gif')
		oCMenu.makeMenu('sub3062','sub306','','Greatairplaneride.htm','haupthaupt','120','17','Images/but_15_2_greatairplaineride_on.gif','Images/but_15_2_greatairplaineride_off.gif')
		oCMenu.makeMenu('sub3063','sub306','','Kiddieroundabouts.htm','haupthaupt','120','17','Images/but_15_3_kiddieroundabout_on.gif','Images/but_15_3_kiddieroundabout_off.gif')


oCMenu.makeMenu('top40','','','','','3','19','cm_fill.gif')

oCMenu.makeMenu('top50','','','fun.htm','haupthaupt','120','19','Images/but_20_funrides_on.gif','Images/but_20_funrides_off.gif')
	oCMenu.makeMenu('sub501','top50','','Kontiki.htm','haupthaupt','120','17','Images/but_21_kontiki_on.gif','Images/but_21_kontiki_off.gif')
	oCMenu.makeMenu('sub502','top50','','familienfreifallturm.htm','haupthaupt','120','17','Images/but_22_familyfreefalltower_on.gif','Images/but_22_familyfreefalltower_off.gif')
	oCMenu.makeMenu('sub503','top50','','Funskycycle.htm','haupthaupt','120','17','Images/but_23_funskycycle_on.gif','Images/but_23_funskycycle_off.gif')

oCMenu.makeMenu('top60','','','','','3','19','cm_fill.gif')

oCMenu.makeMenu('top70','','','roller.htm','haupthaupt','120','19','Images/but_30_rollercoaster_on.gif','Images/but_30_rollercoaster_off.gif')
	oCMenu.makeMenu('sub701','top70','','Tivolicoaster.htm','haupthaupt','120','17','Images/but_31_tivolicoaster_on.gif','Images/but_31_tivolicoaster_off.gif')
		oCMenu.makeMenu('sub7011','sub701','','Smalltivoli.htm','haupthaupt','120','17','Images/but_31_1_smalltivoli_on.gif','Images/but_31_1_smalltivoli_off.gif')
		oCMenu.makeMenu('sub7012','sub701','','Mediumtivoli.htm','haupthaupt','120','17','Images/but_31_2_mediumtivoli_on.gif','Images/but_31_2_mediumtivoli_off.gif')
		oCMenu.makeMenu('sub7013','sub701','','Largetivoli.htm','haupthaupt','120','17','Images/but_31_3_largetivoli_on.gif','Images/but_31_3_largetivoli_off.gif')
		oCMenu.makeMenu('sub7014','sub701','','Newtivoli.htm','haupthaupt','120','17','Images/but_31_4_newtivoli_on.gif','Images/but_31_4_newtivoli_off.gif')
	oCMenu.makeMenu('sub702','top70','','Forcecoaster.htm','haupthaupt','120','17','Images/but_32_forcecoaster_on.gif','Images/but_32_forcecoaster_off.gif')
		oCMenu.makeMenu('sub7021','sub702','','Forcezero.htm','haupthaupt','120','17','Images/but_32_1_forcecoasterzero_on.gif','Images/but_32_1_forcecoasterzero_off.gif')
		oCMenu.makeMenu('sub7022','sub702','','Forceone.htm','haupthaupt','120','17','Images/but_32_2_forcecoasterone_on.gif','Images/but_32_2_forcecoasterone_off.gif')
		oCMenu.makeMenu('sub7023','sub702','','Forcetwo.htm','haupthaupt','120','17','Images/but_32_3_forcecoastertwo_on.gif','Images/but_32_3_forcecoastertwo_off.gif')
		oCMenu.makeMenu('sub7024','sub702','','Forcethree.htm','haupthaupt','120','17','Images/but_32_4_forcecoasterthree_on.gif','Images/but_32_4_forcecoasterthree_off.gif')
		oCMenu.makeMenu('sub7025','sub702','','Forcefour.htm','haupthaupt','120','17','Images/but_32_5_forcecoasterfour_on.gif','Images/but_32_5_forcecoasterfour_off.gif')
		oCMenu.makeMenu('sub7026','sub702','','Legoland.htm','haupthaupt','120','17','Images/but_32_6_forcecoasterfive_on.gif','Images/but_32_6_forcecoasterfive_off.gif')
	oCMenu.makeMenu('sub703','top70','','Elevated_Seating_Coaster.htm','haupthaupt','120','17','Images/but_32_a_elevated_on.gif','Images/but_32_a_elevated_off.gif')
	oCMenu.makeMenu('sub704','top70','','expo.htm','haupthaupt','120','17','Images/but_33_darkrides_on.gif','Images/but_33_darkrides_off.gif')
	oCMenu.makeMenu('sub705','top70','','Customcoasters.htm','haupthaupt','120','17','Images/but_34_customcoasters_on.gif','Images/but_34_customcoasters_off.gif')
/*****************************
		oCMenu.makeMenu('sub7051','sub705','','Legoland.htm','haupthaupt','120','17','Images/but_34_1_legolandgermany_on.gif','Images/but_34_1_legolandgermany_off.gif')
		oCMenu.makeMenu('sub7052','sub705','','Knott.htm','haupthaupt','120','17','Images/but_34_2_knottberryfarm_on.gif','Images/but_34_2_knottberryfarm_off.gif')
		oCMenu.makeMenu('sub7053','sub705','','Bmr.htm','haupthaupt','120','17','Images/but_34_3_bmr_on.gif','Images/but_34_3_bmr_off.gif')
		oCMenu.makeMenu('sub7054','sub705','','Jrbmr.htm','haupthaupt','120','17','Images/but_34_4_jrbmr_on.gif','Images/but_34_4_jrbmr_off.gif')
		oCMenu.makeMenu('sub7055','sub705','','Linnamaeki.htm','haupthaupt','120','17','Images/but_34_5_linnamaeki_on.gif','Images/but_34_5_linnamaeki_off.gif')
		oCMenu.makeMenu('sub7056','sub705','','Campsnoopy.htm','haupthaupt','120','17','Images/but_34_6_campsnoopy_on.gif','Images/but_34_6_campsnoopy_off.gif')
		oCMenu.makeMenu('sub7057','sub705','','Puri.htm','haupthaupt','120','17','Images/but_34_7_puri_on.gif','Images/but_34_7_puri_off.gif')
		oCMenu.makeMenu('sub7058','sub705','','Panoramapark.htm','haupthaupt','120','17','Images/but_34_8_panoramapark_on.gif','Images/but_34_8_panoramapark_off.gif')
		oCMenu.makeMenu('sub7059','sub705','','Spinningcoaster.htm','haupthaupt','120','17','Images/but_34_9_spinningcoaster_on.gif','Images/but_34_9_spinningcoaster_off.gif')
		oCMenu.makeMenu('sub70510','sub705','','Hornet.htm','haupthaupt','120','17','Images/but_34_10_hornet_on.gif','Images/but_34_10_hornet_off.gif')
********************************/

oCMenu.makeMenu('top80','','','','','3','19','cm_fill.gif')

oCMenu.makeMenu('top90','','','wellenflieger.htm','haupthaupt','120','19','Images/but_40_waveswinger_on.gif','Images/but_40_waveswinger_off.gif')
	oCMenu.makeMenu('sub901','top90','','Waveswinger32.htm','haupthaupt','120','17','Images/but_41_waveswinger32_on.gif','Images/but_41_waveswinger32_off.gif')
	oCMenu.makeMenu('sub902','top90','','Waveswinger40.htm','haupthaupt','120','17','Images/but_42_waveswinger40_on.gif','Images/but_42_waveswinger40_off.gif')
	oCMenu.makeMenu('sub903','top90','','Waveswinger48.htm','haupthaupt','120','17','Images/but_43_waveswinger48_on.gif','Images/but_43_waveswinger48_off.gif')


oCMenu.makeMenu('top100','','','','','3','19','cm_fill.gif')

oCMenu.makeMenu('top110','','','','haupthaupt','120','19','Images/but_50_towerlaunchcoaster_on.gif','Images/but_50_towerlaunchcoaster_off.gif')
	oCMenu.makeMenu('sub1101','top110','','TSTower_Lauch_Coaster.htm','haupthaupt','120','17','Images/but_51_tech_on.gif','Images/but_51_tech_off.gif')
	oCMenu.makeMenu('sub1102','top110','','Photos_Tower_Lauch_Coaster.htm','haupthaupt','120','17','Images/but_52_photos_on.gif','Images/but_52_photos_off.gif')
	oCMenu.makeMenu('sub1103','top110','','Video_Tower_Lauch_Coaster.htm','haupthaupt','120','17','Images/but_53_video_on.gif','Images/but_53_video_off.gif')

//Leave this line - it constructs the menu
oCMenu.construct()		