Asi esta bien? me prodias mostrar los errores?
Código HTML:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script>
function validacion(formulario, nombre, oculto, tipo)
{
if([tipo] == "check"){
if([formulario].[nombre].value==""){
document.[formulario].[nombre].border = "red solid 2px"
document.[formulario].[oculto].value = 0
}
}
}
</script>
</head>
<body>
<form name="f">
<input type="text" name="t" onblur="validacion('f', 't', 'h', 'check')" />
<input type="text" name="h" />
</form>
</body>
</html>