var r = document.referrer; r1 = encodeURIComponent(r); document.write("");