/*** 
Comes - This is the menu creation code - 
**/

/*** 
Funzione per determinare la larghezza della finestra
**/
function WSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
/*** 	
window.alert( 'Width = ' + myWidth );
**/

    return myWidth;
}



//Menu object creation
oCMenu = new makeCM("oCMenu") //Making the menu object. Argument: menuname

//Menu properties   
oCMenu.pxBetween=10
oCMenu.fromLeft=(WSize()-1000)/2
oCMenu.fromTop=115
oCMenu.rows=1
oCMenu.menuPlacement=0

oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=0
oCMenu.wait=1000 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=21


//Background bar properties
oCMenu.useBar=0
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=130
oCMenu.level[0].height=21
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=0
oCMenu.level[0].borderY=0
oCMenu.level[0].borderClass=0
oCMenu.level[0].offsetX=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=0
oCMenu.level[0].align="bottom" 


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=20
oCMenu.level[1].regClass="cl2Level1"
oCMenu.level[1].overClass="cl2Level1over"
oCMenu.level[1].borderX=0
oCMenu.level[1].borderY=0
oCMenu.level[1].align="center" 
oCMenu.level[1].offsetX=-(oCMenu.level[0].width-2)/2+20
oCMenu.level[1].offsetY=0
oCMenu.level[1].rows=0
oCMenu.level[1].borderClass="cl2Level1border"


/******************************************
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','','FABRICA','#','')
	oCMenu.makeMenu('sub00','top0','Historia','/es/storia.htm')
	oCMenu.makeMenu('sub01','top0','Logo','/es/logo.htm')
	oCMenu.makeMenu('sub02','top0','Filosofia','/es/filosofia.htm')
	oCMenu.makeMenu('sub03','top0','Como alcanzarnos','/es/raggiungerci.htm')
	
	
oCMenu.makeMenu('top1','','LINEAS','#','')
	oCMenu.makeMenu('sub10','top1','Lineas de Receta','/es/rxlab.htm')
	oCMenu.makeMenu('sub11','top1','Lineas esfericas','/es/lentisferiche.htm')
	oCMenu.makeMenu('sub12','top1','Lineas toricas','/es/lentitoriche.htm')
	
	
oCMenu.makeMenu('top2','','KNOW HOW','#','')
	oCMenu.makeMenu('sub20','top2','Manuales','/es/manuali.htm')
	oCMenu.makeMenu('sub21','top2','Software','/es/software.htm')


oCMenu.makeMenu('top3','','PRODUCTOS','#','')
	oCMenu.makeMenu('sub30','top3','Generadores','/es/catalogo.aspx?categoria=generatori')
	oCMenu.makeMenu('sub31','top3','Pulidoras','/es/catalogo.aspx?categoria=lucidatrici')
	oCMenu.makeMenu('sub32','top3','Lineas robotizadas','/es/catalogo.aspx?categoria=robotizzate')
	oCMenu.makeMenu('sub33','top3','Accesorios','/es/catalogo.aspx?categoria=accessori')
	oCMenu.makeMenu('sub34','top3','Instrumentos','/es/catalogo.aspx?categoria=strmisura')
	oCMenu.makeMenu('sub35','top3','Utensilios','/es/catalogo.aspx?categoria=utensileria')
	oCMenu.makeMenu('sub36','top3','Consumibles','/es/catalogo.aspx?categoria=consumabili')

	
oCMenu.makeMenu('top4','','LINK','/es/link.htm','')

oCMenu.makeMenu('top5','','CONTACTOS','/es/contatti.htm','')


oCMenu.makeMenu('top6','','RECONDICIONADOS','/es/usato.htm','')

//Leave this line - it constructs the menu
oCMenu.construct()
