<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Ingreso</title>
<style type="text/css">
<!--
.Estilo1 {
	font-size: 24px;
	font-weight: bold;
}
-->
</style>
</head>

<body onload="Javascrip:infoc();">
<form id="form1" name="form1" method="post" action="logueo.php" target="_self">
  <div align="center">
    <table width="15%" border="0">
      <tr>
        <th scope="col">&nbsp;</th>
        <th scope="col">&nbsp;</th>
      </tr>
      <tr>
        <td><div align="right">Usuario:</div></td>
        <td><input name="usuario" type="text" id="usuario" onKeyPress="return valida(event,1)"></td>
      </tr>
      <tr>
        <td><div align="right">Contrase&ntilde;a:</div></td>
        <td><input name="pass" type="password" id="pass" onKeyPress="return valida(event,2)"></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><input type="button" name="Submit" value="Ingresar" onclick="enviar();"></td>
      </tr>
    </table>
  </div>
    <div align="center">
  <iframe name="formulario" src="blanco.htm" width=1px height=1px AllowTransparency="true" frameborder="0"></iframe>
</div>
</form>
</body>
</html>

<script language="javascript">

var nav4 = window.Event ? true : false;
<!-- Valida ingreso de solo numeros -->
function valida(evt,don){
var key = nav4 ? evt.which : evt.keyCode;
if (key==13) { 
	if (don==1)	document.form1.pass.focus(); 
	if (don==2) enviar();
	}
return (key >= 0);
}

function enviar()
	{
	if (document.form1.usuario.value=="")
		{
		alert("Debe ingresar el usuario");
		document.form1.usuario.focus();
		return false;
		}
	if (document.form1.pass.value=="")
		{
		alert("Debe ingresar la contraseņa");
		document.form1.pass.focus();
		return false
		}
	document.form1.submit();
	document.form1.usuario.value="";
	document.form1.pass.value="";
	document.form1.usuario.focus();
	}
function infoc()
	{
	document.form1.usuario.focus();
	}
</script>