function abrir_fundo() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
document.getElementById('fundo1').style.display = 'block';
document.getElementById('fundo2').style.display = 'block';
document.getElementById('fundo1').style.top = '0px';
document.getElementById('fundo2').style.top = '0px';
document.getElementById('fundo1').style.left = '0px';
document.getElementById('fundo2').style.left = '0px';
document.getElementById('fundo1').style.width = myWidth+'px';
document.getElementById('fundo2').style.width = myWidth+'px';
document.getElementById('fundo1').style.height = myHeight+'px';
document.getElementById('fundo2').style.height = myHeight+'px';
}

function fechar_fundo() {
document.getElementById('fundo1').style.display = 'none';
document.getElementById('fundo2').style.display = 'none';
}

function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  window.alert( 'Width = ' + myWidth );
  window.alert( 'Height = ' + myHeight );
}

function xmlhttpPost(url,nome) {
  if(window.ActiveXObject) {
 	 ajax = new ActiveXObject("Microsoft.XMLHTTP"); /*Inicia o Ajax*/
  } else {
 	 ajax = new XMLHttpRequest("Microsoft.XMLHTTP"); /*Inicia o Ajax*/
  }
  ajax.open('GET', url)
  ajax.onreadystatechange = function() {
	  if (ajax.readyState == 1) {

		    //document.getElementById('divNoticias').style.display = 'Carregando...';
			document.getElementById('divNoticias').innerHTML = 'Carregando...  "'+nome+'"';
	  }
	  if (ajax.readyState == 4) {
		  //Processamento OK, a lista recebe os dados gerados pela outra página
		  if (ajax.status == 200) {
			
				  document.getElementById('divNoticias').innerHTML = ajax.responseText;
		  		  
			
		  } else {
			  document.getElementById('divNoticias').innerHTML = ajax.responseText;
			  document.getElementById('').innerHTML = ajax.responseText;
			 
			    
			 
		  }
	  }

  }
  ajax.send(url);
}
function xmlhttpPost_busca(buscas) {
	url = "noticias.asp?param=buscar&palavra=" + buscas;
  if(window.ActiveXObject) {
 	 ajax = new ActiveXObject("Microsoft.XMLHTTP"); /*Inicia o Ajax*/
  } else {
 	 ajax = new XMLHttpRequest("Microsoft.XMLHTTP"); /*Inicia o Ajax*/
  }
  ajax.open('GET', url)
  ajax.onreadystatechange = function() {
	  if (ajax.readyState == 1) {

		    //document.getElementById('divNoticias').style.display = 'Carregando...';
			document.getElementById('divNoticias').innerHTML = 'Carregando...';
	  }
	  if (ajax.readyState == 4) {
		  //Processamento OK, a lista recebe os dados gerados pela outra página
		  if (ajax.status == 200) {
			
				  document.getElementById('divNoticias').innerHTML = ajax.responseText;
		  		  
			
		  } else {
			  document.getElementById('divNoticias').innerHTML = ajax.responseText;
			  document.getElementById('').innerHTML = ajax.responseText;
			 
			    
			 
		  }
	  }

  }
  ajax.send(url);
}



function Temporizar (){
//  var DataHora;

//        DataHora     = new Date ();
//      Relogio.value= DataHora.toLocaleTimeString ();
//alert("teste");
xmlhttpPost("exibeNoticia.asp");
} 


function Inicializar (Intervalo_MSeg){
  Temporizar ();
  setInterval (Temporizar, Intervalo_MSeg);
} 

function mostrabox(texto) {
	
		 if (navigator.appVersion.indexOf('MSIE') > 0){
   				 document.getElementById(texto).style.display = 'block';
				 document.getElementById(texto).style.left = "700px";
			//alert(event.clientX);
			}
			else {
				 document.getElementById(texto).style.display = 'block';
				 document.getElementById(texto).style.left = "700px";
			}	
}	



	
function somebox(texto) {

	document.getElementById(texto).style.display = 'none';
	
}  
