
function PopularityLinkRedirect()
{
if (location.hash.length > 0)
{
	hash = location.hash.substr(1, location.hash.length-1);
			
	indexA = hash.indexOf("a");
	indexL = hash.indexOf("l");
	indexH = hash.indexOf("hx");

	if (document.referrer)
		urlReferrer = document.referrer;
	else
		urlReferrer = "null";


	if (indexA == 0 && indexL > 0 && indexH > 0 && indexL < indexH)
	{
		aff = hash.substr(indexA + 1, indexL-indexA-1);
		lk = hash.substr(indexL + 1, indexH-indexL-1);	

		location.href = "https://www.affiliaterunner.com/tracker/redirect.aspx?affiliate=" + aff + 
				"&link=" + lk + "&ref=" + urlReferrer;
	}				
}
}