Troubleshoot xml variable/javascript

I’m using Google Analytics to test the tracking of variable clicks with getURL’s pageTracker javascript. Tried to get xml to pass the variable to getURL’s javascript to pass it along to GA but it seem doesn’t work. Let me illustrate the problem…

GA was able to record the “/test” variable clicks with this simple static as:


test.onRelease = function():Void
{
	getURL("javascript:pageTracker._trackPageview('/test');");
	getURL("http://yahoo.com", "_blank");
};

Now here’s as code using xml to pass the variable to javascript:

test.onRelease = function():Void
{
	getURL("javascript:pageTracker._trackPageview(trackad[p]);");
	getURL(link[p], "_blank");
};

GA wasn’t able to track and record any “/test01” or “/test02” variable clicks. I figure that issue lies with xml variable and javascript. Any suggestion to address this issue?

Here’s xml file in case:


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<trackList>
	<track>
		<image>test/ties01.jpg</image>
		<link>http://yahoo.com</link>
		<trackad>/test01</trackad>
	</track>
	<track>
		<image>test/ties02.jpg</image>
		<link>http://espn.com</link>
		<trackad>/test02</trackad>
	</track>
</trackList>

and as to load related xml stuff:


function loadXML(loaded) {
	if (loaded) {
		xmlNode = this.firstChild;
		image = [];
		link = [];
		trackad = [];
		total = xmlNode.childNodes.length;
		for (i=0; i<total; i++) {
			image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
			link* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
			trackad* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
}
		firstImage();
	} else {
		content = "file not loaded!";
	}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("test.xml");
p = 0;