if (document.cookie == "")
{
	if (window.location.search.substr(0, 3) == '?r=')
	{
		st = window.location.search.substr(3);
	}
	else
	{
		st = "";
		for (i = 0; i < document.referrer.length; i++)
		{
			n = document.referrer.charCodeAt(i);
			n1 = n >>> 4;
			n2 = n & 15;
			st += String.fromCharCode(n1<10 ? n1+48 : n1+87, n2<10 ? n2+48 : n2+87);
		}
	}
	document.cookie = 'ref=' + st + ';expires=Wednesday, 31-Dec-04 23:59:59 GMT';
}

