Simple Javascript History Manager