<!--

function getCookie (nome)
{
    if (document.cookie.length > 0)
    {
        var inizio = document.cookie.indexOf (nome + '=');
        if (inizio != -1)
        {
            inizio += nome.length + 1;

            var fine = document.cookie.indexOf (';', inizio);
            if (fine == -1) fine = document.cookie.length;

            return unescape (document.cookie.substring (inizio, fine));
        }
    }

    return null;
}

function setCookie (nome, valore, vita_gg, path)
{
    var biscotto = nome + '=' + escape (valore);

    if (vita_gg != null)
    {
        var data_morte = new Date ();
        data_morte.setTime (data_morte.getTime () + (vita_gg * 24 * 3600 * 1000));
        biscotto += '; expires=' + data_morte.toGMTString ();
    }

    if (path != null) biscotto += '; path='+ path;

    document.cookie = biscotto;
}

function removeCookie (nome)
{
    if (getCookie (nome)) setCookie (nome, '', -1);
}

// -->
