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)
{
	

	$.blockUI({ message: '<img src=image/loader.gif></img>',css: { backgroundColor: '#000000', 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="";
					str=str+"<table align='center' width='99%' border='0' cellspacing='0' cellpadding='5' style='color:#ffffff; border:1px solid #596166; margin-top:15px; margin-bottom:7px'><tr height='25' style='background:url(images/heading_grey.gif);font-weight:bold;color:#d7fe01'><td>&nbsp;&nbsp;"+fromsession+" - "+tosession+" > "+document.getElementById("txttournament").value+"</td></tr>";
					
					var typeNode=performanceNode.getElementsByTagName("type");
					
					for(var i=0;i<typeNode.length;i++)
					{	
						var pid=typeNode[i].firstChild.childNodes[0].nodeValue;
						var titleNode=typeNode[i].firstChild.nextSibling;
						
						str=str+"<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0' style='margin-top:1px; text-align:center; background:url(images/heading_blue.gif);color:#FFFFFF; font-size:12px; font-weight:bold'><tr id='"+pid+"' onclick='showClub(this.id);'  style='cursor:pointer' height='25'><td><div class='arrow1' id='div"+pid+"'></div>&nbsp;&nbsp;"+titleNode.childNodes[0].nodeValue+"<div class='arrow2' id='div1"+pid+"'></div></td></tr></table>";

                        switch(pid)
                        {
                        	case "1":
							str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style=' border:1px solid #596166;text-align:center; display:none; color:#ffffff; font-size:11px; font-family:arial; margin:0'>"		
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='250' class='style3'>Player</td>"
		                        str=str+"<td width='160' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>I</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"
		                        str=str+"<td width='35' class='style3'>Best</td>"
								str=str+"<td width='40' class='style3'>50&#39;s</td>"
								str=str+"<td width='40' class='style3'>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:#596166;'"
										color="style='background-color:#323232;'";
									}
									
									str=str+"<tr height='25' "+color+">"
									str=str+"<td>"+p+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td><strong>"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</strong></td>"
									str=str+"<td>"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
		                     
		                     case "2":
	                        	str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style=' border:1px solid #596166;text-align:center; display:none; color:#ffffff;font-size:11px;font-family:arial;margin:0'>"	
									
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='40' class='style3'>Rank</td>"
		                        str=str+"<td width='200' class='style3'>Player</td>"
		                        str=str+"<td width='145' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>I</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"
		                        str=str+"<td width='40' class='style3'>BF</td>"
		                        str=str+"<td width='35' class='style3'>SR</td>"
								str=str+"<td width='35' class='style3'>Best</td>"
								str=str+"<td width='30' class='style3'>50&#39;s</td>"
								str=str+"<td width='35' class='style3'>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:#596166;'"
										color="style='background-color:#323232;'";
									}
									
									str=str+"<tr height='25' "+color+">"
									str=str+"<td>"+p+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td><strong>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</strong></td>"
									str=str+"<td>"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[9].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[10].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
		                     
		                     case "3":
							 						 
	                        	str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style=' border:1px solid #596166;text-align:center; display:none; color:#ffffff;font-size:11px;font-family:arial'>"	
									
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='200' class='style3'>Player</td>"
		                        str=str+"<td width='150' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>I</td>"
		                        str=str+"<td width='40' class='style3'>NO</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"
								str=str+"<td width='35' class='style3'>Avg.</td>"
								str=str+"<td width='35' class='style3'>Best</td>"
								str=str+"<td width='30' class='style3'>50&#39;s</td>"
								str=str+"<td width='35' class='style3'>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:#323232;'";
										//color="";
									}
									
									str=str+"<tr height='25' "+color+">"
									str=str+"<td>"+p+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									if(playersNode[j].childNodes[7].childNodes.length>0)
									{
									str=str+"<td><strong>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</strong></td>"
									}
									else
									{
									str=str+"<td>&nbsp;<strong>-</strong></td>"
									}
									
									str=str+"<td>"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[9].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[10].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        

		                     break;
		                     
		                     case "4":
							 
															
	                        	str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style='border:1px solid #596166; text-align:center; display:none; color:#ffffff;font-size:11px;font-family:arial'>"	
									
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='250' class='style3'>Player</td>"
		                        str=str+"<td width='160' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>O</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"
								str=str+"<td width='35' class='style3'>W</td>"
								str=str+"<td width='40' class='style3'>5 W</td>"
								str=str+"<td width='40' class='style3'>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:#596166;'"
										color="style='background-color:#323232;'"
									}
									
									str=str+"<tr height='25' "+color+">"
									str=str+"<td>"+p+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+convertBallsToOvers(playersNode[j].childNodes[4].childNodes[0].nodeValue)+"</td>"					
									str=str+"<td>"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td><strong>"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</strong></td>"
									str=str+"<td>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
		                     
		                      case "5":
							 
								
	                        	str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style='border:1px solid #596166; text-align:center; display:none; color:#ffffff;font-size:11px;font-family:arial'>"	
									
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='250' class='style3'>Player</td>"
		                        str=str+"<td width='160' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>O</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"
		                        str=str+"<td width='35' class='style3'>W</td>"
								str=str+"<td width='40' class='style3'>Econ.</td>"
								str=str+"<td width='40' class='style3'>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:#323232;'"
									}
									
									str=str+"<tr height='25' "+color+">"
									str=str+"<td>"+p+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+convertBallsToOvers(playersNode[j].childNodes[4].childNodes[0].nodeValue)+"</td>"
									
									str=str+"<td>"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td><strong>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</strong></td>"
									str=str+"<td>"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
		                     
		                     case "6":
							 
							 
	                        	str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style='border:1px solid #596166; text-align:center; display:none; color:#ffffff;font-size:11px;font-family:arial'>"	
									
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='250' class='style3'>Player</td>"
		                        str=str+"<td width='160' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>O</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"		
								str=str+"<td width='35' class='style3'>W</td>"
								str=str+"<td width='40' class='style3'>Avg.</td>"
								str=str+"<td width='40' class='style3'>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:#323232;'"
										//color="";
									}
									
									str=str+"<tr height='30' "+color+">"
									str=str+"<td>&nbsp;"+p+"</td>"
									str=str+"<td >"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td >"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td >"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									
									str=str+"<td >"+convertBallsToOvers(playersNode[j].childNodes[4].childNodes[0].nodeValue)+"</td>"
									
									str=str+"<td >"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td >"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td ><strong>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</strong></td>"
									str=str+"<td >"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
							 
							 case "7":
							 
															
	                        	str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style='border:1px solid #596166; text-align:center; display:none; color:#ffffff;font-size:11px;font-family:arial'>"	
									
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='250' class='style3'>Player</td>"
		                        str=str+"<td width='160' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>O</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"
								str=str+"<td width='35' class='style3'>W</td>"
								str=str+"<td width='40' class='style3'>5 W</td>"
								str=str+"<td width='40' class='style3'>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:#596166;'"
										color="style='background-color:#323232;'"
									}
									
									str=str+"<tr height='25' "+color+">"
									str=str+"<td>"+p+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+convertBallsToOvers(playersNode[j].childNodes[4].childNodes[0].nodeValue)+"</td>"					
									str=str+"<td>"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td><strong>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</strong></td>"
									str=str+"<td>"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
							 
							 case "8":
							str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style=' border:1px solid #596166;text-align:center; display:none; color:#ffffff; font-size:11px; font-family:arial; margin:0'>"		
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='250' class='style3'>Player</td>"
		                        str=str+"<td width='160' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>I</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"
		                        str=str+"<td width='35' class='style3'>Best</td>"
								str=str+"<td width='40' class='style3'>50&#39;s</td>"
								str=str+"<td width='40' class='style3'>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:#596166;'"
										color="style='background-color:#323232;'";
									}
									
									str=str+"<tr height='25' "+color+">"
									str=str+"<td>"+p+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td><strong>"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</strong></td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
							 
							 case "9":
							 
							 
	                        	str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style='border:1px solid #596166; text-align:center; display:none; color:#ffffff;font-size:11px;font-family:arial'>"	
									
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='250' class='style3'>Player</td>"
		                        str=str+"<td width='160' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>O</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"		
								str=str+"<td width='35' class='style3'>W</td>"
								str=str+"<td width='40' class='style3'>Hat.</td>"
								str=str+"<td width='40' class='style3'>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:#323232;'"
										//color="";
									}
									
									str=str+"<tr height='30' "+color+">"
									str=str+"<td>&nbsp;"+p+"</td>"
									str=str+"<td >"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td >"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td >"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									
									str=str+"<td >"+convertBallsToOvers(playersNode[j].childNodes[4].childNodes[0].nodeValue)+"</td>"
									
									str=str+"<td >"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td >"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</td>"
									str=str+"<td ><strong>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</strong></td>"
									str=str+"<td >"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
							 
							 case "10":
							str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style=' border:1px solid #596166;text-align:center; display:none; color:#ffffff; font-size:11px; font-family:arial; margin:0'>"		
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='250' class='style3'>Player</td>"
		                        str=str+"<td width='160' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>I</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"
		                        str=str+"<td width='35' class='style3'>6&#39;s</td>"
								str=str+"<td width='40' class='style3'>50&#39;s</td>"
								str=str+"<td width='40' class='style3'>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:#596166;'"
										color="style='background-color:#323232;'";
									}
									
									str=str+"<tr height='25' "+color+">"
									str=str+"<td>"+p+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td><strong>"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</strong></td>"
									str=str+"<td>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
							 
							 case "11":
							str=str+"<table width='100%' id='table"+pid+"' border='0' cellspacing='1' cellpadding='0' style=' border:1px solid #596166;text-align:center; display:none; color:#ffffff; font-size:11px; font-family:arial; margin:0'>"		
								str=str+"<tr height='25' style='background:url(images/heading_grey.gif)'>"
								str=str+"<td width='35' class='style3'>Rank</td>"
		                        str=str+"<td width='250' class='style3'>Player</td>"
		                        str=str+"<td width='160' class='style3'>Team</td>"
		                        str=str+"<td width='35' class='style3'>M</td>"
		                        str=str+"<td width='35' class='style3'>I</td>"
		                        str=str+"<td width='40' class='style3'>Runs</td>"
		                        str=str+"<td width='35' class='style3'>4&#39;s</td>"
								str=str+"<td width='40' class='style3'>50&#39;s</td>"
								str=str+"<td width='40' class='style3'>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:#596166;'"
										color="style='background-color:#323232;'";
									}
									
									str=str+"<tr height='25' "+color+">"
									str=str+"<td>"+p+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[1].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[2].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[3].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[4].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[5].childNodes[0].nodeValue+"</td>"
									str=str+"<td><strong>"+playersNode[j].childNodes[6].childNodes[0].nodeValue+"</strong></td>"
									str=str+"<td>"+playersNode[j].childNodes[7].childNodes[0].nodeValue+"</td>"
									str=str+"<td>"+playersNode[j].childNodes[8].childNodes[0].nodeValue+"</td>"
									str=str+"</tr>"
									isOddRow=!isOddRow
		                        }
		                        str=str+"</table>";
		                        
		                        
		                     break;
                        	
                        }
						
					}
				}
				
				document.getElementById("toparea2").style.display="none";
				document.getElementById("toparea2").innerHTML="";
				document.getElementById("toparea4").innerHTML=str;
				
				$.unblockUI();
				strperformance=str;
				str=str+"</td></tr></table>"
				
			}
		}
		objRequest.send('tid='+id);
	}
}

