var objRequest=false;

function createXMLHttp()
{
		
	if(window.XMLHttpRequest)
	{
		objRequest=new XMLHttpRequest();
		
		if(objRequest==null)
			objRequest=new ActiveXObject("Microsoft.XMLHTTP");
		if(objRequest==null)
			objRequest=new ActiveXObject("MSXML2.XMLHTTP");
		if(objRequest==null)
			objRequest=new ActiveXObject("MSXML2.XMLHTTP.3.0");
		if(objRequest==null)
			objRequest=new ActiveXObject("Msxml2.XMLHTTP.4.0");
		if(objRequest==null)
			objRequest=new ActiveXObject("Msxml2.XMLHTTP.5.0");
		if(objRequest==null)
			objRequest=new ActiveXObject("Msxml2.XMLHTTP.6.0");
		if(objRequest==null)
			objRequest=new ActiveXObject("Msxml2.XMLHTTP.7.0")
		//objRequest.overrideMimeType("text/xml");
		
	}
	else if(window.ActiveXObject)
	{

		objRequest=new ActiveXObject("Microsoft.XMLHTTP");
		if(objRequest==null)
			objRequest=new ActiveXObject("MSXML2.XMLHTTP");
		if(objRequest==null)
			objRequest=new ActiveXObject("MSXML2.XMLHTTP.3.0");
		if(objRequest==null)
			objRequest=new ActiveXObject("Msxml2.XMLHTTP.4.0");
		if(objRequest==null)
			objRequest=new ActiveXObject("Msxml2.XMLHTTP.5.0");
		if(objRequest==null)
			objRequest=new ActiveXObject("Msxml2.XMLHTTP.6.0");
		if(objRequest==null)
			objRequest=new ActiveXObject("Msxml2.XMLHTTP.7.0");

	}
	
}


function getPerformance(id)
{
	
	//document.getElementById("tcaption").innerHTML=document.getElementById("txttournament").value;
	$.blockUI({ message: '<img src=image/loader.gif></img>',css: { backgroundColor: '#292929', color: '#fff', width: '100', height: '100', border: '0px solid #f00', left: '50%', top: '50%'} });
	if(objRequest)
	{
		objRequest.open("POST","performance.php?r="+ new Date().getTime());
		objRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objRequest.onreadystatechange=function()
		{
		if(objRequest.readyState==4 && objRequest.status==200)
			{
				var doc=objRequest.responseXML;
				var performanceNode=doc.documentElement;
				if(performanceNode)
				{
					var str="<br/><br/>";
					//str=str+"<div id='header' style='background-color:#000000; height:30px;width:528px;margin: 20px 0px 0px 12px;padding-bottom:5px;'>";
					//str=str+"<div class='caption1'>"+document.getElementById("txttournament").value+"</div>";
					//str=str+"</div><br/>";
					var typeNode=performanceNode.getElementsByTagName("type");
					
					if(typeNode[0].getElementsByTagName("player").length==0) // if first performance does not contain players then assume tournamnt has not started
					{
						str=str+"<table width='600' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;'>"
                        str=str+"<tr>"
                        str=str+"<td class='group-header'>Performance details will be available once the tournament starts</td>"
                        str=str+"</tr>"
                        str=str+"</table>"
					}
					
					else
					{
						for(var i=0;i<typeNode.length;i++)
						{	
						var pid=typeNode[i].firstChild.childNodes[0].nodeValue;
						var titleNode=typeNode[i].firstChild.nextSibling;
						str=str+"<table width='600' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;'>"
                        str=str+"<tr id='"+pid+"' onclick='showClub(this.id);' style='cursor:pointer'>"
                        str=str+"<td class='group-header'><div class='arrow' id='div"+pid+"'></div>"+titleNode.childNodes[0].nodeValue+"</td>"
                        str=str+"</tr>"
                        str=str+"</table>"
                        
						 
                        switch(pid)
                        {
                        	case "1":
	                        	str=str+"<table width='600' id='table"+pid+"' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;display:none' >"						
								str=str+"<tr height='24' bgcolor='#000000'>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>Rank</td>"
		                        str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Player</td>"
		                        str=str+"<td width='120' style='font-weight: normal; color:#FFff00;'>Team</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>M</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>I</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Runs</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Best</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>50&#39;s</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>100&#39;s</td>"
								
		                        str=str+"</tr>"
		                        
		                        var isOddRow=true
		                        
		                        var playersNode=typeNode[i].getElementsByTagName("player")
		                        var p=0;
		                        for(var j=0;j<playersNode.length;j++)
		                        {
		                        	p=p+1;
									var color=""
									if(isOddRow)
									{
										color="style='background-color:#292929;'"
									}
									
									str=str+"<tr height='20' "+ color+">"
									str=str+"<td style='border:1px solid #000;' >&nbsp;"+p+"</td>"
									str=str+"<td style='border:1px solid #000;' >&nbsp;"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;' >&nbsp;"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;' >&nbsp;"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;' >&nbsp;"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;' >&nbsp;"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;' >&nbsp;"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;' >&nbsp;"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;' >&nbsp;"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table><br/>";
		                        
		                        
		                     break;
		                     
		                     case "2":
	                        	str=str+"<table width='600' id='table"+pid+"' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;text-color:#ffffff;display:none'>"						
								str=str+"<tr height='24' bgcolor='#000000'>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>Rank</td>"
		                        str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Player</td>"
		                        str=str+"<td width='120' style='font-weight: normal; color:#FFff00;'>Team</td>"
		                        str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>M</td>"
		                        str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>I</td>"
		                        
								str=str+"<td width='45' style='font-weight: normal; color:#FFff00;'>Runs</td>"
		                        str=str+"<td width='45' style='font-weight: normal; color:#FFff00;'>BF</td>"
		                        str=str+"<td width='45' style='font-weight: normal; color:#FFff00;'>SR</td>"
								str=str+"<td width='45' style='font-weight: normal; color:#FFff00;'>Best</td>"
								
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>50&#39;s</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>100&#39;s</td>"
		                        str=str+"</tr>"
		                        
		                        var isOddRow=true
		                        
		                        var playersNode=typeNode[i].getElementsByTagName("player")
		                        var p=0;
		                        for(var j=0;j<playersNode.length;j++)
		                        {
		                        	p=p+1;
									var color=""
									if(isOddRow)
									{
										color="style='background-color:#292929;'"
									}
									
									str=str+"<tr height='20' "+ color+">"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+p+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[9].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[10].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table><br/>";
		                        
		                        
		                     break;
		                     
		                     case "3":
							 						 
	                        	str=str+"<table width='600' id='table"+pid+"' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;display:none'>"						
								str=str+"<tr height='24' bgcolor='#000000'>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>Rank</td>"
		                        str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Player</td>"
		                        str=str+"<td width='120' style='font-weight: normal; color:#FFff00;'>Team</td>"
		                        str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>M</td>"
		                        str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>I</td>"
		                        str=str+"<td width='45' style='font-weight: normal; color:#FFff00;'>NO</td>"
		                        str=str+"<td width='45' style='font-weight: normal; color:#FFff00;'>Runs</td>"
								str=str+"<td width='45' style='font-weight: normal; color:#FFff00;'>Avg.</td>"
								str=str+"<td width='45' style='font-weight: normal; color:#FFff00;'>Best</td>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>50&#39;s</td>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>100&#39;s</td>"
								
		                        str=str+"</tr>"
		                        
		                        var isOddRow=true
		                        
		                        var playersNode=typeNode[i].getElementsByTagName("player")
		                        var p=0;
		                        for(var j=0;j<playersNode.length;j++)
		                        {
		                        	p=p+1;
									var color=""
									if(isOddRow)
									{
										color="style='background-color:#292929;'"
									}
									
									str=str+"<tr height='20' "+ color+">"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+p+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									if(playersNode[j].childNodes[7].childNodes.length>0)
									{
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									}
									else
									{
									str=str+"<td style='border:1px solid #000;'>&nbsp;-</td>"
									}
									
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[9].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[10].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table><br/>";
		                        
		                        
		                     break;
		                     
		                     case "4":
							 
															
	                        	str=str+"<table width='600' id='table"+pid+"' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;display:none'>"						
								str=str+"<tr height='24' bgcolor='#000000'>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>Rank</td>"
		                        str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Player</td>"
		                        str=str+"<td width='120' style='font-weight: normal; color:#FFff00;'>Team</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>M</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>O</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Runs</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>W</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>5 W</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Best</td>"
		                        str=str+"</tr>"
		                        
		                        var isOddRow=true
		                        
		                        var playersNode=typeNode[i].getElementsByTagName("player")
		                        var p=0;
		                        for(var j=0;j<playersNode.length;j++)
		                        {
		                        	p=p+1;
									var color=""
									if(isOddRow)
									{
										color="style='background-color:#292929;'"
									}
									
									str=str+"<tr height='20' "+ color+">"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+p+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+convertBallsToOvers(playersNode[j].childNodes[4].childNodes[0].nodeValue)+"</td>"
									
									
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table><br/>";
		                        
		                        
		                     break;
		                     
		                      case "5":
							 
								
	                        	str=str+"<table width='600' id='table"+pid+"' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;display:none'>"						
								str=str+"<tr height='24' bgcolor='#000000'>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>Rank</td>"
		                        str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Player</td>"
		                        str=str+"<td width='120' style='font-weight: normal; color:#FFff00;'>Team</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>M</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>O</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Runs</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>W</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Econ.</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>5 W</td>"
								str=str+"</tr>"
		                        
		                        var isOddRow=true
		                        
		                        var playersNode=typeNode[i].getElementsByTagName("player")
		                        var p=0;
		                        for(var j=0;j<playersNode.length;j++)
		                        {
		                        	p=p+1;
									var color=""
									if(isOddRow)
									{
										color="style='background-color:#292929;'"
									}
									
									str=str+"<tr height='20' "+ color+">"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+p+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+convertBallsToOvers(playersNode[j].childNodes[4].childNodes[0].nodeValue)+"</td>"
									
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table><br/>";
		                        
		                        
		                     break;
		                     
		                     case "6":
							 
							 
	                        	str=str+"<table width='600' id='table"+pid+"' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;display:none'>"						
								str=str+"<tr height='24' bgcolor='#000000'>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>Rank</td>"
		                        str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Player</td>"
		                        str=str+"<td width='120' style='font-weight: normal; color:#FFff00;'>Team</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>M</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>O</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Runs</td>"		
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>W</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Avg.</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>5 W</td>"
		                        str=str+"</tr>"
		                        
		                        var isOddRow=true
		                        
		                        var playersNode=typeNode[i].getElementsByTagName("player")
		                        var p=0;
		                        for(var j=0;j<playersNode.length;j++)
		                        {
		                        	p=p+1;
									var color=""
									if(isOddRow)
									{
										color="style='background-color:#292929;'"
									}
									
									str=str+"<tr height='20' "+ color+">"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+p+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+convertBallsToOvers(playersNode[j].childNodes[4].childNodes[0].nodeValue)+"</td>"
									
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table><br/>";
		                        
		                        
		                     break;
							 
							 case "7":
							 
							 
	                        	str=str+"<table width='600' id='table"+pid+"' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;display:none'>"						
								str=str+"<tr height='24' bgcolor='#000000'>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>Rank</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Date</td>"
		                        str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Player</td>"
		                        str=str+"<td width='200' style='font-weight: normal; color:#FFff00;'>Teams</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Runs</td>"
		                        str=str+"<td width='120' style='font-weight: normal; color:#FFff00;'>Playing For</td>"
		                        
		                        str=str+"</tr>"
		                        
		                        var isOddRow=true
		                        
		                        var playersNode=typeNode[i].getElementsByTagName("player")
		                        var p=0;
		                        for(var j=0;j<playersNode.length;j++)
		                        {
		                        	p=p+1;
									var color=""
									if(isOddRow)
									{
										color="style='background-color:#292929;'"
									}
									
									str=str+"<tr height='20' "+ color+">"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+p+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[3].childNodes[0].nodeValue+" Vs. "+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
			
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table><br/>";
		                        
		                        
		                     break;
							 
							 case "8":
							 
							 
	                        	str=str+"<table width='600' id='table"+pid+"' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;display:none'>"						
								str=str+"<tr height='24' bgcolor='#000000'>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>Rank</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Date</td>"
		                        str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Player</td>"
		                        str=str+"<td width='250' style='font-weight: normal; color:#FFff00;'>Teams</td>"
		                        str=str+"<td width='120' style='font-weight: normal; color:#FFff00;'>Playing For</td>"
		                        
		                        str=str+"</tr>"
		                        
		                        var isOddRow=true
		                        
		                        var playersNode=typeNode[i].getElementsByTagName("player")
		                        var p=0;
		                        for(var j=0;j<playersNode.length;j++)
		                        {
		                        	p=p+1;
									var color=""
									if(isOddRow)
									{
										color="style='background-color:#292929;'"
									}
									
									str=str+"<tr height='20' "+ color+">"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+p+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[3].childNodes[0].nodeValue+" Vs. "+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
			
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									
									
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table><br/>";
		                        
		                        
		                     break;
							 
							 case "9":
							 
							 
	                        	str=str+"<table width='600' id='table"+pid+"' border='0' cellspacing='0' cellpadding='0' align='center' style='text-align:Center;display:none'>"						
								str=str+"<tr height='24' bgcolor='#000000'>"
								str=str+"<td width='30' style='font-weight: normal; color:#FFff00;'>Rank</td>"
								str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Player</td>"
		                        str=str+"<td width='150' style='font-weight: normal; color:#FFff00;'>Team</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Match</td>"
		                        str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>Innings</td>"
								str=str+"<td width='50' style='font-weight: normal; color:#FFff00;'>6s</td>"
								str=str+"<td width='120' style='font-weight: normal; color:#FFff00;'>Runs</td>"
		                        
		                        str=str+"</tr>"
		                        
		                        var isOddRow=true
		                        
		                        var playersNode=typeNode[i].getElementsByTagName("player")
		                        var p=0;
		                        for(var j=0;j<playersNode.length;j++)
		                        {
		                        	p=p+1;
									var color=""
									if(isOddRow)
									{
										color="style='background-color:#292929;'"
									}
									
									str=str+"<tr height='20' "+ color+">"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+p+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td style='border:1px solid #000;'>&nbsp;"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									
									
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table><br/>";
		                        
		                        
		                     break;
                        	
                        }
						
					}
					}
					
				}
				
				//document.getElementById("topindex").style.display="none";
				document.getElementById("toparea3").innerHTML=str;
				$.unblockUI();
				strperformance=str;
				
			}
		}
		objRequest.send('tid='+id);
	}
}

