﻿   
var errorID = gup("error");
var notice = document.getElementById('notice');

if (errorID =="details")
{

    notice.innerHTML = "Not all required information was supplied";
}
else if (errorID =="username")
{
     notice.innerHTML = "UserName was not found";
}
else if (errorID =="password")
{
     notice.innerHTML = "Password is invalid";
}
else if (errorID =="BadgeTaken")
{
     notice.innerHTML = "Badge is already being used";
}

else if (errorID =="BadgeNotFound")
{
     notice.innerHTML = "Badge does not exist";
}
 else if (errorID =="PasswordSuccess")
{
     notice.innerHTML = "An email with instructions on setting a new password has been sent to all contact emails associated with this account.";
}

else{

     notice.innerHTML = "";
}
    


function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}