function GerarSWF($arquivo, $altura, $largura, $id, $transparente){
    document.writeln('    <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="'+ $largura +'" height="'+ $altura +'" id="'+ $id +'" name="'+ $id +'" align="top">');
    document.writeln('        <param name="movie" value="' + $arquivo + '" />');
	//Usar sameDomain apenas para flash que estejam no mesmo domínio do html.
	document.writeln('        <param name="allowScriptAccess" value="always" />');
    document.writeln('        <param name="menu" value="false" />');
    document.writeln('        <param name="quality" value="high" />');
    document.writeln('        <param name="salign" value="tl" />');
    document.writeln('        <param name="scale" value="noscale" />');	
	if ($transparente == 1) {
		document.writeln('        <param name="wmode" value="transparent" />');
		document.writeln('        <embed src="'+ $arquivo +'" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent" menu="false" allowScriptAccess="always" quality="high" salign="tl" scale="noscale" id="'+ $id +'" width="'+ $largura +'" height="'+ $altura +'"></embed>');			
	}else{		
    	document.writeln('        <embed src="'+ $arquivo +'" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" menu="false" allowScriptAccess="always" quality="high" salign="tl" scale="noscale" id="'+ $id +'" width="'+ $largura +'" height="'+ $altura +'"></embed>');
	}
	document.writeln('    </object>');	
}	
//====================================================
//FUNÇÃO QUE MARCA A OPÇÃO DO MENU QUE FOI SELECIONADA
//====================================================
function SelectMenu(mItem, base){
    document.getElementById(mItem).style.background = '#fff4b5'; //1A8F8D
    document.getElementById(mItem).style.color = '#0A696D';		
}

function jsGetDateTime(ptime) {
  	var oTime = new Date();
	var nMes = new Array("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro");
	hour = oTime.getHours();
	sResponse = "";
	if(ptime) {
		if ((hour >= 12) && (hour < 18)) {
			 sResponse = '<b>Boa Tarde,</b> ';
		} else if ((hour >= 18) || (hour < 5)) {
			 sResponse = '<b>Boa Noite,</b> ';
		} else {
			 sResponse = '<b>Bom Dia,</b> ';
} 
}
        sResponse += " Ano X - " 
	dia = oTime.getDate();
	mes = nMes[oTime.getMonth()];
	ano = oTime.getFullYear();
	//Validação para que no topparceiro (DocStyles) não dê erro de execução
	if (document.getElementById('dvdatetime')){ document.getElementById('dvdatetime').innerHTML = sResponse + dia  + '&nbsp;de&nbsp;' + mes + '&nbsp;de&nbsp;' + ano; } }
