/******************************************
Menu item creation:
oCMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/

oCMenu.makeMenu('top1','','','index.html','',144,64,'images/pocetnaoff.gif','images/pocetnaon.gif')

oCMenu.makeMenu('top2','','','delatnosti.html','',157,64,'images/delatnostioff.gif','images/delatnostion.gif')

oCMenu.makeMenu('top3','','','ideja.html','',118,64,'images/idejaoff.gif','images/idejaon.gif')

oCMenu.makeMenu('top4','','','','',146,64,'images/principalioff.gif','images/principalion.gif')
	oCMenu.makeMenu('sub41','top4','<div align="center"><strong>Yokogawa</strong></div>','principali/yokogawa/yokogawa-katalog.html')
	oCMenu.makeMenu('sub42','top4','<div align="center"><strong>Vega</strong></div>','principali/vega/vega-katalog.html')
	oCMenu.makeMenu('sub43','top4','<div align="center"><strong>PR Electronics</strong></div>','principali/pr_electronics/pr-electronics-katalog.html')
	oCMenu.makeMenu('sub44','top4','<div align="center"><strong>K-Patents</strong></div>','principali/k_patents/kpatents-katalog.html')
	oCMenu.makeMenu('sub45','top4','<div align="center"><strong>ECM ECO Monitoring</strong></div>','principali/ecm-eco/ecm-katalog.html')
	oCMenu.makeMenu('sub46','top4','<div align="center"><strong>SEKO</strong></div>','principali/seko/seko-katalog.html')
	oCMenu.makeMenu('sub47','top4','<div align="center"><strong>Bonetti</strong></div>','principali/bonetti/bonetti-katalog.html')
	oCMenu.makeMenu('sub48','top4','<div align="center"><strong>Badotherm</strong></div>','principali/badotherm/badotherm-katalog.html')
	oCMenu.makeMenu('sub49','top4','<div align="center"><strong>Jako</strong></div>','principali/jako/jako-katalog.html')
	oCMenu.makeMenu('sub410','top4','<div align="center"><strong>RTK</strong></div>','principali/rtk/rtk-katalog.html')
	oCMenu.makeMenu('sub411','top4','<div align="center"><strong>Siap+Micros</strong></div>','principali/siap-micros/siap-katalog.html')
	oCMenu.makeMenu('sub412','top4','<div align="center"><strong>Seiko</strong></div>','principali/seiko/seiko-katalog.html')
	oCMenu.makeMenu('sub413','top4','<div align="center"><strong>Italocoppie</strong></div>','principali/italcoppie/italcoppie-katalog.html')
	oCMenu.makeMenu('sub414','top4','<div align="center"><strong>Process Sensors</strong></div>','principali/process_sensors/process-sensors-katalog.html')
	oCMenu.makeMenu('sub415','top4','<div align="center"><strong>Techinservice</strong></div>','principali/techin/techin-katalog.html')
	oCMenu.makeMenu('sub416','top4','<div align="center"><strong>ECM PROCESSANALYTIC</strong></div>','principali/ecm/ecm-katalog.html','','','45')
	
oCMenu.makeMenu('top5','','','reference.html','',151,64,'images/referenceoff.gif','images/referenceon.gif')

oCMenu.makeMenu('top6','','','onama.html','',134,64,'images/onamaoff.gif','images/onamaon.gif')

oCMenu.makeMenu('top7','','','contact.html','',157,64,'images/kontaktoff.gif','images/kontakton.gif')

//Leave this line - it constructs the menu
oCMenu.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(1)
  oCMenu.m["top1"].b.moveIt(pos[0],pos[1])
  pos = findPos(2)
  oCMenu.m["top2"].b.moveIt(pos[0],pos[1])
  pos = findPos(3)
  oCMenu.m["top3"].b.moveIt(pos[0],pos[1])
  pos = findPos(4)
  oCMenu.m["top4"].b.moveIt(pos[0],pos[1])
  pos = findPos(5)
  oCMenu.m["top5"].b.moveIt(pos[0],pos[1])
  pos = findPos(6)
  oCMenu.m["top6"].b.moveIt(pos[0],pos[1])
  pos = findPos(7)
  oCMenu.m["top7"].b.moveIt(pos[0],pos[1])
  
  //Setting the fromtop value
  oCMenu.fromTop = pos[1]
}
placeElements()
//Setting it to re place the elements after resize - the resize is not perfect though..
oCMenu.onafterresize="placeElements()"

