// Texto Status
window.status=document.title;

// Determina o browser
NS6 = (document.getElementById&&!document.all);
IE = (document.all);
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4");

var objeto = null;
// Caça Objeto pelo nome (div, img etc)
function GetObject(nome){
 if (NS6){objeto=document.getElementById(nome);}
 else if (IE) {objeto=document.all(nome);}
 else if (NS) {objeto=document.layers[nome];}
 return objeto;
}

// Desativa um layer pelo nome
function desativa(nome){
 GetObject(nome);
 if (IE||NS6) {objeto.style.visibility = "hidden";}
 if (NS) {objeto.style.visibility = "hide";}
 return true;
}

// Ativa um layer pelo nome
function ativa(nome){
 GetObject(nome);
 if (IE||NS6) {objeto.style.visibility = "visible";}
 if (NS) {objeto.style.visibility = "show";}
 return true;
}


	 function addbookmark()
 {
	 var browsName = navigator.appName;
	 if (browsName == "Microsoft Internet Explorer"){ 
		 window.external.AddFavorite(document.location,document.title);
	 }
	 else {
		 window.sidebar.addPanel(document.title,document.location,'')
	 }
} 


function createXMLHttpRequest() {
  try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}
  try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}
  try { return new XMLHttpRequest(); } catch(e) {}
  alert("XMLHttpRequest not supported");
  return null;
}
function ajax_encode(texto)
{
	texto = texto.toString();
	utftexto = ""
	for (var n = 0; n < texto.length; n++)
	{
		var c = texto.charCodeAt(n);
		if(c >= 128)
			utftexto += "&#"+c+";";
		else
			utftexto += String.fromCharCode(c);
	}
	utftexto = utftexto.replace(/\u2019/,"'");
	utftexto = utftexto.replace(/\u201C/,"\"");
	utftexto = utftexto.replace(/\u201D/,"\"");
	utftexto = encodeURIComponent(utftexto);
	return utftexto;
}

 

