function alteraClasse(alteraClasseDiv,alteraClasseType){
	document.getElementById(alteraClasseDiv).setAttribute("class",alteraClasseType);
	document.getElementById(alteraClasseDiv).setAttribute("className",alteraClasseType);
}
function insertFlash(flashDiv,flashURL,flashWidth,flashHeight,flashTransparent){
	if(flashTransparent==1){
		var newParam = "<param name='wmode' value='transparent' />";
		var newWmode = "wmode='transparent'";
	}else{
		var newParam = "";
		var newWmode = "";
	}
	document.getElementById(flashDiv).innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+flashWidth+"' height='"+flashHeight+"' title='Roberto de Sá'><param name='movie' value='"+flashURL+"' /><param name='quality' value='high' />"+newParam+"<embed src='"+flashURL+"' "+newWmode+" quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+flashWidth+"' height='"+flashHeight+"'></embed></object>";
}

function popup(nome,largura,altura){
 window.open(nome,'popup','width='+largura+',height='+altura+',scrolling=auto,top=70,left=70');
 }
 
//Nova função que abre a imagem em pop-up sempre centralizada, único parâmetro necessário é a URL inteira, contendo .jpg ou .gif etc...
 function abreImagem(URL){
	
	foto= new Image();
	foto.src=(URL);
	telaEsquerda = (screen.width)/2;
	telaTopo = (screen.height)/2;
	margemEsquerda = telaEsquerda - (foto.width/2);
	margemTopo = telaTopo - (foto.height/2);
 
	window.open(URL,'','width='+foto.width+',height='+foto.height+',scrolling=auto,top='+margemTopo+',left='+margemEsquerda);
}
