<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

function ir() {
url = document.selectWide.w_wide.value;
window.open(url);
}

<!--
function download(id)
{
	var doc = eval('document.all.'+id);
	var tabela = eval('document.all.'+id+'.style.display');
	
	if (tabela == 'none') doc.style.display='block';
	else doc.style.display='none';
}
//-->
	


function selectAtendimento(a,n)
{
	for(x=1; x<=n; x++)
	{
		div_at = eval('document.all.div_at' + x + '.style;');
		
		if(x==a)
		{
			div_at.display = '';
		}
		else
		{
			div_at.display = 'none';
		}		
	}
}

function selectCidade(a,n,e)
{
	for(x=1; x<=n; x++)
	{
		div_cid = eval('document.all._'+e+'_div_cid' + x + '.style;');
		
		if(x==a)
		{
			div_cid.display = '';
		}
		else
		{
			div_cid.display = 'none';
		}		
	}
}
	
	
function verificaContato()
{
	if(document.formContato.dsNome.value == '')
	{
		alert('Preencha o campo Nome!');
		document.formContato.dsNome.focus();
		return false;
	}

	if(document.formContato.dsEmail.value == '')
	{
		alert('Preencha o campo E-mail!');
		document.formContato.dsEmail.focus();
		return false;
	}
	else
	{
		if (/^([\w\.\-])+\@(([\w\-])+\.)+([\w ]{2,4})$/.test(document.formContato.dsEmail.value) == false)   
		{ 
			alert("E-mail Inválido!");
			document.formContato.dsEmail.select();
			document.formContato.dsEmail.focus();
			return false;
		}
	}

	if(document.formContato.dsCidade.value == '')
	{
		alert('Preencha o campo Cidade!');
		document.formContato.dsCidade.focus();
		return false;
	}

	if(document.formContato.dsAssunto.value == '')
	{
		alert('Preencha o campo Assunto!');
		document.formContato.dsAssunto.focus();
		return false;
	}
	
	if(document.formContato.dsMensagem.value == '')
	{
		alert('Preencha o campo Mensagem!');
		document.formContato.dsMensagem.focus();
		return false;
	}
}

function exibeConteudo(id)
{ 
	var valor = id; 
	var cntd = new CNTD(); 
	cntd.Updater("conteudo.php?idTela="+valor,"conteudo","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = '';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = 'none';
	document.getElementById('cntd_destaque').style.display = 'none';
}

function exibeCategoria(id)
{ 
	var valor = id; 
	var cat = new CAT(); 
	cat.Updater("categoria.php?idCategoria="+valor,"cntd_categoria","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = '';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = 'none';
	document.getElementById('cntd_destaque').style.display = 'none';
	
//	document.getElementById('img_cat_'+valor).innerHTML = '<img src="files/categorias/img_'+valor+'.jpg">';
}

function exibeProduto(id,orderBy,pagina)
{ 
	var valor = id; 
	var prod = new PROD(); 
	prod.Updater("produto.php?idCategoria="+valor+"&orderBy="+orderBy+"&pagina="+pagina,"cntd_produto","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = '';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = 'none';
	document.getElementById('cntd_destaque').style.display = 'none';
}

function exibeProdutoDetalhes(p,id)
{ 
	var valor = id; 
	var prod_det = new PROD_DET(); 
	prod_det.Updater("produto_detalhes.php?p="+p+"&idProduto="+valor,"cntd_produto_detalhes","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = '';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = 'none';
	document.getElementById('cntd_destaque').style.display = 'none';
}

function exibeBusca()
{
	var nome = document.form.nome.value;
	var busca = new BUSCA();
	busca.Updater("busca.php?dsBusca="+nome,"cntd_busca","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>");

	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = '';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = 'none';
	document.getElementById('cntd_destaque').style.display = 'none';
}

function exibeLancamento()
{
	var lanc = new LANC(); 
	lanc.Updater("lancamento.php","cntd_lancamento","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = '';
	document.getElementById('cntd_informe').style.display = 'none';
	document.getElementById('cntd_destaque').style.display = 'none';
}

function enviarIndicacao()
{
	if (document.formIndicacao.dsNome.value == '' || document.formIndicacao.dsNome.value == 'Seu nome')
	{
		alert('Informe seu nome!');
		document.formIndicacao.dsNome.focus();
		return false;
	}
	if (document.formIndicacao.dsEmail.value == '' || document.formIndicacao.dsEmail.value == 'Seu e-mail')
	{
		alert('Informe seu e-mail!');
		document.formIndicacao.dsEmail.focus();
		return false;
	}
	if (document.formIndicacao.dsNome2.value == '' || document.formIndicacao.dsNome2.value == 'Nome seu amigo')
	{
		alert('Informe o nome do seu amigo!');
		document.formIndicacao.dsNome2.focus();
		return false;
	}
	if (document.formIndicacao.dsEmail2.value == '' || document.formIndicacao.dsEmail2.value == 'E-mail seu amigo')
	{
		alert('Informe o e-mail do seu amigo!');
		document.formIndicacao.dsEmail2.focus();
		return false;
	}
	
	var ind = new INDICACAO();
	ind.Updater("enviar_indicacao.php?dsNome="+document.formIndicacao.dsNome.value+"&dsNome2="+document.formIndicacao.dsNome2.value+"&dsEmail="+document.formIndicacao.dsEmail.value+"&dsEmail2="+document.formIndicacao.dsEmail2.value+"&idProduto="+document.formIndicacao.idProduto.value+"&dsMensagem="+document.formIndicacao.dsMensagem.value,"div_indicar2","get","<center><br><br><br><img src='display/images/loading.gif'></center>");
}

function indicar(value)
{
	if (value == '1')
	{
		document.getElementById('div_indicar').style.display = '';
	}
	if (value == '2')
	{
		document.getElementById('div_indicar').style.display = 'none';
		document.getElementById('div_indicar2').style.display = 'none';
		document.formIndicacao.dsNome.value = 'Seu nome';
		document.formIndicacao.dsNome2.value = 'Seu e-mail';
		document.formIndicacao.dsEmail.value = 'Nome seu amigo';
		document.formIndicacao.dsEmail2.value = 'E-mail seu amigo';
		document.formIndicacao.dsMensagem.value = '';
	}
}


function exibeInforme(idTela,acao,idInforme)
{
	var inf = new INF(); 
	inf.Updater("informe.php?acao="+acao+"&idInforme="+idInforme+"&id="+idTela,"cntd_informe","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = '';
	document.getElementById('cntd_destaque').style.display = 'none';
}

function exibeEvento(idTela,acao,idEvento)
{
	var inf = new INF(); 
	inf.Updater("evento.php?acao="+acao+"&idEvento="+idEvento,"cntd_informe","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = '';
	document.getElementById('cntd_destaque').style.display = 'none';
}

function exibeEventoVer(idEvento)
{
	var evento = new EVENTO(); 
	evento.Updater("evento_ver.php?idEvento="+idEvento,"cntd_evento","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>");
}

function exibeDestaque(idTela,acao,idDestaque)
{
	var inf = new INF(); 
	inf.Updater("destaque.php?acao="+acao+"&idDestaque="+idDestaque,"cntd_informe","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = '';
	document.getElementById('cntd_destaque').style.display = 'none';
}


function exibeNews(idTela,acao,idNews)
{
	var inf = new INF(); 
	inf.Updater("news.php?acao="+acao+"&idNews="+idNews,"cntd_informe","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = '';
	document.getElementById('cntd_destaque').style.display = 'none';
}

function exibeNewsVer(idNews)
{
	var news = new INF(); 
	news.Updater("news_ver.php?idConteudo="+idNews,"cntd_informe","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>");
}


/*function exibeDestaque(acao)
{
	var dest = new DEST(); 
	dest.Updater("destaque_interna.php?acao="+acao,"cntd_destaque","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	
	document.getElementById('conteudo').style.display = 'none';
	document.getElementById('cntd_categoria').style.display = 'none';
	document.getElementById('cntd_busca').style.display = 'none';
	document.getElementById('cntd_produto').style.display = 'none';
	document.getElementById('cntd_produto_detalhes').style.display = 'none';
	document.getElementById('cntd_lancamento').style.display = 'none';
	document.getElementById('cntd_informe').style.display = 'none';
	document.getElementById('cntd_destaque').style.display = '';
}
*/



function exibeAtendimento(id)
{ 
	if (id == 1)
	{
		//var valor = id; 
		//var cntd2 = new CNTD2(); 
		//cntd2.Updater("atendimento_ver.php?idPais="+valor,"atendimento","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
	}
	else
	{
		window.open('http://www.metalwork.it','','width=800,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');	
	}
}

function exibeImprensa(id)
{ 
	var valor = id; 
	var cntd2 = new CNTD2(); 
	cntd2.Updater("sala_imprensa_interna.php?id="+valor,"conteudo2","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
}





function verConteudo(p,id,pagina)
{
	var cntd2 = new CNTD2(); 
	cntd2.Updater("sala_imprensa_interna.php?id="+p+"&acao=exibir&idConteudo="+id+"&pagina="+pagina,"conteudo2","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
}





function paginacaoGaleria(pagina)
{ 
	var cntd2 = new CNTD2(); 
	cntd2.Updater("sala_imprensa_interna.php?id=1&pagina="+pagina,"conteudo2","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
}

function paginacaoMidia(pagina)
{ 
	var cntd2 = new CNTD2(); 
	cntd2.Updater("sala_imprensa_interna.php?id=2&pagina="+pagina,"conteudo2","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
}

function paginacaoMateria(pagina)
{ 
	var cntd2 = new CNTD2(); 
	cntd2.Updater("sala_imprensa_interna.php?id=3&pagina="+pagina,"conteudo2","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
}


function exibeConteudoAtendimento(id)
{ 
	var valor = id; 
	var cntd3 = new CNTD3(); 
	cntd3.Updater("ajax.atendimento.php?idEstado="+valor,"conteudo3","get","<center><br><br><br><br><br><br><img src='display/images/loading.gif'></center>"); 
}