/*** 
ADCompound - 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()-782)/2)+180
oCMenu.fromTop=134
oCMenu.rows=1
oCMenu.menuPlacement=""

oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=0
oCMenu.wait=1000 
oCMenu.fillImg="cm_fill.html"
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=98
oCMenu.level[0].height=25
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=22
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=30
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('top4','','Home','home.htm','','50','25')
oCMenu.makeMenu('top0','','La Storia','storia.htm','','100','25')

	
oCMenu.makeMenu('top3','','Dove Siamo','dovesiamo.htm','','100','25')

oCMenu.makeMenu('top5','','Iniziative','iniziative.htm','','100','25')

oCMenu.makeMenu('top1','','Il Forno Oggi','#','','100','25')
	oCMenu.makeMenu('sub20','top1','In Negozio','fornoincifre.htm','','100','25')
	oCMenu.makeMenu('sub21','top1','Rinoscimenti','ricon.htm','','100','25')
	
oCMenu.makeMenu('top6','','Prodotti','prodotti.htm')
oCMenu.makeMenu('top2','','ULTIMISSIME','promo.htm','','100','25')
//Leave this line - it constructs the menu
oCMenu.construct()
