﻿// JScript File

// Script per la visualizzazione del menu
function SetVisible(objActive, objLi)
{
    if (document.getElementById)
    {
        var objLiOld;
        var objLiActive;
        
        if (GlobalLi != "")
        {   
            objLiOld = document.getElementById(GlobalLi);
            objLiActive = document.getElementById(objLi);

            objLiOld.className = "";
            objLiActive.className = "S";
        }
        
        var objA;

        if (GlobalMn != "")
        {
            objA = document.getElementById(GlobalMn);
            if (objA != null)
            {
                objA.style.display = "none";
            }
        }
        
        objA = document.getElementById(objActive);
        if (objA != null)
        {
            objA.style.display = "block";
        }

        GlobalMn = objActive;
        GlobalLi = objLi;
    }
}

// Imposta la voce di menu di defaul.
function SetClass(ulS, liS)
{
    var objLi;
    var objUl;
    
    objLi = document.getElementById(liS);

    if (objLi != null)
    {
        objLi.className = "S";
    }
    
    objUl = document.getElementById(ulS);
    
    if (objUl != null)
    {
        objUl.style.display = "block";
    }
}

// Script per la visualizzazioen del controllo Classifica-Risultati
function VisibleBox(objActive, objDisable)
{
    if (document.getElementById)
    {
        var objAct = document.getElementById(objActive)
        objAct.style.display = "block"
        
        var objDis = document.getElementById(objDisable)
        objDis.style.display = "none"
    }
}

// Script per apertura popUp zoom Immagine
function OpenWindow(theURL, winName, features) 
{
    window.open(theURL, winName, features);
}

function popUp(URL)
{
    window.open(URL, "", 'toolbar=0, scrollbars=0, location=0, statusbar=0, menubar=0, resizable=0, width=500, height=300, left = 162, top = 80');
}