TRY THIS!
<script type="text/javascript">
<!--
function process_form(theform)
{
var element_names = new Object()
element_names["req_username"] = "Username"
element_names["req_password"] = "Password"
// Check for required elements
if (document.images) {
for (i = 0; i < theform.length; ++i) {
if (theform.elements[i].name.substring(0, 4) == "req_") {
if ((theform.elements[i].type=="text" || theform.elements[i].type=="textarea" || theform.elements[i].type=="password" || theform.elements[i].type=="file") && theform.elements[i].value=='') {
alert("\"" + element_names[theform.elements[i].name] + "\" is a required field in this form.")
return false
}
}
}
}
// Disable any submit buttons we find
if (document.all || document.getElementById) {
for (i = 0; i < theform.length; ++i) {
var elem = theform.elements[i]
if (elem.type.toLowerCase() == "submit")
elem.disabled = true
}
return true
}
return true
}
// -->
</script>
<form name="login" method="post" action="<?php echo $pun_root;?>login.php?action=in" id="login" onsubmit="return process_form(this)">
<input type="hidden" name="form_sent" value="1">
<input type="hidden" name="redirect_url" value="<?php echo $_SERVER['REQUEST_URI']; ?>">
<td class="puncon2"><span class="puncon1right"><b><?php echo $lang_common['Username'] ?></b></span>
<input type="text" name="req_username" size="20" maxlength="25">
<span class="puncon1right"><b><?php echo $lang_common['Password'] ?></b></span>
<input type="password" name="req_password" size="10" maxlength="16">
<input type="submit" name="login" value="<?php echo $lang_common['Login'] ?>"></td>
</form>