//Setup an interval to check for when the tracker code is loaded
var checkLivePerson = setInterval("trackLivePersonCode()", 5*1000); //Check every 2 seconds to see if the live person is loaded
function trackLivePersonCode() {
	var lp = "";
	//If lp is undefined, it means the tracker code isn't loaded yet
	if((lp = document.getElementById("needRef")) != undefined) { //Otherwise, assign lp the tracker element
		//Clear the interval
		window.clearInterval(checkLivePerson);
		checkLivePerson = null;
		//Grab the onClick code
		var onClickVal = lp.getAttribute("onClick");
			//And add our own
			onClickVal = "javascript: pageTracker._trackPageview(\"liveperson.com\");" + onClickVal;
		//Assign the new code to the element	
		lp.setAttribute("onClick", onClickVal);		
		return;
	} else {
		return;
	}	
}