/*** 
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.
**/

//Menu object creation
oCMenuNL=new makeCM("oCMenuNL") //Making the menu object. Argument: menuname

//Menu properties   
oCMenuNL.pxBetween=0
//Using the cm_page object to place the menu ----
oCMenuNL.fromLeft=0
oCMenuNL.fromTop=0
oCMenuNL.rows=0
oCMenuNL.menuPlacement=0
                                                             
oCMenuNL.offlineRoot="d:/websites/brusselsvolley/"
oCMenuNL.onlineRoot="http://www.brusselsvolley.be" 
oCMenuNL.resizeCheck=1 
oCMenuNL.wait=1000 
oCMenuNL.fillImg="cm_fill.gif"
oCMenuNL.zIndex=0

//Background bar properties
oCMenuNL.useBar=0

//Level properties - ALL properties have to be spesified in level 0
oCMenuNL.level[0]=new cm_makeLevel() //Add this for each new level
oCMenuNL.level[0].width=135
oCMenuNL.level[0].height=16 
oCMenuNL.level[0].regClass="clLevel0"
oCMenuNL.level[0].overClass="clLevel0over"
oCMenuNL.level[0].borderX=1
oCMenuNL.level[0].borderY=1
oCMenuNL.level[0].borderClass="clLevel0border"
oCMenuNL.level[0].offsetX=0
oCMenuNL.level[0].offsetY=0
oCMenuNL.level[0].rows=0
oCMenuNL.level[0].arrow=0
oCMenuNL.level[0].arrowWidth=0
oCMenuNL.level[0].arrowHeight=0
oCMenuNL.level[0].align="right"


/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/
oCMenuNL.makeMenu('top0','','&nbsp;Visie','/nl/visie.htm')

oCMenuNL.makeMenu('top1','','&nbsp;Partnership','/nl/partnership.htm','')
	
oCMenuNL.makeMenu('top2','','&nbsp;Clinics','/nl/clinics.htm')
	
oCMenuNL.makeMenu('top3','','&nbsp;Beachvolley','/nl/beach.htm')

oCMenuNL.makeMenu('top4','','&nbsp;Volley Smash & GO','')
	oCMenuNL.makeMenu('sub40','top4','Wat','/nl/wat.htm')
	oCMenuNL.makeMenu('sub41','top4','Fotos','/photogallery/index.htm')
	oCMenuNL.makeMenu('sub42','top4','Deelnemende Clubs','/nl/clubs.htm')
	oCMenuNL.makeMenu('sub43','top4','Apotheose','/nl/apotheose.htm')
	oCMenuNL.makeMenu('sub44','top4','Evaluatieformulier','/nl/evaluatieformulier.htm')
	oCMenuNL.makeMenu('sub45','top4','Wedstrijd','/nl/wedstrijd.htm')

oCMenuNL.makeMenu('top5','','&nbsp;Contacteren','/nl/contact.htm')


//Leave this line - it constructs the menu
oCMenuNL.construct()		


//Extra code to find position:
function findPos(num){
  //alert(num)
  if(bw.ns4){   //Netscape 4
    x = document.layers["layerMenu"+num].pageX
    y = document.layers["layerMenu"+num].pageY
  }else{ //other browsers
    x=0; y=0; var el,temp
    el = bw.ie4?document.all["divMenu"+num]:document.getElementById("divMenu"+num);
    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]
}
function placeElements(){
  //Changing the position of ALL top items:
  pos = findPos(0)
  oCMenuNL.m["top0"].b.moveIt(pos[0],pos[1])
  pos = findPos(1)
  oCMenuNL.m["top1"].b.moveIt(pos[0],pos[1])
  pos = findPos(2)
  oCMenuNL.m["top2"].b.moveIt(pos[0],pos[1])
  pos = findPos(3)
  oCMenuNL.m["top3"].b.moveIt(pos[0],pos[1])
  pos = findPos(4)
  oCMenuNL.m["top4"].b.moveIt(pos[0],pos[1])
  pos = findPos(5)
  oCMenuNL.m["top5"].b.moveIt(pos[0],pos[1])
  
  //Setting the fromtop value
  oCMenuNL.fromTop = pos[1]
}
placeElements()
//Setting it to re place the elements after resize - the resize is not perfect though..
oCMenuNL.onafterresize="placeElements()"
