for (n=1;n<=nMENU;n++) {
    pm=0;
    sm="";
    for (k=0;k<J[n].length;k++) {
        c=J[n].charAt(k)+"";
        if (c!="|") sm=sm+c+"";
        if (c=="|") {
           pm++;
           if (pm==1) MENU    [n]=sm+"";
           if (pm==2) MENU_ID [n]=sm-0;
           if (pm==3) MENU_PID[n]=sm-0;
           if (pm==4) MENU_PN [n]=sm-0;
           if (pm==5) MENU_L  [n]=sm-0;
           if (pm==6) MENU_G  [n]=sm-0;
           if (pm==7) MENU_N  [n]=sm-0;
           if (pm==8) MENU_GP [n]=sm-0;
           if (pm==9) MENU_GF [n]=sm-0;
           sm="";
           }
        }
    MENU_W[n]=0;
    if (MENU_L[n]==1) MENU_W[n]=document.getElementById("CSS"+n).offsetWidth-0+14;
    }

SIGMA=10;
for (n=1;n<=nMENU;n++) {
    MENU_LEFT[n]=0;
    if (MENU_L[n]==1) {
       MENU_LEFT[n]=SIGMA-0;
       SIGMA=SIGMA+MENU_W[n]-0;
       }
    }
MENU_LEFT[nMENU]=764-MENU_W[nMENU]-33;

nn=new Array();
contann=new Array();
cntnn=new Array();

function vedil(n,dl,dt,dw,dh) {
liv++;

contann[liv]=0;
nn[liv]=n;
while (nn[liv]<=nMENU) {
      if (MENU_L[nn[liv]]==liv) contann[liv]++;
      if (MENU_L[nn[liv]]<liv) nn[liv]=nMENU;
      nn[liv]++;
      }

if (contann[liv]>0) {
   nn[liv]=n;
   cntnn[liv]=0;
   while (nn[liv]<=nMENU) {
         if (MENU_L[nn[liv]]==liv) { cntnn[liv]++;
            pdl=MENU_LEFT[nn[liv]]+8;
            pdw=MENU_W[nn[liv]]-1;
            pdh=16;
            pdt=dt;
            dtl=0;
            dtt=0;
            VIS0="visible";
            BACKG="000000";
            MBORD="";
            D3D=0;
            ZIND=0;
            if (liv>1) {
               if (liv==2) pdl=dl;
                      else pdl=dl+240;
               if (liv>2) {
                  D3D=5*(liv-1);
                  ZIND=liv;
                  }
               pdw=240;
               pdh=21;
               pdt=dt+pdh*(cntnn[liv]-1);
               dtl=-6;
               dtt=pdh+1;
               if (liv>=2) dtt=dtt-5;
               VIS0="hidden";
               BACKG="3360B7";
               MBORD="border:1px solid #A8BBDF;";
               }

            MEVE=" onmouseover=over1m("+nn[liv]+","+liv+","+MENU_G[nn[liv]]+","+MENU_GP[nn[liv]]+","+MENU_GF[nn[liv]]+",1); onmousemove=move1m("+nn[liv]+","+liv+","+MENU_G[nn[liv]]+","+MENU_GP[nn[liv]]+","+MENU_GF[nn[liv]]+",1); onmouseout=out1m("+nn[liv]+"); onclick=click1m("+nn[liv]+","+liv+","+MENU_G[nn[liv]]+","+MENU_GP[nn[liv]]+","+MENU_GF[nn[liv]]+");";
            if (MENU_GF[nn[liv]]>0) MEVE=" onmouseover=over1m("+nn[liv]+","+liv+","+MENU_G[nn[liv]]+","+MENU_GP[nn[liv]]+","+MENU_GF[nn[liv]]+",0); onmousemove=move1m("+nn[liv]+","+liv+","+MENU_G[nn[liv]]+","+MENU_GP[nn[liv]]+","+MENU_GF[nn[liv]]+",0); onmouseout=out1m("+nn[liv]+");";
            
            document.write("<div ID=CELLA"+nn[liv]+" style='position:absolute;padding:2px;visibility:"+VIS0+";left:"+(pdl+dtl-6*D3D)+";top:"+(pdt+dtt+D3D)+";width:"+(pdw+1)+";height:"+(pdh+1)+";"+MBORD+"background-color:"+BACKG+";font-family:tahoma;font-size:7pt;color:FFFFFF;z-index:+"+ZIND+";' "+MEVE+"><b>");
            
            if (liv==1) {
               document.write(MENU[nn[liv]].toUpperCase());
               } else {
               document.write("<table cellpadding=0 cellspacing=0 border=0 width="+(pdw-10)+"><tr>");
               document.write("<td width=6></td>");
               document.write("<td width="+(pdw-10)+" height="+(pdh-5)+" valign=middle style='font-family:tahoma;font-size:7pt;color:FFFFFF;'><b>");
               document.write(MENU[nn[liv]].toUpperCase());
               document.write("</b></td>");
               if (MENU_GF[nn[liv]]>0) document.write("<td width=10 valign=middle style='font-family:tahoma;font-size:7pt;color:ABBADE;'><b>&gt;</b></td>");
               document.write("</tr></table>");
               }
            document.write("</b></div>");

            if (liv==1) {
               document.write("<div style='position:absolute;padding:2px;visibility:visible;left:"+(pdl-9)+";top:"+(pdt+dtt)+";width:1;height:"+(pdh+1)+";font-family:tahoma;font-size:7pt;color:688FAA;'>|</div>");
               document.write("<div style='position:absolute;padding:2px;visibility:visible;left:"+(pdl+pdw-8)+";top:"+(pdt+dtt)+";width:1;height:"+(pdh+1)+";font-family:tahoma;font-size:7pt;color:688FAA;'>|</div>");
               }
           
            vedil(nn[liv]+1,pdl,pdt,pdw,pdh);
            }
         if (MENU_L[nn[liv]]<liv) nn[liv]=nMENU;
         nn[liv]++;
         }
   }
liv--;
}

OVERMENU=0;
CLEARMENU=0;

contann[0]=0;
liv=0;
vedil(1,0,0,0,0);

function over1m(n,l,g,gp,gf,mm) {
CLEARMENU=0;
OVERMENU=1;

for(x=1;x<=nMENU;x++) if (MENU_L[x]>1) document.getElementById("CELLA"+x).style.visibility="hidden";

if (mm==1) document.getElementById("CELLA"+n).style.cursor="hand";
      else document.getElementById("CELLA"+n).style.cursor="default";

for(x=1;x<=nMENU;x++) {
   if (MENU_G[x]==g) document.getElementById("CELLA"+x).style.visibility="visible";
   if (MENU_G[x]==gf) document.getElementById("CELLA"+x).style.visibility="visible";
   }

npad=gp;
while (npad>0) {
      pad=npad;
      npad=0;
      for(x=1;x<=nMENU;x++) {
         if (MENU_G[x]==pad) {
            document.getElementById("CELLA"+x).style.visibility="visible";
            npad=MENU_GP[x];
            }
         }
      }
}

function shutmenu() {
if (CLEARMENU==1) {
   for(x=1;x<=nMENU;x++) if (MENU_L[x]>1) document.getElementById("CELLA"+x).style.visibility="hidden";
   CLEARMENU=0;
   OVERMENU=0;
   }
}

function pollshut() {
if (CLEARMENU==1) setTimeout("shutmenu();",1000);
setTimeout("pollshut();",1000);
}

pollshut();

function move1m(n,l,g,gp,gf,mm) {
}

function out1m(n) {
document.getElementById("CELLA"+n).style.cursor="default";
CLEARMENU=1;
}

function click1m(n,l,g,gp,gf) {
CN="";
PAG1=0;
pad=n;
cc=0;
tcc=0;
while ((pad>0) && (tcc<15)) {
      tcc++;
      pad=MENU_PN[pad];
      }
if (tcc>0) {
   pad=n;
   while ((pad>0) && (cc<15)) { cc++;
         CN="&N"+(tcc-cc+1)+"="+pad+CN;
         if ((tcc-cc+1)==1) PAG1=MENU_N[pad]-0;
         pad=MENU_PN[pad];
         }
   }
CN="&N="+tcc+CN;

PAGLOADhREF="home.asp?SETLINGUA="+LINGUA+CN+"";
if (PAG1==1) PAGLOADhREF="prodotti.asp?SETLINGUA="+LINGUA+CN+"&ID="+MENU_ID[n]+"";
if (PAG1==2) PAGLOADhREF="tecnologie.asp?SETLINGUA="+LINGUA+CN+"&ID="+MENU_ID[n]+"";
if (PAG1==3) PAGLOADhREF="servizi.asp?SETLINGUA="+LINGUA+CN+"&ID="+MENU_ID[n]+"";
if (PAG1==4) PAGLOADhREF="azienda.asp?SETLINGUA="+LINGUA+CN+"&ID="+MENU_ID[n]+"";
if (PAG1==5) PAGLOADhREF="contatti.asp?SETLINGUA="+LINGUA+CN+"&ID="+MENU_ID[n]+"";
if (PAG1==6) PAGLOADhREF="mappa.asp?SETLINGUA="+LINGUA+CN+"&ID="+MENU_ID[n]+"";
if (PAG1==7) PAGLOADhREF="cerca.asp?SETLINGUA="+LINGUA+CN+"&ID="+MENU_ID[n]+"";

location.href=PAGLOADhREF;
}

document.write("<table cellpadding=0 cellspacing=0 border=0><tr><td height=18></td></tr></table>");

document.write("</td>");
document.write("<td bgcolor=CCCCCC width=7></td>");
document.write("<td bgcolor=FFFFFF width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=21 width=2></td>");
document.write("<td bgcolor=CCCCCC height=21 width=7></td>");
document.write("<td bgcolor=666666 height=21 width=746 valign=middle align=left style=Font-family:tahoma;font-size:7pt;color:FFFFFF; ID=MYTIT2>&nbsp;&nbsp;&nbsp;&nbsp;"+OUTTITOLO+"</td>");
document.write("<td bgcolor=CCCCCC height=21 width=7></td>");
document.write("<td bgcolor=FFFFFF height=21 width=2></td>");
document.write("</tr>");

if (NLLL==0) {
document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=2 width=2></td>");
document.write("<td bgcolor=CCCCCC height=2 width=7></td>");
document.write("<td bgcolor=000000 height=2 width=746></td>");
document.write("<td bgcolor=CCCCCC height=2 width=7></td>");
document.write("<td bgcolor=FFFFFF height=2 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=A2A2A2 height=1 width=746></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=000000 height=1 width=746></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=70 width=2></td>");
document.write("<td bgcolor=CCCCCC height=70 width=7></td>");
document.write("<td bgcolor=A2A2A2 height=70 width=746><table cellpadding=0 cellspacing=0 border=0><tr>");
document.write("<td align=left width=168></td>");
document.write("<td align=left width=311></td>");
document.write("<td align=right  width=263><img src=../immagini/logo2.gif width=263 height=70 border=0></td>");
document.write("</tr>");
document.write("</table></td>");
document.write("<td bgcolor=CCCCCC height=70 width=7></td>");
document.write("<td bgcolor=FFFFFF height=70 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=000000 height=1 width=746></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=A2A2A2 height=1 width=746></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=2 width=2></td>");
document.write("<td bgcolor=CCCCCC height=2 width=7></td>");
document.write("<td bgcolor=000000 height=2 width=746></td>");
document.write("<td bgcolor=CCCCCC height=2 width=7></td>");
document.write("<td bgcolor=FFFFFF height=2 width=2></td>");
document.write("</tr>");

} else {

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=2 width=2></td>");
document.write("<td bgcolor=CCCCCC height=2 width=7></td>");
document.write("<td bgcolor=000000 height=2 width=746></td>");
document.write("<td bgcolor=CCCCCC height=2 width=7></td>");
document.write("<td bgcolor=FFFFFF height=2 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=A2A2A2 height=1 width=746></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=000000 height=1 width=746></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=50 width=2></td>");
document.write("<td bgcolor=CCCCCC height=50 width=7></td>");
document.write("<td bgcolor=A2A2A2 height=50 width=746><table cellpadding=0 cellspacing=0 border=0><tr>");
document.write("<td align=left width=168><a href=home.asp CLASS=LINK0 onfocus=window.focus();></a></td>");
document.write("<td align=left width=311></td>");
document.write("<td align=right  width=263><a href=home.asp CLASS=LINK0 onfocus=window.focus();><img src=../immagini/logo2b.gif width=263 height=50 border=0></a></td>");
document.write("</tr>");
document.write("</table></td>");
document.write("<td bgcolor=CCCCCC height=50 width=7></td>");
document.write("<td bgcolor=FFFFFF height=50 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=000000 height=1 width=746></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=A2A2A2 height=1 width=746></td>");
document.write("<td bgcolor=CCCCCC height=1 width=7></td>");
document.write("<td bgcolor=FFFFFF height=1 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=2 width=2></td>");
document.write("<td bgcolor=CCCCCC height=2 width=7></td>");
document.write("<td bgcolor=000000 height=2 width=746></td>");
document.write("<td bgcolor=CCCCCC height=2 width=7></td>");
document.write("<td bgcolor=FFFFFF height=2 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=10 width=2></td>");
document.write("<td bgcolor=CCCCCC height=10 width=7></td>");
document.write("<td bgcolor=C6CED6 height=10 width=746></td>");
document.write("<td bgcolor=CCCCCC height=10 width=7></td>");
document.write("<td bgcolor=FFFFFF height=10 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=15 width=2></td>");
document.write("<td bgcolor=CCCCCC height=15 width=7></td>");
document.write("<td bgcolor=000000 height=15 width=746><table cellpadding=0 cellspacing=0 border=0 height=15>");
document.write("<td bgcolor=000000 height=15 style=Font-family:tahoma;font-size:7pt;color:000000;>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>");
document.write("<td bgcolor=C6CED6 height=15 style=Font-family:tahoma;font-size:7pt;color:000000; ID=MYTIT><b>&nbsp;&nbsp;"+MYTITOLO+"&nbsp;&nbsp;</b></td>");
document.write("</tr>");
document.write("</table>");
document.write("</td>");
document.write("<td bgcolor=CCCCCC height=15 width=7></td>");
document.write("<td bgcolor=FFFFFF height=15 width=2></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=10 width=2></td>");
document.write("<td bgcolor=CCCCCC height=10 width=7></td>");
document.write("<td bgcolor=C6CED6 height=10 width=746></td>");
document.write("<td bgcolor=CCCCCC height=10 width=7></td>");
document.write("<td bgcolor=FFFFFF height=10 width=2></td>");
document.write("</tr>");
}

document.write("</table>");
document.write("</div>");
document.write("<div ID=QUAD2 style=position:absolute;left:0;top:0;z-index:+0;>");
document.write("<table cellpadding=0 cellspacing=0 border=0 width=764>");
document.write("<tr>");
document.write("<td bgcolor=545454 width=764 height=10 colspan=5></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF width=764 height=2 colspan=5></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td bgcolor=FFFFFF width=2 height=7></td>");
document.write("<td bgcolor=CCCCCC width=756 height=7 colspan=3></td>");
document.write("<td bgcolor=FFFFFF width=2 height=7></td>");
document.write("</tr>");

BXHHH=document.body.offsetHeight-270+35;
BXWWW=document.body.offsetWidth-0;
if (BXWWW>750) {
   if (BXHHH<222) {
      BXHHH=222;
      document.body.scroll="auto";
      } else {
      document.body.scroll="no";
      }
   } else {
   document.body.scroll="auto";
   BXHHH=BXHHH-16;
   if (BXHHH<222) BXHHH=222;
   }

HH=222;
if (NLLL==0) {
HH=HH+20;

document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=120 width=2></td>");
document.write("<td bgcolor=CCCCCC height=120 width=7></td>");
document.write("<td bgcolor=666666 height=120 width=746></td>");
document.write("<td bgcolor=CCCCCC height=120 width=7></td>");
document.write("<td bgcolor=FFFFFF height=120 width=2></td>");
document.write("</tr>");
} else {
document.write("<tr>");
document.write("<td bgcolor=FFFFFF height=135 width=2></td>");
document.write("<td bgcolor=CCCCCC height=135 width=7></td>");
document.write("<td bgcolor=666666 height=135 width=746></td>");
document.write("<td bgcolor=CCCCCC height=135 width=7></td>");
document.write("<td bgcolor=FFFFFF height=135 width=2></td>");
document.write("</tr>");
}

document.write("<tr>");
document.write("<td bgcolor=FFFFFF width=2></td>");
document.write("<td bgcolor=CCCCCC width=7></td>");
document.write("<td bgcolor=C6CED6 width=746><table cellpadding=0 cellspacing=0 border=0 width=746 height="+HH+"><tr><td style=Font-family:tahoma;font-size:7pt;color:000000; align=left valign=top>");
