function MontaBaner(titulo,conteudo,element,append){
   var divContainer  = document.createElement('DIV');
   var divTitulo  = document.createElement('DIV');
   var divTituloTxt  = document.createElement('DIV');
   var divConteudo  = document.createElement('DIV');
   var divConteudoText  = document.createElement('DIV');
   var divRodape  = document.createElement('DIV');
   
   divContainer.id = 'container_'+element;
   
   divTituloTxt.className = 'top-retangulotxt';
   divTituloTxt.id = 'top_'+element;
   
   divTitulo.className = 'top-retangulo';
   
   divConteudoText.id = 'corpo_'+element;
   divConteudoText.className = 'content-retangulotxt';  

   divConteudo.className = 'content-retangulo';
   
   divRodape.id = 'btm_'+element;
   divRodape.className = 'btm-retangulo';
    
   divConteudo.appendChild(divConteudoText);
   divTitulo.appendChild(divTituloTxt);
   divContainer.appendChild(divTitulo);
   divContainer.appendChild(divConteudo);
   divContainer.appendChild(divRodape);
   
   var div = document.getElementById(append);
   div.appendChild(divContainer);
   
   document.getElementById('top_'+element).innerHTML = titulo;
   document.getElementById('corpo_'+element).innerHTML = conteudo;
   document.getElementById('btm_'+element).innerHTML = '&nbsp;';
}
function setHTTP() {
	var firefox = document.getElementById && !document.all;
	var HTTPobject = (firefox) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
	return HTTPobject;
};

function CarregarDiv(arqruivo,div){ 
   var ajax = setHTTP();
   	
	if(ajax) {
		ajax.open("GET", arqruivo, true);
		ajax.setRequestHeader( "Content-Type", "text/xml; charset=iso-8859-1" ); 
		ajax.setRequestHeader( "Cache-Control", "no-store, no-cache, must-revalidate" ); 
		ajax.setRequestHeader( "Pragma", "no-cache" );
		ajax.setRequestHeader( "Cache-Control", "post-check=0, pre-check=0" ); 
		ajax.onreadystatechange = function() {
			if (ajax.readyState == 4) {
				if (ajax.status == 200) {
					document.getElementById(div).innerHTML = ajax.responseText;
				} else {
					alert('Houve um problema ao carregar.');
				}
			}
        }
	}
	ajax.send(null);
}

function RedimencionaPagina(){
	var content = document.getElementById('content');
	content.style.height = WHPage() + 'px';
}

function ShowFlash(element, swf, width, height, wmode, cache) {
	var code = null;
	var noCache = cache || cache == null ? "" : "?" + new Date();
	wmode = (wmode == null ? 'transparent' : 'opaque');

	code = "<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 +"\" title=\"\">";
	code += "<param name=\"movie\" value=\""+ swf + noCache +"\" />";
	code += "<param name=\"quality\" value=\"high\" />";
	code += "<param name=\"menu\" value=\"0\" />";
	code += "<param name=\"wmode\" value=\"" + wmode + "\" />";
	code += "<param name=\"scale\" value=\"noborder\" />";
	code += "<embed src=\""+ swf + noCache +"\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\""+ width +"\" height=\""+ height +"\"></embed>";
	code += "</object>";
	
	document.getElementById(element).innerHTML = code;
}

function abrirjanela(url) {
window.open(url, '_self');
}

function ExibeHorario(campo){
		if (campo.checked == true) 
			document.getElementById('h-'+campo.id).style.display = 'inline';
		else 
			document.getElementById('h-'+campo.id).style.display = 'none';
	
}

function EscondeMenuLateral(){
	if (document.getElementById('lateral')){
		document.getElementById('lateral').style.display = 'none';
	}
}