// BANNER DE CADASTRO NA HOME
function HideBanner()
{
document.getElementById('banner_cadastro').style.visibility="hidden";
}
// o tempo de setTimeout indica: 1 segundo é igual a 1000 (milésimos de segundo)
setTimeout("HideBanner()", 7000);

	// BANNER DE CADASTRO NA HOME (fechar)
	function HideBanner()
	{
	document.getElementById('banner_cadastro').style.visibility="hidden";
	// o tempo de setTimeout indica: 1 segundo é igual a 1000 (milésimos de segundo)
	}


// FLASH (PARA TODAS AS ANIMAÇÕES)
function swf(flash,width,height)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'" />');
	document.write('<param name="movie" value="'+flash+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="menu" value="0" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<embed src="'+flash+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" menu="0" wmode="transparent"></embed>');
	document.write('</object>');
	}


// FLASH (CADASTRO)
function swf_cadastro(flash,width,height)
	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'" />');
	document.write('<param name="movie" value="'+flash+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="menu" value="0" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<embed src="'+flash+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" menu="0" wmode="transparent"></embed>');
	document.write('</object>');
	}


// ENVIE PARA UM AMIGO
function envia()
	{
		produto = document.prod.cod_prod.value;
		//categoria = document.prod.cat_prod.value;
		nome = document.prod.nome_prod.value;
		//alert(produto + "/" + categoria);
		//window.open('/envie_amigo/index.asp?id='+produto+'&cat='+categoria+'&nome='+nome,'popup','width=265,height=420, left=10,scrollbars=no');
		window.open('/envie_amigo/index.asp?id='+produto+'&nome='+nome,'popup','width=265,height=420, left=10,scrollbars=no');
	}


// MAPAS (LOJAS)
function MostrarMapa(mapa)
	{
	document.getElementById(mapa).style.visibility="visible";
	}
function OcultarMapa(mapa)
	{
	document.getElementById(mapa).style.visibility="hidden";
	}


// CATÁLOGOS
/*function abrir_catalogo('endereco')
	{
	var larguraTela = screen.width-10;
	var alturaTela = screen.height-87;
	window.open('endereco','null','width='+larguraTela+',height='+alturaTela+',top=0, left=0,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes');
	}
*/
function abrir_catalogo(endereco, nome)
{
	var larguraTela = screen.width-10;
	var alturaTela = screen.height-87;
	window.open(endereco,nome,'width='+larguraTela+',height='+alturaTela+',top=0,left=0,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes') 
}

// DICAS
/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
