function addFav(pagina, titulo)
{
	// Gecko (Mozilla, Firefox, Firebird & Netscape)
   if (window.sidebar) { window.sidebar.addPanel(titulo, pagina,''); }
   // Internet Explorer
   else if (window.external) { window.external.AddFavorite(pagina, titulo); }
   // Opera & Outros
   else { alert("Desculpe, mas seu navegador não possui essa função"); }
}

function xmlhttpPost(strURL,item,destino) {
	var xmlHttpReq = false;
	var self = this;
	// Mozilla/Safari
	if (window.XMLHttpRequest) {
		self.xmlHttpReq = new XMLHttpRequest();
	}
	// IE
	else if (window.ActiveXObject) {
		self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	self.xmlHttpReq.open('POST', strURL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState == 4) {
			updatepage(self.xmlHttpReq.responseText,destino);
		}
	}
	self.xmlHttpReq.send(getquerystring(item));
}

function getquerystring(item) {
	var word = item;
	qstr = 'w=' + escape(word);  // NOTE: no \'?\' before querystring
	return qstr;
}

function updatepage(str,destino){
	document.getElementById(destino).innerHTML = str;
}

function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}