function mudasubcats(opt){ x=0; if(opt){ while(nome=eval("jssubcatsNome"+opt+"["+x+"]")){ valor=eval("jssubcatsID"+opt+"["+x+"]"); document.formlinks.SubCategoria[x]=new Option(nome,valor,false); if(!document.getElementById){ document.formlinks.SubCategoria.options[x].text=nome; document.formlinks.SubCategoria.options[x].value=valor; } x++; } document.formlinks.SubCategoria.length=x; }else{ document.formlinks.SubCategoria.length=1; }}