function loginValidation(form){ if(document.forms[form].username.value == ""){ alert("Please fill in a username"); document.forms[form].username.focus(); document.forms[form].username.select(); return false; } if (document.forms[form].password.value ==""){ alert("Please enter a password"); document.forms[form].password.focus(); document.forms[form].password.select(); return false; } return true; } function LoginUser(form){ if (loginValidation(form)){ document.forms[form].submit(); } else{ return false; } } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); }