Error = {
	display : function(code, message, callback, field){

		switch(code){			
			
			case(204):
				$("#site_status").html("<h1 class=\"textcenter\">Site is currently offline.</h1><h2 class=\"textcenter\">Please visit the URSU front desk to register your locker.</h2>");	
				$(".step").hide();
			break;
			case(10101): //MySQL Error
				alert(message);
			break;

			case(20005): //Method requires session
			case(20202): //Session does not exist
			case(20302): //Trying to release a locker that doesn't exist
			case(20502): //No registrant, something is weird. Retry
			case(20503): //No Locker
			case(203): //Session is gone (Invalid session identifier)
				Cookie.destroy("Session");
				Session.create(callback);
			break;
			
			case(20006): //Method requires authentication
				User.lastFunction = callback;
				User.loginCheck();
			break;
			
			case(20002): //Invalid value for argument
			case(20003): //Missing argument
				Registrant.displayErrors(field);
			break;
			
			case(20301): //More than one reservation per session
				Locker.release(callback);
			break;
			
			case(20303): //Invalid combination
				$("#error_Combination").html("Invalid combination");
			break;
			
			case(20102): //Invalid username or password
				$("#username").select();
			break;
			
			default:
				alert(code + ":" + message)
			break;
			
		}
		
	}
}
