{
          var msg_key = action + "_error";
          if (validateEmail(document.getElementById(action + '_email').value, action) == false) {
              document.getElementById(action + '_error').innerHTML = "Invalid email address";
              return false;
          } else if (validatePassword(document.getElementById(action + '_pass').value, action) == false) {
              //document.getElementById('signup_error').innerHTML = "Invalid email address";
              return false;
          } else if