fixed index js randomviewer