fixed javascript on random insipration page so doesnt reload every time