var ref = document.referrer;