
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
function ValidaDatos(usu,pwd)
{
	  cad=usu;
	  cont=0;
	  for(i=0; i < cad.length; i++)
		{
			var letra=cad.substring(i,i+1)
			if (letra != " ")
				 cont=1;
		}
	  if (cad=="" || cont==0)
			  alert("Por favor, ingresa tu usuario");
	  else
		  {
			cad=pwd;
			cont=0;
			for(i=0; i < cad.length; i++)
				{
				  var letra=cad.substring(i,i+1)
				  if (letra != " ")
					   cont=1;
				}
			if (cad=="" || cont==0)
				alert("Por favor, ingresa tu password");
			else
				{
					document.Entrar.submit();
				}
		 }
}

var esNavegador, esIExplorer;
  esNavegador = (navigator.appName == "Netscape") ? true : false;
  esIExplorer = ((navigator.appName.indexOf("Microsoft") != -1) || (navigator.appName.indexOf("MSIE") != -1)) ? true : false;

document.Entrar.Text1.focus()
function Enviarforma() {
	ValidaDatos(document.Entrar.Text1.value, document.Entrar.Text2.value);
}

function e_entrar()
{ if ((trim(document.Entrar.Text1.value)!="") && (trim(document.Entrar.Text2.value)!="") && (event.keyCode==13))
    ValidaDatos(document.Entrar.Text1.value, document.Entrar.Text2.value); }

function n_entrar(e)
{ if ((trim(document.Entrar.Text1.value)!="") && (trim(document.Entrar.Text2.value)!="") && (e.which==13))
	ValidaDatos(document.Entrar.Text1.value, document.Entrar.Text2.value); }

if (esNavegador)
{	document.Entrar.Text1.onkeypress=n_entrar;
	document.Entrar.Text2.onkeypress=n_entrar; }
if (esIExplorer)
{	document.Entrar.Text1.onkeypress=e_entrar;
	document.Entrar.Text2.onkeypress=e_entrar; }
