function login() {
 
    if (!enProceso && http) {
       var login = document.getElementById('login_l').value;
	   var pass = document.getElementById('pass_l').value;
       var url = "lib/funciones/php/login/login.php?login="+login+"&pass="+pass+"";
       http.open("GET", url, true);
       http.onreadystatechange = function () {
    if(http.readyState==1){

        }else if (http.readyState == 4) {
	   
       if (http.status == 200) {

          if (http.responseText.indexOf('invalid') == -1) {
             results = http.responseText.split(",");
             
             if (results[1]==1){
             	alert("Login / Password incorrectos");
             }else{
				 				             Modalbox.show('<div align=\'center\'><img src=\'/images/inforegistro.jpg\' width=\'295\' height=\'106\' /><br><a class=\'formulario\' href=\'home.php\'>[CERRAR]</a></div>', {title: false, height: 160,width: 350 });
							 return false;
				             enProceso = false;
				 }
             enProceso = false;
          }
       }
    }
};
       enProceso = true;
       http.send(null);
    }
}
