
/* :) Altera conteúdo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

function exibeDiv(id){

	tag = $tags("span");
	
	for(i = 0; i < tag.length; i++){
		
		if(tag[i].className == "exibeDiv"){
		tag[i].style.display = 'none';
		}
		
	}
	
	$(id).style.display = '';
	$('exibeBt').style.display = '';

}


/* :) AJAX ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

function changeHome() {
	
	$('conteudo').innerHTML = '';
	$('conteudo').style.display = 'none';
	$('meioIndex').style.display = '';

}


/* :) AJAX ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

function change(pag,oculta,exibe,id) {
   

	if(exibe == ""){ exibe = "conteudo"; }
	if(oculta != "") { $(oculta).style.display = 'none'; }
	
	$(exibe).innerHTML = '';
	$(exibe).style.display = '';


    /* .............. Coloca ativo no menu certo .................. */
	
	  try { ajax = new ActiveXObject("Microsoft.XMLHTTP"); } 
      catch(e)   { try { ajax = new ActiveXObject("Msxml2.XMLHTTP"); }
	  catch(ex)  { try { ajax = new XMLHttpRequest(); }
	  catch(exc) { alert("Esse browser não tem recursos para uso do Ajax"); ajax = null; } } }
	  
	  if(ajax)   {
		  
	    $('load').style.display = '';
		
		ajax.open("GET", "ajax_change.php?pag=" + pag + "&id=" + id, true);
		ajax.onreadystatechange = function() {
		
		if(ajax.readyState == 4){ 
		if(ajax.status == 200){
			
		var texto = ajax.responseText;
		texto = texto.replace(/\+/g," ");
		texto = unescape(texto);
		
		$('load').style.display = 'none';
		$(exibe).innerHTML = texto;

		}
		else { alert(ajax.statusText); }
		}
		}
		ajax.send(null);
	    
	  }
	  
}


