function doLogin(url, content) {
	
	reload();
  
	requisicao_httpt = false;

  if (window.XMLHttpRequest) { // Mozilla, Safari,...
    requisicao_http = new XMLHttpRequest();
    if (requisicao_http.overrideMimeType) {
      requisicao_http.overrideMimeType('text/html; charset=iso-8859-1');
    }
  } else if (window.ActiveXObject) { // IE
    try {
      requisicao_http = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        requisicao_http = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {}
    }
  }

  if (!requisicao_http) {
    alert('Não foi possível criar uma instância XMLHTTP');
    return false;
  }
  requisicao_http.onreadystatechange = exibirConteudo;
  requisicao_http.open('POST', url, true);
  requisicao_http.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  requisicao_http.send(content);
}

function getUser () {
	
	var url = "login.php";
	var username = document.getElementById("username");
	var senha = document.getElementById("senha");
	
	if(username.value == "") {
		alert("Por favor, digite seu nome");
		username.focus();
	} else if (senha.value == "") {
		alert("Por favor, digite sua senha");
		senha.focus();
	} else {
		var content = "username=" + username.value + "&senha=" + senha.value;
		doLogin(url, content);
	}	
	
	
	return content;
}