Fixing department map to pull room code parameter using Javascript instead of PHP