/******************************************
Menu item creation:
oCMenu2.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/

oCMenu2.makeMenu('top9','','','','',141,38,'images/servicesoff.gif','images/serviceson.gif','','','bottomright')
	oCMenu2.makeMenu('sub91','top9','<div align="center">Design</div>','webdesign.html','','97')
	oCMenu2.makeMenu('sub92','top9','<div align="center">Development</div>','webdev.html','','97')
	oCMenu2.makeMenu('sub93','top9','<div align="center">Search Engine<br>Optimization</div>','seo.html','','97','32')

//Leave this line - it constructs the menu
oCMenu2.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(9)
  oCMenu2.m["top9"].b.moveIt(pos[0],pos[1])
  
  //Setting the fromtop value
  oCMenu2.fromTop = pos[1]
}
placeElements()
//Setting it to re place the elements after resize - the resize is not perfect though..
oCMenu2.onafterresize="placeElements()"

