JavaScript Function for Passing URL Params on the SRC attribute