function parseTableInfo(tree)
{
    var TYPE_HOLDEM = "100";
    var TYPE_OMAHA = "102";
    var TYPE_OMAHAHL = "104";
    var TYPE_7STUD = "106";
    var TYPE_7STUDHL = "108";
    var game = null;
    var objectElement = null;
    var totalData = null;
    var totalPlayers = "";
    var totalTables  = "";
    var isValidData = true;
    
    objectElement = tree.getElementsByTagName("PI")[0];
    if(objectElement!=null)
    {
        game = objectElement.getElementsByTagName("g");
        totalData = objectElement.getElementsByTagName("a")[0];
    }
    var nTexas = "";
    var nOmaha = "";
    var nOmahaHL = "";
    var n7Cards = "";
    var n7CardsHL = "";
    if(game!=null)
    {
        for(i=0;i<game.length;i++)
        {

            if(game[i].getAttribute("n")==TYPE_HOLDEM)
                nTexas = game[i].getAttribute("p");
            if(game[i].getAttribute("n")==TYPE_OMAHA)
                nOmaha = game[i].getAttribute("p");
            if(game[i].getAttribute("n")==TYPE_OMAHAHL)
                nOmahaHL = game[i].getAttribute("p");
            if(game[i].getAttribute("n") == TYPE_7STUD)
                n7Cards = game[i].getAttribute("p");
            if(game[i].getAttribute("n") == TYPE_7STUDHL)
                n7CardsHL = game[i].getAttribute("p");
        }
        
        totalPlayers = totalData.getAttribute("p");
        totalTables = totalData.getAttribute("t");

    }
    else
    {
        isValidData=false;
    }
    
    if(isValidData)
    {
        document.getElementById("total").innerHTML = "&nbsp;<a class='r14b' href='javascript:Download(\"1582\");'>"+playersCount+"<span style='color:#00fd01; font-weight:bold'>" + totalPlayers + "</span>"+totalPlayerst+"<span style='color:#00fd01; font-weight:bold'>" + totalTables + "</span>" +totalTablest+"</a>&nbsp;";
/*
        if(nTexas==null) nTexas="0";
            document.getElementById("texas").innerHTML = "<b>" + nTexas + "</b><br>players";
        if(nOmaha==null)nOmaha="0";
            document.getElementById("omaha").innerHTML = "<b>" + nOmaha + "</b><br>players";
        if(nOmahaHL==null)nOmahaHL="0";
            document.getElementById("omahaHL").innerHTML = "<b>" + nOmahaHL + "</b><br>players";
        if(n7Cards==null)n7Cards="0";
            document.getElementById("cards").innerHTML = "<b>" + n7Cards + "</b><br>players";
        if(n7CardsHL==null)n7CardsHL="0";
            document.getElementById("cardsHL").innerHTML = "<b>" + n7CardsHL + "</b><br>players";
*/
    }
}
var DDSPEED = 10;
var DDTIMER = 15;

// main function to handle the mouse events //
function ddMenu(id,d){
  var h = document.getElementById(id + '-ddheader');
  var c = document.getElementById(id + '-ddcontent');
  clearInterval(c.timer);
  if(d == 1){
    clearTimeout(h.timer);
    if(c.maxh && c.maxh <= c.offsetHeight){return}
    else if(!c.maxh){
      c.style.display = 'block';
      c.style.height = 'auto';
      c.maxh = c.offsetHeight;
      c.style.height = '0px';
    }
    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
  }else{
    h.timer = setTimeout(function(){ddCollapse(c)},50);
  }
}

// collapse the menu //
function ddCollapse(c){
  c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
}

// cancel the collapse if a user rolls over the dropdown //
function cancelHide(id){
  var h = document.getElementById(id + '-ddheader');
  var c = document.getElementById(id + '-ddcontent');
  clearTimeout(h.timer);
  clearInterval(c.timer);
  if(c.offsetHeight < c.maxh){
    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
  }
}

// incrementally expand/contract the dropdown and change the opacity //
function ddSlide(c,d){
  var currh = c.offsetHeight;
  var dist;
  if(d == 1){
    dist = (Math.round((c.maxh - currh) / DDSPEED));
  }else{
    dist = (Math.round(currh / DDSPEED));
  }
  if(dist <= 1 && d == 1){
    dist = 1;
  }
  c.style.height = currh + (dist * d) + 'px';
  c.style.opacity = currh / c.maxh;
  c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
  if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){
    clearInterval(c.timer);
  }
}
