Passing Variables Using Url Parameters Javascript For Loop