v=document.referrer;
document.write('<img src="myref.php?ref='+escape(v)+'" width="1" height="1" />');

