// JavaScript Document

var xmlhttp;
function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

function countTabs(a){;var b=document.getElementById(a);var myCount=0;for(var i=0;i<=b.childNodes.length-1;i++){;if (b.childNodes[i].nodeType != 3){myCount++;};};return myCount;};
function loadXMLDoc(url)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged()
{
if (xmlhttp.readyState==4)
  {
  if (xmlhttp.status==200|xmlhttp.status==0)
    {
    document.getElementById('t1').innerHTML=xmlhttp.responseText;
    }
  else
    {
    alert("Problem retrieving XML data:" + xmlhttp.statusText);
    }
  }
}

function tabload(x,url){
document.getElementById('t1').innerHTML='<img src="http://www.europeanpokertour.com/images/tabload.gif" id="tabload"/>';
var tabamount = countTabs('tabnav');
for(i=1;i<=tabamount;i++){
document.getElementById('b'+i).style.marginTop = (i==x?'0px':'4px');
var c=document.getElementById('b'+i).getElementsByTagName('div');
if (i==x) {
 for(var g=0;g<c.length;g++){
	 c[g].style.backgroundPosition = "0px -20px";
	 c[g].style.height = "21px";
	 }
} else {
  for(var g=0;g<c.length;g++){
	  c[g].style.backgroundPosition = "0px 0px";
	  c[g].style.height = "17px";
	  }
}
}
loadXMLDoc(url);
}