//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|/Documents and Settings/Valued Customer/Desktop/images/" 
oCMenu.onlineRoot="/" 
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=1
oCMenu.barWidth="menu"
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX="menu"
oCMenu.barY="menu"
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=135
oCMenu.level[0].height=18 
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=-1
oCMenu.level[0].offsetY=1
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=18
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=150
oCMenu.level[2].height=19
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=0
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderClass="clLevel2border"


/******************************************
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','','&nbsp;Link 1','index.html','','42','18','images/menu_news_s.jpg','images/menu_news_s.jpg')
	oCMenu.makeMenu('sub10','top0','Latest News','TOL_Index_News_Latest.htm')
	oCMenu.makeMenu('sub11','top0','Complete News','index.html')

oCMenu.makeMenu('top1','','&nbsp;Link 2','shop/go_shopping_new.htm','','50','18','images/menu_trains_s.jpg','images/menu_trains_s.jpg')
	oCMenu.makeMenu('sub20','top1','Brawa','http://www.brawa.de')
	oCMenu.makeMenu('sub21','top1','Fleischmann','http://www.fleischmann.de')
	oCMenu.makeMenu('sub22','top1','HAG','http://www.hag.ch')
	oCMenu.makeMenu('sub23','top1','Herpa','http://www.herpa.de')
	oCMenu.makeMenu('sub24','top1','Marklin','http://www.trainsonline.com/buymarklin/index.html')
	oCMenu.makeMenu('sub25','top1','Piko','http://www.piko.de')
	oCMenu.makeMenu('sub26','top1','Roco','http://www.roco.at')
	oCMenu.makeMenu('sub27','top1','Trix','http://www.trix.de')
	
oCMenu.makeMenu('top2','','&nbsp;Link 3','index.html','','52','18','images/menu_digital_s.jpg','images/menu_digital_s.jpg')
	oCMenu.makeMenu('sub30','top2','ESU','http://www.trainsonline.com/buyesu/index.htm')
	oCMenu.makeMenu('sub31','top2','Uhlenbrock','http://www.uhlenbrock.de')
	oCMenu.makeMenu('sub32','top2','Marklin','index.html')
	oCMenu.makeMenu('sub33','top2','Misc. Hardware','index.html')
	oCMenu.makeMenu('sub34','top2','Misc. Software','index.html')
	

oCMenu.makeMenu('top3','','&nbsp;Link 4','index.html','','55','18','images/menu_scenery_s.jpg','images/menu_scenery_s.jpg')
	oCMenu.makeMenu('sub39','top3','Bemo','http://www.bemo-modellbahn.de')
	oCMenu.makeMenu('sub40','top3','Faller','http://www.faller.de')
	oCMenu.makeMenu('sub41','top3','Heico','http://www.heico-modell.de')
	oCMenu.makeMenu('sub42','top3','Heki','http://www.heki-kittler.de')
	oCMenu.makeMenu('sub43','top3','Kibri','http://www.kibri.com')
	oCMenu.makeMenu('sub44','top3','Noch','http://www.noch.com')
	oCMenu.makeMenu('sub45','top3','Pola','http://www.faller.de')
	oCMenu.makeMenu('sub46','top3','Preiser','http://www.figuren.de')
	oCMenu.makeMenu('sub47','top3','Sommerfeldt','http://www.sommerfeldt.de')
	oCMenu.makeMenu('sub48','top3','Viessmann','http://www.viessmann-modell.de')
	oCMenu.makeMenu('sub49','top3','Vollmer','http://www.moduni.de')

oCMenu.makeMenu('top5','','&nbsp;Link 5','index.html','','84','18','images/menu_inspiration_s.jpg','images/menu_inspiration_s.jpg')
	oCMenu.makeMenu('sub50','top5','MiWuLa','TOL_Index_Frontpage_GreatLayouts.htm')
	oCMenu.makeMenu('sub51','top5','Pictures','pictures.htm')
	

oCMenu.makeMenu('top6','','&nbsp;Link 6','index.html','','82','18','images/menu_accessories_s.jpg','images/menu_accessories_s.jpg')
	oCMenu.makeMenu('sub60','top6','Department 56','index.html')
	

oCMenu.makeMenu('top7','','&nbsp;Link 7','index.html','','57','18','images/menu_service_s.jpg','images/menu_service_s.jpg')
	oCMenu.makeMenu('sub70','top7','Decoder Installation','index.html')
	oCMenu.makeMenu('sub71','top7','Engine repair','index.html')

oCMenu.makeMenu('top8','','&nbsp;Link 8','index.html','','44','18','images/menu_about_s.jpg','images/menu_about_s.jpg')
	oCMenu.makeMenu('sub80','top8','About Me','http://www.jacquesvogelaar.com')
	oCMenu.makeMenu('sub81','top8','Trainsonline','index.html')
	oCMenu.makeMenu('sub82','top8','Contact Info','index.html')


//Leave this line - it constructs the menu
oCMenu.construct()		

