Random Image Loading via XML

i’m trying to randomly load images via xml but my output window keeps saying “undefined”.

can somebody help me please?

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

p = 0;
function randomImage(){
	if(loaded == filesize){
		p = Math.floor(Math.random() * total);
		bgholder._alpha = 0;
		bgholder.loadMovie(image[0], 1);
	}
}