function validateFormOnSubmit(theForm) {
var reason = "";

  reason += validateEmpty(theForm.username);
  reason += validateEmpty(theForm.password);

  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }

  return true;
}

function validateEmpty(fld) {
    var error = "";
 
    if (fld.value.length == 0) {
        fld.style.background = '#D8D8D8'; 
        error = "The required field has not been filled in.\n"
    } else {
        fld.style.background = 'White';
    }
    return error;  
}

function validSearchForm(searchForm)
{
    if (searchForm.jobNo.value.length == 0) 
    {
        alert("You must specify the search criteria");
	return false;
    } 
    else 
    {
        return true;
    }
	
}

