<!--

/////////////   função para abrir o flash sem dar erro no ie ////////////

function montaFlash(destino, flavez, width, height, trans, scale){
	var myFlash = 
		'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="'+flavez+'" align="middle">'+
		'<param name="allowScriptAccess" value="sameDomain" />'+
		'<param name="movie" value="'+flavez+'.swf" />' +
		'<param name="menu" value="false" />'
	;
	if (trans == "yes"){
		myFlash += '<param name="wmode" value="transparent" />';
	}
	if (scale == "yes"){
		myFlash += '<param name="scale" value="noscale" />';
	}
	myFlash +=
		'<param name="quality" value="high" />'+
		'<param name="bgcolor" value="#ffffff" />'+
		'<embed src="'+flavez+'.swf" quality="high" width="'+width+'" height="'+height+'" name="empresas" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />'+
		'</object>'
	;
	document.getElementById(destino).innerHTML = myFlash;
}


///////////////  função menu ///////////////////

function MM_findObj(n, d) { 
  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_swapImgRestore() { 
  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_preloadImages() { 
  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_swapImage() { 
  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];}
}




////////////// valida formulario de contato /////////////
function Valida(){

	if(document.all.nome.value == ""){
		alert("Digite seu Nome");
		document.all.nome.focus();
		return false;
	}
if (document.form.email.value == ""){
	  alert("O campo E-mail deve ser preenchido!");
	  document.form.email.focus();
	  return false;
	}
	//validar email(verificao de endereco eletrônico)
	parte1 = document.form.email.value.indexOf("@");
	parte2 = document.form.email.value.indexOf(".");
	parte3 = document.form.email.value.length;
	if (!(parte1 >= 1 && parte2 >= 2 && parte3 >= 3)) {
	  alert ("O campo E-mail deve conter um endereco eletrônico!");
	  document.form.email.focus();
	  return false;
	}
	if(document.all.cidade.value == ""){
		alert("Digite sua Cidade");
		document.all.cidade.focus();
		return false;
	}
	if(document.all.uf.value == ""){
		alert("Digite seu Estado");
		document.all.uf.focus();
		return false;
	}
	if(document.all.assunto.value == ""){
		alert("Digite um Assunto");
		document.all.assunto.focus();
		return false;
	}
	if(document.all.mensagem.value == ""){
		alert("Digite sua Mensagem");
		document.all.mensagem.focus();
		return false;
	}
return true;
}


//////////////// Função submenu da página de produtos ///////////////


var Aberto = ""
var Fechado = ""
function preload(){
if(document.images){
Aberto = new Image(16,13)
Fechado = new Image(16,13)
Aberto.src = "../img/produtos/aberto.jpg"
Fechado.src = "../img/produtos/fechado.jpg"
}}
function mostra(item,item2){
if (item.style.display=='none'){
item.style.display='';
item2.src=Aberto.src
}
else{
item.style.display='none'
item2.src=Fechado.src
}
}
preload();

-->
