

var menuOffset;

var wrapWidth;

var padLeft=150;//se vuoglio rientrare rispetto pos. sx del div menu

function calLeftPos()

{

    var mobj=document.getElementById("header");

    var wobj=document.getElementById("wrapper");

    menuOffset=mobj.offsetLeft;

    //wrapCenter=wobj.offsetLeft+wobj.offsetWidth/2;

    wrapWidth=wobj.offsetWidth;

    var fromLeft=menuOffset+wobj.offsetLeft;

    return fromLeft+padLeft;

}



///////////////////////////////////////////

oCMenu=new makeCM("oCMenu") 

//Menu properties

oCMenu.pxBetween=0 //space between each of the top items. - Value: px || "%"



//Using the cm_page object to place the menu ----

  //There are some differences between the browsers that I try to fix here.

var lan='it';

var fromLeft=calLeftPos();

oCMenu.fromLeft=fromLeft;

var spanLeft=cmpage.x2/2-fromLeft; 

//aggiungo correzione se cross-brow, solo per resize

var tuner=(bw.ie)?20:0;

if(cmpage.x2<wrapWidth) spanLeft+=(wrapWidth-tuner-cmpage.x2)/2;

//We also need to "replace" the menu on resize. So:

oCMenu.onresize="oCMenu.fromLeft=(cmpage.x2<wrapWidth)?(menuOffset+padLeft):(cmpage.x2/2-spanLeft); ";



oCMenu.fromTop=57 //(Only in use if menuplacement below is 0 or aligned) - Value: px || "%"

oCMenu.rows=1 // - 0:columns || 1:row

oCMenu.menuPlacement="left"



oCMenu.offlineRoot="" 

oCMenu.onlineRoot="" 

oCMenu.resizeCheck=1 

oCMenu.wait=500 // you should not have this lower then 500 - Value: milliseconds

oCMenu.fillImg="../../../img/cm_fill.gif"

oCMenu.zIndex=0



//Background bar properties

oCMenu.useBar=0 //If you want to use a background-bar for the top items set this on - Value: 1 || 0

oCMenu.barWidth="menu" // "menu" = same width as the menu. - Value: px || "%" || "menu"

oCMenu.barHeight=20 // "menu" = same height as the menu. - Value: px || "%" || "menu"

oCMenu.barX="menu" //The left position of the bar. Set this to "menu" if you want it be the same as the left position of the menu. (this will change to match the border if you have one)  - Value: px || "%" || "menu"

oCMenu.barY="menu" //The top position of the bar Set this to "menu" if you want it be the same as the top position of the menu. (this will change to match the border if you have one)  - Value: px || "%" || "menu"

oCMenu.barClass="clBar"

oCMenu.barBorderX=0

oCMenu.barBorderY=0

oCMenu.barBorderClass=""

//TOP LEVEL PROPERTIES - ALL OF THESE MUST BE SPESIFIED FOR LEVEL[0]

oCMenu.level[0]=new cm_makeLevel()

oCMenu.level[0].width=147 //The default width for each level[0] (top) items. You can override this on each item by spesifying the width when making the item. - Value: px || "%"

oCMenu.level[0].height=20 //The default height for each level[0] (top) items. You can override this on each item by spesifying the height when making the item. - Value: px || "%"

oCMenu.level[0].regClass="clLevel0"

oCMenu.level[0].overClass="clLevel0over"

oCMenu.level[0].borderX=0

oCMenu.level[0].borderY=0

oCMenu.level[0].borderClass="clLevel0border"

oCMenu.level[0].rows=0

oCMenu.level[0].arrow=0//"img/menu_arrow.gif"

oCMenu.level[0].arrowWidth=10

oCMenu.level[0].arrowHeight=10

oCMenu.level[0].align="center"

oCMenu.level[0].offsetX=0

oCMenu.level[0].offsetY=20





//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to spesify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this

oCMenu.level[1]=new cm_makeLevel()

oCMenu.level[1].width=150//138 //The default width for each level[0] (top) items. You can override this on each item by spesifying the width when making the item. - Value: px || "%"

oCMenu.level[1].height=20 //The default height for each level[0] (top) items. You can override this on each item by spesifying the height when making the item. - Value: px || "%"

oCMenu.level[1].regClass="clLevel1"

oCMenu.level[1].overClass="clLevel1over"

oCMenu.level[1].borderX=0

oCMenu.level[1].borderY=0

oCMenu.level[1].borderClass="clLevel1border"

oCMenu.level[1].align="right"

oCMenu.level[1].offsetX=0

oCMenu.level[1].offsetY=0

oCMenu.level[1].arrow=0//"../../../img/arrow.gif";

oCMenu.level[1].arrowWidth=4

oCMenu.level[1].arrowHeight=9





//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this

oCMenu.level[2]=new cm_makeLevel()

oCMenu.level[2].width=152//148 //The default width for each level[0] (top) items. You can override this on each item by spesifying the width when making the item. - Value: px || "%"

oCMenu.level[2].height=16 //The default height for each level[0] (top) items. You can override this on each item by spesifying the height when making the item. - Value: px || "%"

oCMenu.level[2].regClass="clLevel2"

oCMenu.level[2].overClass="clLevel2over"

oCMenu.level[2].borderX=1

oCMenu.level[2].borderY=1

oCMenu.level[2].borderClass="clLevel2border"

oCMenu.level[2].align="right"

oCMenu.level[2].offsetX=-1

oCMenu.level[2].offsetY=-1

oCMenu.level[2].arrow=0//"../../../img/arrow.gif";

oCMenu.level[2].arrowWidth=4

oCMenu.level[2].arrowHeight=9



//EXAMPLE SUB LEVEL[3] PROPERTIES -

oCMenu.level[3]=new cm_makeLevel()

oCMenu.level[3].width=138 //The default width for each level[0] (top) items. You can override this on each item by spesifying the width when making the item. - Value: px || "%"

oCMenu.level[3].height=16 //The default height for each level[0] (top) items. You can override this on each item by spesifying the height when making the item. - Value: px || "%"

oCMenu.level[3].regClass="clLevel2"

oCMenu.level[3].overClass="clLevel2over"

oCMenu.level[3].borderX=1

oCMenu.level[3].borderY=1

oCMenu.level[3].borderClass="clLevel2border"

oCMenu.level[3].align="left"

oCMenu.level[3].offsetX=0

oCMenu.level[3].offsetY=0

oCMenu.level[3].arrow=0;

oCMenu.level[3].arrowWidth=19

oCMenu.level[3].arrowHeight=16





 oCMenu.makeMenu('menu1','','AZIENDA','../../../info/azienda/it/index.html','','72','','','','','','',0,'')

 oCMenu.makeMenu('menu2','','PRODOTTI','','','82','','','','','','',0,'')

     oCMenu.makeMenu('menu2_1','menu2','&nbsp;&nbsp;Collezione Uomo AI 2009-2010','','','200','','','','','','right',0)

          oCMenu.makeMenu('menu2_1_1','menu2_1','&nbsp;4M Foldable','../../../info/collezioni/2009/018/it/index.html','','','','','','','','',0)

          oCMenu.makeMenu('menu2_1_2','menu2_1','&nbsp;4N Voyager','../../../info/collezioni/2009/019/it/index.html','','','','','','','','',0)

          oCMenu.makeMenu('menu2_1_3','menu2_1','&nbsp;4O Organizer','../../../info/collezioni/2009/020/it/index.html','','','','','','','','',0)

          oCMenu.makeMenu('menu2_1_4','menu2_1','&nbsp;KX Leather Tech','../../../info/collezioni/2009/021/it/index.html','','','','','','','','',0)

          oCMenu.makeMenu('menu2_1_5','menu2_1','&nbsp;Cinture','../../../info/collezioni/2009/022/it/index.html','','','','','','','','',0)

     oCMenu.makeMenu('menu2_2','menu2','&nbsp;&nbsp;NEW Tribe Line','','','200','','','','','','right',0)

          oCMenu.makeMenu('menu2_2_1','menu2_2','&nbsp;TRIBE LINE','../../../info/collezioni/2009/024/it/index.html','','','','','','','','',0)

 oCMenu.makeMenu('menu3','','DISTRIBUTORI','../../../info/distributori/it/index.html','','103','','','','','','',0,'')

 oCMenu.makeMenu('menu4','','COMUNICAZIONE','../../../info/comunicazione/it/index.html','','120','','','','','','',0,'')

 oCMenu.makeMenu('menu5','','ZIPPO STORE','../../../info/zippostore/it/index.html','','102','','','','','','',0,'')

 oCMenu.makeMenu('menu6','','CONTATTI','../../../info/contatti/it/index.html','','82','','','','','','',0,'')

 oCMenu.makeMenu('menu7','','AREA RISERVATA','http://stock.zippo-original.it/','_blank','130','','','','','','',0,'')



oCMenu.construct()
