//GamingDays Javascript functions

    function validatePwd() {
    var invalid = " "; // Invalid character is a space
    var minLength = 6; // Minimum length
    var pw1 = document.existingaccountpassword.password1.value;
    var pw2 = document.existingaccountpassword.password2.value;
    // check for a value in both fields.
    if (pw1 == '' || pw2 == '') {
    alert('Please enter your password twice.');
    return false;
    }
    else {
    if (pw1 != pw2) {
    alert ("You did not enter the same new password twice. Please re-enter your password.");
    return false;
    }
    else {
    //alert('Nice job.');
    return true;
          }
       }
    }
    function validatePwd2() {
    var invalid = " "; // Invalid character is a space
    var minLength = 6; // Minimum length
    var pw1 = document.newaccount.password1.value;
    var pw2 = document.newaccount.password2.value;
    var fn  = document.newaccount.firstname.value;
    var ln  = document.newaccount.lastname.value;
    var gt  = document.newaccount.nickname.value;

    // check for a value in both fields.
    if (pw1 == '' || pw2 == '' || fn == '' || ln == '' || gt == '') {
    alert('All fields are required.');
    return false;
    }
    
    else {
    if (pw1 != pw2) {
    alert ("You did not enter the same new password twice. Please re-enter your password.");
    return false;
    }
    else {
    //alert('Nice job.');
    return true;
          }
       }
    }

	

