
function fcn_abrirMenu(id, id_bt)
{
	if (document.getElementById(id).style.display == "none")
	{
		document.getElementById(id).style.display = "block";
		document.getElementById(id_bt).innerHTML = "–";
	}
	else
	{
		document.getElementById(id).style.display = "none";
		document.getElementById(id_bt).innerHTML = "+";

		var elements = document.getElementById(id).getElementsByTagName("table");

		complemento = 1;
		cont = id_bt.length - 1;
		id_divTroca = id_bt.substring('0', cont);

		for (i=0;i<elements.length; i++)
		{
			if (elements[i].id != "")
			{
				complemento++;
				elemento = id_divTroca + complemento;

				//alert(elements[i].id);
				document.getElementById(elements[i].id).style.display = "none";
				document.getElementById(elemento).innerHTML = "+";
			}
		}
	}
}


function fcn_abriProd(id_pai, id_btPai, id, id_bt, url){
	document.getElementById("hdn_idPai").value = id_pai;
	document.getElementById("hdn_idBtPai").value = id_btPai;
	document.getElementById("hdn_id").value = id;
	document.getElementById("hdn_idBt").value = id_bt;
	
	document.frm_padrao.action = url;
	document.frm_padrao.submit();
}


startList = function() 
{
    if (document.all&&document.getElementById) 
    {
        navRoot = document.getElementById("nav");
        for (i=0; i<navRoot.childNodes.length; i++) 
        {
            node = navRoot.childNodes[i];
            if (node.nodeName=="LI") 
            {
                node.onmouseover=function() 
                {
                    this.className+=" over";
                }
                node.onmouseout=function() 
                {
                    this.className=this.className.replace
	                (" over", "");
                }
            }
        }
    }
}

window.onload=startList;

function fcn_trocaFundo(id) 
{
	vint_link = document.getElementById(id).name;
	if (vint_link == "0") 
	{
		document.getElementById(id).name = "1";
		document.getElementById(id).style.backgroundImage = "url(<%=vstr_local%>images/jpgs/" + id + "_ov.jpg)";
	}
	if (vint_link == "1") 
	{
		document.getElementById(id).name = "0";
		document.getElementById(id).style.backgroundImage = "url(<%=vstr_local%>images/jpgs/" + id + ".jpg)";
	}
}
