var elmMain  = null;
var elmMaint = null;

Tload[TCounts] = "activ";
TCounts ++;

function show(w)
{
        if (elmMain == null) return;
        var elm = document.getElementById('name' + w);
        var elmt = document.getElementById('f' + w);
        if (elm == null) return;
        if (elmt == null) return;
        elmMain.className = 'dHide';
        elm.className = 'dShow';
        elmMain = elm;
        elmMaint.offsetParent;
        elmMaint.style.backgroundColor = "#ff0000";
        
        ActiveLinks(w);
}


function ActiveLinks(w)
{
        var elmE = document.getElementById('England_Link');
        var elmC = document.getElementById('Anglie_Link');

        elmE.href = ClearL(elmE.href) + "#f" + w;
        elmC.href = ClearL(elmC.href) + "#f" + w;
}

function ClearL(l)
{
        var w = l.indexOf("#");
        if (w == -1) return l;
        else
        return l.substr(0, w);
}

function next(w)
{
        if (elmMain == null) return;
        w++;
        show(w);
}

function previous(w)
{
        if (elmMain == null) return;
        w--;
        show(w);
}

function activ()
{
        if (InitJavaScript == true)
        {
                var elmI = document.getElementById('Init');
                elmI.className = 'dHide';
        }
        else return;
        var n = GetPID();
        elmMain  = document.getElementById('name' + n);
        elmMaint = document.getElementById('f' + n);
        show(n);
}


function GetPID()
{
        var str = location.href;
        var arrItems = str.split("#");
        for (var i=1; i<arrItems.length; i++)
        {
                var n = parseInt(arrItems[i].substr(1, 6));
                if (isNaN(n)) return 0; else return n;
        }
        return 0;
}



