function forgotit(form){ var missing="The following fields are required:\n\n"; //Sets up one long string to display all errors at once. var retVal=true; //Variable that is used to see if the form should be submitted. Changes to //false if there are any errors. var j = 0; if(form.forgotpw.value == "") { missing = missing + "Please enter your Account ID \n"; j++; if (j == 1) {gotofld=form.forgotpw} } if (j == 0) { form.pagesw.value = "forgotpw"; form.JSLotus.value = "1"; return true; } else{ form.JSLotus.value = "0"; alert (missing); gotofld.focus(); return false; } }