function replaceText(text){ while(text.lastIndexOf("&") > 0){ text = text.replace('&', '[i-Stats]'); } return text; } var web_referrer = replaceText('default-oarticle_105715_0_461.html'); document.write('');