Used JavaScript for back and forward.