var playerXmlHttp = false;

function testFn() {
	alert("Testing");
}

function playerXmlRequest() {
	playerXmlHttpRequest();
	playerXmlHttp.onreadystatechange=function(){
		playerDetails();
	}
	playerXmlHttp.open("GET", "aptechRecord.xml", true);
	playerXmlHttp.send(null);	
}

function playerXmlHttpRequest() {
	if (window.ActiveXObject) {
		playerXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest) {
		playerXmlHttp = new XMLHttpRequest();
	}
}

function playerDetails() {
	if ((playerXmlHttp.readyState == 4) && (playerXmlHttp.status==200)) {
		createPlayerData();
	}
}

function createPlayerData() {
	var response = playerXmlHttp.responseXML.documentElement;
	x = response.getElementsByTagName("DATA_RECORD");
	var txt="<div><ul id='navToolTip'>"; 
	for (i=0;i<x.length;i++) {
		txt=txt+ "<li id='navLi'><a href='#'>";
    	xx=x[i].getElementsByTagName("Batsmen");
		name = 	xx[0].firstChild.data;
		txt=txt+ name.toLowerCase();
//onclick='pDetajaxpage("suresh.htm", "railContent", this, "Suresh"); return ajax_hideTooltip()' onmouseover='toolTip("suresh.htm",this)' onmouseout="ajax_hideTooltip()">Suresh</a></li>		
//		txt = txt + "onclick='pDetajaxpage(" + name.toLowerCase() + ", 'railContent', this, " + name.toLowerCase() + "); return ajax_hideTooltip()' onmouseover='toolTip("suresh.htm",this)' onmouseout="ajax_hideTooltip()"
//		txt= txt + "<li id='navLi'><a href='#' rel='railContent' onclick='pDetajaxpage(" + name.toLowerCase() + ")>"
//	    txt=txt + xx[0].firstChild.data + "</a></li>";
//	    txt=txt + name + "</a></li>";
		txt = txt + "</a></li>";
      }
	document.getElementById('railContent').innerHTML=txt;
}