function showContent(div,link) {

        var http = createRequestObject();
        if( http )
        {
            http.open('GET', link);
            http.onreadystatechange = function ()
            {
                if(http.readyState == 4)
                {
                    var xml_otv = http.responseXML;
                    var time_node = xml_otv.getElementsByTagName('time'+div).item(0);
                    var stavok_node = xml_otv.getElementsByTagName('stavok'+div).item(0);
                    var pobed_node = xml_otv.getElementsByTagName('pobed'+div).item(0);
                    var bold_node = xml_otv.getElementsByTagName('bold'+div).item(0);

                    document.getElementById('vid'+div).innerHTML = time_node.firstChild.data;
                    document.getElementById('st'+div).innerHTML = stavok_node.firstChild.data;
                    document.getElementById('lider'+div).innerHTML = pobed_node.firstChild.data;

                    if(bold_node.firstChild.data == '0'){
                      document.getElementById('lider'+div).style.color = "#FF4500";

                    }else{
                      document.getElementById('lider'+div).style.color = "#1B9C2B";

                    }


                }
            }
            http.send(null);
        }
    }

function ErrorNO(diver){
  document.getElementById('error'+diver).innerHTML = "";

}

function Error(divin,linki) {
        var http = createRequestObject();
        if( http )
        {
            http.open('GET', linki);
            http.onreadystatechange = function ()
            {
                if(http.readyState == 4)
                {
                    document.getElementById('error'+divin).innerHTML = http.responseText;

                    setTimeout('ErrorNO('+divin+')',3000);

                }
            }
            http.send(null);
        }

    }


function showOnline(div,link) {
        var http = createRequestObject();
        if( http )
        {
            http.open('GET', link);
            http.onreadystatechange = function ()
            {
                if(http.readyState == 4)
                {
                    document.getElementById(div).innerHTML = http.responseText;

                }
            }
            http.send(null);
        }

    }

function createRequestObject()
    {
        try { return new XMLHttpRequest() }
        catch(e)
        {
            try { return new ActiveXObject('Msxml2.XMLHTTP') }
            catch(e)
            {
                try { return new ActiveXObject('Microsoft.XMLHTTP') }
                catch(e) { return null; }
            }
        }
    }

