function getRTUserID()
{
	var cookieName = "RADIOTIMES_USER_ID";
	var cookieString = unescape(document.cookie);
	var cookieList = cookieString.split("; ");
	var currentCookieName = "";
	var currentCookieValue = "";
	var rtUserID = "";
	
	for(counter = 0; counter < cookieList.length; counter ++)
	{
	        currentCookie = cookieList[counter];
	        cookieSplitIndex = currentCookie.indexOf("=");
	        currentCookieName = currentCookie.substring(0,cookieSplitIndex);
	        currentCookieValue = currentCookie.substring(cookieSplitIndex+1);

			if(currentCookieName == cookieName)
	        {
				rtUserID = currentCookieValue;
				break;
	        }
	}
	return rtUserID;
}

function invalidCharExcluder(inputString)
{
	var exclusionArray = new Array('!','"','#','$','%','&','\'','*','/',':',';','<','>','\\','^','|','~');
	
	for(excludeCount = 0; excludeCount < exclusionArray.length; excludeCount++)
	{
		while(inputString.indexOf(exclusionArray[excludeCount]) > -1)
		{
			before = inputString.substring(0,inputString.indexOf(exclusionArray[excludeCount]));
			after = inputString.substring(inputString.indexOf(exclusionArray[excludeCount])+1);
			inputString = before + after;
		}
	}
	
	return inputString;
}

var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
var hbx=_hbEvent("pv");hbx.vpc="HBX0103u";hbx.gn="ehg-bbc.hitbox.com";

//BEGIN EDITABLE SECTION
//CONFIGURATION VARIABLES
hbx.acct="DM540803BLSE71EN3";//ACCOUNT NUMBER(S)

//PAGE NAME(S)
// Original code : hbx.pn="PUT+PAGE+NAME+HERE";
var strippedTitle = document.title.substring(14);
if (typeof wssTitle == 'undefined') {hbx.pn = invalidCharExcluder(strippedTitle);} else {hbx.pn = wssTitle;}

// TO MEASURE RSS REFERRAL (code added 31.07.06)
var url = window.location.toString();
if (url.indexOf("?rss") != -1) {
    hbx.pn = hbx.pn + "-rssreferral";
}

//MULTI-LEVEL CONTENT CATEGORY
// Original code : hbx.mlc="CONTENT+CATEGORY";
if (typeof wssContent == 'undefined') {hbx.mlc="CONTENT+CATEGORY";} else {hbx.mlc=wssContent;}

hbx.pndef="title";//DEFAULT PAGE NAME
hbx.ctdef="full";//DEFAULT CONTENT CATEGORY

//OPTIONAL PAGE VARIABLES
//ACTION SETTINGS
hbx.fv="";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
hbx.lt="auto";//LINK TRACKING
hbx.dlf="n";//DOWNLOAD FILTER
hbx.dft="n";//DOWNLOAD FILE NAMING
hbx.elf="n";//EXIT LINK FILTER

//CUSTOM VARIABLES
hbx.ci=getRTUserID();//CUSTOMER ID
hbx.hc1="";//CUSTOM 1
hbx.hc2="";//CUSTOM 2
if (typeof hbx_hc3 == 'undefined') {
	hbx.hc3="";
} else {
	hbx.hc3=hbx_hc3;
}
if (typeof hbx_hc4 == 'undefined') {
	hbx.hc4="";
} else {
	hbx.hc4=hbx_hc4;
}
hbx.hrf="";//CUSTOM REFERRER
hbx.pec="";//ERROR CODES

//INSERT CUSTOM EVENTS


//END EDITABLE SECTION

//REQUIRED SECTION. CHANGE "YOURSERVER" TO VALID LOCATION ON YOUR WEB SERVER (HTTPS IF FROM SECURE SERVER)