Update RSI_ID.js

Changed order of template replace code to match html template.