//Função rodar Flash

function RodarFlash(path,variaveis,_width,_height)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+_width+'" height="'+_height+'">')
		document.write('<param name="movie" value="'+path+'?'+variaveis+'">')
		document.write('<param name="quality" value="high">')
		document.write('<param name="wmode" value="transparent">')
		document.write('<embed src="'+path+'?'+variaveis+'" width="'+_width+'" height="'+_height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>')
	document.write('</object>')
}
//Funções do DHTML
function centralizaDHTML(largura, altura, div){
	//centro da tela
	//document.getElementById(div).style.left = (screen.availWidth / 2) - (largura/2)+'px';
	//document.getElementById(div).style.top = (screen.availHeight / 2) - (altura/2)+'px';
	
	//fixo na tela
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
		var ieversion = new Number(RegExp.$1); // capture x.x portion and store as a number
		if (ieversion>=8)
			document.getElementById(div).style.left = (screen.availWidth / 2) - (largura/2) + 349 + 'px';
		if (ieversion <= 7)
			document.getElementById(div).style.left = (screen.availWidth / 2) - (largura/2) + 119 + 'px';
	}
	/*else if (/Safari[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Safari/x.x or Safari x.x (ignoring remaining digits);
		document.getElementById(div).style.left = (screen.availWidth / 2) - (largura/2) + 350 + 'px';
		var sfversion = new Number(RegExp.$1) // capture x.x portion and store as a number
		if (sfversion>=3)
			document.write("You're using Sf 3.x or above")
		else if (sfversion>=2)
			document.write("You're using Sf 2.x")
		else if (sfversion>=1)
			document.write("You're using Sf 1.x")
	}*/
	else
	{
		document.getElementById(div).style.left = (screen.availWidth / 2) - (largura/2) + 349 + 'px';
	}
	document.getElementById(div).style.top = (screen.availHeight / 2) - (altura/2) - 157 + 'px';
}

function posicionaFechar(largura,altura){
	document.getElementById("fecharDHTML").style.display = 'block';
	document.getElementById("fecharDHTML").style.top = (screen.availHeight / 2) - ((altura/2) + 10)+'px';
	document.getElementById("fecharDHTML").style.left = (screen.availWidth / 2) + (largura/2)+'px';
}
//Funções do DHTML - fim



