//atacha o flash em uma div
function attachFlash(url, width, height, target, wmode, scale, quality, vars){
	var content; identity = url.split("."); identity = identity[0]; 
	
	if(!target) { document.write("<div id=\"id_"+ identity +"\"></div>"); target = "id_"+ identity;}
	if(!quality)quality	= "best";
	
	target = document.getElementById(target);
	content =  "<object id=\"" + identity + "\" width=\"" + width + "\" height=\"" + height + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\">";
    content += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
	content +=  "<param name=\"movie\" value=\"" + url + "?" + vars +"\">";
    content +=  "<param name=\"quality\" value=\"" + quality + "\">";
	content +=  "<param name=\"wmode\" value=\"" + wmode + "\" /> ";
	content +=  "<param name=\"bgcolor\" value=\"#F2B775\" /> ";
    content +=  "<embed name=\"" + identity + "\" src=\"" + url + "?" + vars +"\"  width=\"" + width + "\" height=\"" + height + "\" wmode=\"" + wmode + "\" scale=\"" + scale + "\" quality=\"" + quality + "\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"></embed>";
	content +=  "</object>";
	target.innerHTML = content;
}
//manda uma variavel no flash
function talkFlash(fla, func, arguments){
	if(window[fla])		window.document[fla].SetVariable("_root.func", func);
	if(document[fla])	document[fla].SetVariable("_root.func", func);
	
	if(window[fla]) 	window.document[fla].SetVariable(arguments, arguments);
	if(document[fla])	document[fla].SetVariable(arguments, arguments);
	
	if(window[fla])		window.document[fla].SetVariable("_root.flag", arguments);
	if(document[fla])	document[fla].SetVariable("_root.flag", arguments);
}
/*
_root.watch("flag", function() { 
    eval(this.func)(); 
}); 
*/
function exibePortfolio(id){
	elemento = document.getElementById('portfolio_'+id);
	if(elemento.style.display == 'none'){
		elemento.style.display = 'block';
	} else if (elemento.style.display == 'block') {
		elemento.style.display = 'none';
	}
	return true;
}