var nTotalPlayers = "0";
	var nTotalTables = "0";
	var nTexas = "0";
	var nOmaha = "0";
	var nOmahaHL = "0";
	var n7Cards = "0";
	var n7CardsHL = "0";

	var alreadyUp = false;
	var xml = new ActiveXObject("Microsoft.XMLDOM");
	xml.async = false;

	function GetData()
	{
        var host = window.location.host;
        xml.load("http://" + host + "/PokerInfo?f=0");
	    var nGames = null;

	    if(null != xml.documentElement)
	    {
			nGames = xml.documentElement.getAttribute("r");
	    }

	    if(nGames != null)
	    {
			doParse();
			return true;
		}
		return false;
	}

                
	function doParse()
	{
		var TYPE_HOLDEM = "100";
		var TYPE_OMAHA = "102";
		var TYPE_OMAHAHL = "104";
		var TYPE_7STUD = "106";
		var TYPE_7STUDHL = "108";

            if(null != xml.documentElement)
	    {
                var tree = xml.documentElement;
                if(tree.hasChildNodes())
                {
                    for(var i=0; i<tree.childNodes.length; i++)
                    {
                            var child = tree.childNodes(i);

                            if(child.nodeName == "g")
                            {
                                    if(child.getAttribute("n") == TYPE_HOLDEM){nTexas = child.getAttribute("p");}
                                    else if(child.getAttribute("n") == TYPE_OMAHA){nOmaha = child.getAttribute("p");}
                                    else if(child.getAttribute("n") == TYPE_OMAHAHL){nOmahaHL = child.getAttribute("p");}
                                    else if(child.getAttribute("n") == TYPE_7STUD){n7Cards = child.getAttribute("p");}
                                    else if(child.getAttribute("n") == TYPE_7STUDHL){n7CardsHL = child.getAttribute("p");}
                            }
                            else if(child.nodeName == "a")
                            {
                                    if(null != child.getAttribute("p")){nTotalPlayers = child.getAttribute("p");}
                                    if(null != child.getAttribute("t")){nTotalTables = child.getAttribute("t");}
                            }
		    }
		}
	    }
	}

        function OpenInfo(sLang)
	{
            var w = 405;
	    var h = 252;
	    var LocationString;
	    var l = (window.screen.width-w)/2 - 12;
	    var t = (window.screen.height-h-85);
	    var windowprops = "location=no,status=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
            var filename = "../pokerinfo.htm" + "?lang=" + sLang;
	    var pokerinfo = window.open(filename,"PokerInfo",windowprops);
	}
    
        function OpenInfoPokerShowoff(sLang)
	{
            var w = 405;
	    var h = 252;
	    var LocationString;
	    var l = (window.screen.width-w)/2 - 12;
	    var t = (window.screen.height-h-155);
	    var windowprops = "location=no,status=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
            var filename = "/pokerinfo.htm" + "?lang=" + sLang;
	    var pokerinfo = window.open(filename,"PokerInfo",windowprops);
	}