function printthis() {
window.print();
}


function validateFormOnSubmit(theForm) {
var reason = "";
	reason += validateEmpty(theForm.reg);
	reason += validateEmpty(theForm.pass);
      
  if (reason != "") {
    alert("Please fill in your:\n" + reason);
    return false;
  }

  return true;
}

function validateEmpty(fld) {
    var error = "";
 
    if (fld.value.length == 0) {
        fld.style.background = 'Yellow'; 
        error = fld.name + "\n";
    } else {
        fld.style.background = 'White';
    }
    return error;  
}

