function flash(src, width, height, id, flashVars, wmode, menu, scale){
	var ret = GetArgumentos(src, width, height, id, flashVars, wmode, menu, scale);
	var str = '<object ';
	for (var i in ret.objAttrs)
		str += i + '="' + ret.objAttrs[i] + '" ';
		str += '>';
	for (var i in ret.params)
		str += '<param name="' + i + '" value="' + ret.params[i] + '" /> ';
		str += '</object>';
	document.write(str);
}


function GetArgumentos(src, w, h, id, flashVars, wmode, menu, scale){
	var ret = new Object();
	ret.params = new Object();
	ret.objAttrs = new Object();

	ret.objAttrs['data'] = ret.params["movie"] = src;
	ret.objAttrs['width'] = w;
	ret.objAttrs['height'] = h;
	ret.params['quality'] = 'high';
	ret.objAttrs['type'] = 'application/x-shockwave-flash';
	ret.params['menu'] = 'false';
	
	if(id) ret.objAttrs['id'] = id;
	
	if(flashVars) ret.params['flashVars'] = flashVars;
	
	ret.params['wmode'] = (wmode)? wmode : 'transparent';
	ret.params['scale'] = (scale)? scale : 'exactfit';
	ret.params['menu'] = (menu)? menu : 'false';
	
	return ret;
}

/* Guardas as pasatas no array */
niveis = location.href.split("/");
/* Mostra os crosslinks da lateral de acordo com a pasta indicada na url */
/*function mostraEscondeCross(idPrincipal){	
	for(var i=3; i<niveis.length; i++){
		if(niveis[i] == 'produtos'){				
			document.getElementById('crosslinkDivirtase').className = "mostra";
			document.getElementById('crosslinkConhecaAmazonia').className = "mostra";			
		}
		else if(niveis[i] == 'conheca_amazonia'){
			if(document.getElementById('concursoTeste'))
				document.getElementById('concursoTeste').className = "mostra";
		}
		else if(niveis[i] == 'downloads'){
			document.getElementById('crosslinkProdutos').className = "mostra";
			document.getElementById('crosslinkCartaoMusical').className = "mostra";
			if(document.getElementById('concursoTeste'))
				document.getElementById('concursoTeste').className = "mostra";
		}
		else if(niveis[i] == 'cartao_postal'){
			document.getElementById('crosslinkProdutos').className = "mostra";
			document.getElementById('crosslinkDivirtase').className = "mostra";
			if(document.getElementById('concursoTeste'))
				document.getElementById('concursoTeste').className = "mostra";							
		}
	}	
}*/

function marcaMenuLateral(idPrincipal){
	var links = document.getElementById(idPrincipal).getElementsByTagName('a');
	for(var b=0; b<links.length; b ++){
		for(var c=4; c<niveis.length; c ++){
			if(links[b].id == niveis[c]){
				links[b].className = "marcado";		
			}
		}
	}
}

function marcaMenuDescobrindoAmazonia(idPrincipal){
	var links = document.getElementById(idPrincipal).getElementsByTagName('a');
	var id = location.href.substr(location.href.indexOf('documentoId=') + 'documentoId='.length );
	for(var b=0; b<links.length; b++){
		if(links[b].id == id){
			links[b].className = "marcado";		
		}
	}
}



<!-- Pop up -->

	 function openPopUpURL(szer, wys,adresUrl,okno){
	 	param="scrollbars=1,resizable=no,width="+szer+",height="+wys+",left="+(screen.width/2 - szer/2)+",top="+(screen.height/2 - wys/2 - 40);
	 	window.open(adresUrl, okno, param);
	}