function validate(theForm) {
var reason = "";
reason += check(theForm.frm_user);
reason += check(theForm.frm_pass);

if (reason != "") {
    alert("Oops! You left some fields out. Please fill them in and try again!");
    return false;
  }

  return true;
}

function check(field) {
    var error = "";
 
    if (field.value.length == 0) {
	   field.style.background = "#FEBF65";
       error = "error"
    } else {
        field.style.background = 'White';
    }
    return error;  
}