function ajax_set_resolucao()
{
	src_width  = screen.width;
	src_height = screen.height;
	url = "inc/php/resolucao.inc.php?w="+src_width+"&h="+src_height;
	ajax(url);
}
function ajax_votar()
{
	var id_resposta = getCheckedValue(document.forms['form_enquete'].elements['enquete']);
	if (id_resposta)
	{
		get('tr_bt_votar').style.display = 'none';
		get('tr_votando').style.display = '';
		url = prefixo+"inc/php/votar.inc.php?id_enquete="+id_enquete+"&id_resposta="+id_resposta;
	    setTimeout("ajax('"+url+"')", 1000);
//		ajax(url);
	}
}
function ajax_update_rss(id)
{
	url = prefixo+"inc/php/rss_update.inc.php?id_feed="+id;
	ajax(url);
}
function ajax_update_time(id)
{
	url = prefixo+"inc/php/time_update.inc.php?id="+id;
	ajax2(url);
}
function ajax_set_resolucao()
{
	src_width  = screen.width;
	src_height = screen.height;
	url = prefixo+"inc/php/resolucao.inc.php?w="+src_width+"&h="+src_height;
	ajax(url);
}
function login_suporte()
{
    get('login').disabled = true;
    get('password').disabled = true;
    get('td_msg').className = 'TabelaLogin';
    get('td_msg').innerHTML = 'Autenticando...';
    var passwd_str = hex_md5(get('password').value);
    passwd_str = passwd_str.toUpperCase();
    var url = prefixo+'inc/php/login.inc.php?login='+get('login').value+'&passwd='+passwd_str;
    setTimeout("ajax('"+url+"')", 1);
}
//===================================== AJAX FUNCTIONS =====================================//
var req;
function ajax(url)
{
	try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
	catch(e) {
		try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
		catch(oc) { req = null; }
	}
	if (!req && typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); }
	if (req != null) {
		req.onreadystatechange = ajax_receive;
		req.open("GET", url, true);
		req.send(null);
	}
}
function ajax_receive()
{
	if (req) {
		if (req.readyState == 4 && req.status == 200) {
	        window.eval(req.responseText);
	    }
    }
}

var req2;
function ajax2(url)
{
	try { req2 = new ActiveXObject("Msxml2.XMLHTTP"); }
	catch(e) {
		try { req2 = new ActiveXObject("Microsoft.XMLHTTP"); }
		catch(oc) { req2 = null; }
	}
	if (!req2 && typeof XMLHttpRequest != "undefined") { req2 = new XMLHttpRequest(); }
	if (req2 != null) {
		req2.onreadystatechange = ajax_receive2;
		req2.open("GET", url, true);
		req2.send(null);
	}
}
function ajax_receive2()
{
	if (req2) {
		if (req2.readyState == 4 && req2.status == 200) {
	        window.eval(req2.responseText);
	    }
    }
}
//================================== END OF AJAX FUNCTIONS ==================================//