function validar(){
	objra = document.getElementById('ra');
	objps = document.getElementById('senha');
	//se o ra tiver mais de 3 digitos e a senha tiver digitos ele autoriza a tentativa de login
	if (objra.value.length >= 3 && objps.value.length > 0){
		return true;
	} else {
		alert("Atenção!\n\nMatricula ou Senha incorretos");
		return false;
	}
}


function soNumero(e) {
if(window.event) {
// for IE, e.keyCode or window.event.keyCode can be used
key = e.keyCode;
}
else if(e.which) {
// netscape
key = e.which;
}
if (key!=8 || key < 48 || key > 57) return (((key > 47) && (key < 58)) || (key==8));
{
    return true;
  }
}

var ini_formulario = '<form name="login" id="login" method="post" action="http://www.mackenzie-rio.edu.br/portal/verifica_ra.php" onSubmit="return validar()">';

//LOGIN NO PORTAL MICROSIGA
//var ini_formulario = '<form name="login" id="login" method="post" action="http://189.57.248.14/w_wlog00.apw" onSubmit="return validar()">';