function loadSWF($arquivo,$largura,$altura){
	
	document.writeln('<object type="application/x-shockwave-flash" data="'+$arquivo+'" width="'+$largura+'" height="'+$altura+'">');
    document.writeln('    <param name="movie" value="' + $arquivo + '" />');
    document.writeln('    <param name="bgcolor" value="#ffffff" />');
    document.writeln('    <param name="quality" value="high" />');
    document.writeln('    <param name="wmode" value="transparent" />');
    document.writeln('</object>');
}

function _showFloat(w,h,url)
{
	_getUrl(url);
	
	var _janela = document.getElementById('janelafloat');
	if(_janela)
	{
		_janela.style.width = w+'px';
		_janela.style.height = h+'px';
								
		_janela.style.marginLeft = '-'+parseInt(w/2)+'px';
		
		if(document.body.clientHeight > h)
		{
			_janela.style.marginTop = '-'+parseInt(h/2)+'px';
		} else {
			_janela.style.top = "5px";
		}
	}
	
	document.getElementById('fundofloat').style.display="";
}

function _hideFloat()
{
	document.getElementById('fundofloat').style.display="none";
}

function _showJanelaAviso(id)
{
	var janela = document.getElementById(id);
	
	if(janela)
	{
		janela.style.display = "";
		setTimeout("_hideJanelaAviso('"+id+"')",5000);
	}	
}

function _hideJanelaAviso(id)
{
	var janela = document.getElementById(id);
	if(janela)
		janela.style.display="none";
}

function _showBannerFloat()
{
	var janela = document.getElementById('bannerfloat');
	
	if(janela)
	{
		janela.style.display = "";
		setTimeout("_hideBannerFloat()",10000);
	}
}

function _hideBannerFloat()
{
	var janela = document.getElementById('bannerfloat');
	if(janela)
		janela.style.display="none";
}

function _setSelectValue(id,valor)
{
	var campo = document.getElementById(id);
	
	if(campo)
		campo.value=valor;
}

function _goTo(url)
{
	if(url)
	{
		document.location.href='/index.php'+url;
	} else {
		return false;
	}		
}

function _Janela(nome,url,w,h)
{
	window.open('/index.php/Produtos/'+url,nome,'width='+w+', height='+h);
}

function _showSmenu(id)
{
	if(document.getElementById('smenu'+id))
	{
		document.getElementById('smenu'+id).style.display='';
	}
}

function _hideSmenu(id)
{
	if(document.getElementById('smenu'+id))
	{
		document.getElementById('smenu'+id).style.display='none';
	}
}
