﻿
$(function() {
    // lightbox
    $('a[rel^="lightbox"]').lightBox();
});
visibile = 1;

function load() {
}

function GUnload() {
}

function StartTimerLayer() {
}

function ShowPage2(numero, id) {

    try {
        document.getElementById("pager_" + id + "_" + visibile).style.color = "#797979";
    }
    catch (e) { }

    try {
        //contenuto nuovo
        temp = eval("listaContenuti_" + id + "[" + (numero - 1) + "]").replace(/''/g, '"');
        //alert(temp);
        document.getElementById(id).innerHTML = temp;
        document.getElementById("pager_" + id + "_" + numero).style.color = "#24b9b3";
    }
    catch (e) { }

    visibile = numero;
}

//script per la vignetta
function showhint(e, hint) {
    var evtobj = window.event ? window.event : e;
    //hint non deve contenere '  ,usare il carattere ^
    //per le " usare il carattere \"

    document.getElementById("hint_div").style.display = "block";

    var scrollY = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
    var scrollX = (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);

    document.getElementById("hint_div").style.top = evtobj.clientY + scrollY - 34 + "px";
    document.getElementById("hint_div").style.left = evtobj.clientX + scrollX - 34 + "px";

    document.getElementById("hint_div_text").innerHTML = "<nobr>" + hint.replace(/"^"/g, "'") + "</nobr>";
}

function hidehint() {
    document.getElementById("hint_div").style.display = "none";
    document.getElementById("hint_div_text").innerHTML = "";
}

function loadmenu() {
    var menu = document.getElementById('menu_centrale')
    var lis = menu.getElementsByTagName('li')

    for (var i = 0; i < lis.length; i++) {
        lis.item(i).onmouseover = function() {
            this.className = this.className + ' li_hover'
        }
        lis.item(i).onmouseout = function() {
            this.className = this.className.replace(" li_hover", "");
        }
    }
}
