//1: Qui si definiscono i link per le categorie principali
//Inserire altri elementi nell'array per creare altre voci
//La prima riga contiene il testo visualizzato come primo elemento

var category=new Array()
category[0]=new Option("Seleziona un articolo", "") 
category[1]=new Option("ADAA","componenti/additivi.html")
category[2]=new Option("ADTL","componenti/additivi.html")
category[3]=new Option("BCVZ","termoregolazione/componenti.html")
category[4]=new Option("BGT","componenti/binario.html")
category[5]=new Option("CGT","componenti/curve.html")
category[6]=new Option("CLPFA","componenti/clip.html")
category[7]=new Option("CLPFM","componenti/clpfm.html")
category[8]=new Option("CRC","termoregolazione/centralina.html")
category[9]=new Option("CRCSTE","termoregolazione/crcste.html")
category[10]=new Option("CRCSTM","termoregolazione/crcstm.html")
category[11]=new Option("CTEB","termoregolazione/cronomermostati.html")
category[12]=new Option("CTEBR","termoregolazione/componenti.html")
category[13]=new Option("CTIB","termoregolazione/cronomermostati.html")
category[14]=new Option("FILMAU","componenti/filmau.html")
category[15]=new Option("FBRMAS","componenti/fibre.html")
category[16]=new Option("FP","componenti/fascia.html")
category[17]=new Option("GAG","componenti/gag.html")
category[18]=new Option("GDC","componenti/giunto.html")
category[19]=new Option("IASP","pannelli/isolante.html")
category[20]=new Option("PBA","pannelli/preformato.html")
category[21]=new Option("PLA","pannelli/liscio_rotoli.html")
category[22]=new Option("PLAL","pannelli/liscio_lastre.html")
category[23]=new Option("RPZ8","termoregolazione/componenti.html")
category[24]=new Option("RTM","componenti/elettrosaldata.html")
category[25]=new Option("SCLPFA","componenti/sclpfa.html")
category[26]=new Option("SGDI","componenti/profilo.html")
category[27]=new Option("SID","componenti/sid.html")
category[28]=new Option("SROT","tubazioni/srot.html")
category[29]=new Option("TDEB","termoregolazione/termostati.html")
category[30]=new Option("TDEBR","termoregolazione/componenti.html")
category[31]=new Option("TDIB","termoregolazione/termostati.html")
category[32]=new Option("TERSIC","termoregolazione/termostato.html")
category[33]=new Option("TPB","tubazioni/tubo_pex.html")
category[34]=new Option("TPM","tubazioni/tubo_multistrato.html")
category[35]=new Option("TPMI","tubazioni/tpmi.html")
category[36]=new Option("TPR","tubazioni/tpr.html")
category[37]=new Option("UAMB","termoregolazione/uamb.html")
category[38]=new Option("","")




var curlevel=2
var cacheobj=document.dynamiccombo.stage2

function populate(x){
for (m=cacheobj.options.length-1;m>0;m--)
cacheobj.options[m]=null
selectedarray=eval(x)
for (i=0;i<selectedarray.length;i++)
cacheobj.options[i]=new Option(selectedarray[i].text,selectedarray[i].value)
cacheobj.options[0].selected=true

}

function displaysub(){
if (curlevel==1){
populate(cacheobj.options[cacheobj.selectedIndex].value)
curlevel=2
}
else
gothere()
}


function gothere(){
if (curlevel==2){
if (cacheobj.selectedIndex==cacheobj.options.length-1){
curlevel=1
populate(category)
}
else
location=cacheobj.options[cacheobj.selectedIndex].value
}
}
populate(category)
