﻿function mnon(id) {
    var idsidemenu = id;
    document.getElementById(idsidemenu).style.cursor = "pointer";
    document.getElementById(idsidemenu).style.backgroundPosition = "0 32px";
    if (idsidemenu == "mn16")
    {
    showhiddenmenu(idsidemenu);
    }
}

function mnoff(id) {
    var idsidemenu = id;
    document.getElementById(idsidemenu).style.cursor = "pointer";
    document.getElementById(idsidemenu).style.backgroundPosition = "0 0px";
    if (idsidemenu == "mn16")
    {
    hidehiddenmenu();
    }
}

function mnon2(id) {
    var idsidemenu = id;
    document.getElementById(idsidemenu).style.cursor = "pointer";
    document.getElementById(idsidemenu).style.backgroundPosition = "0 24px";
    if (idsidemenu == "mn26")
    {
    showhiddenmenu(idsidemenu);
    }
}

function mnoff2(id) {
    var idsidemenu = id;
    document.getElementById(idsidemenu).style.cursor = "pointer";
    document.getElementById(idsidemenu).style.backgroundPosition = "0 0px";
    if (idsidemenu == "mn26")
    {
    hidehiddenmenu(idsidemenu);
    }
}

function mngo(id) {
    var idsidemenu = id;
    if (idsidemenu == "mn12") {
        window.location.href = "attualita.aspx";
    }
    else if (idsidemenu == "mn19") {
        window.location.href = "index.aspx";
    }
    else if (idsidemenu == "mn13") {
        window.location.href = "ppiano.aspx";
    }
    else if (idsidemenu == "mn14") {
        window.location.href = "approfondimenti.aspx";
    }
    else if (idsidemenu == "mn15") {
        window.location.href = "eventi.aspx";
    }
    else if (idsidemenu == "mn17") {
        window.location.href = "contattaci.aspx";
    }
    else if (idsidemenu == "mn22") {
        window.location.href = "rivista.aspx";
    }
    else if (idsidemenu == "mn23") {
        window.location.href = "newsletter.aspx";
    }
    else if (idsidemenu == "mn24") {
        window.location.href = "digitalbooks.aspx";
    }
    else if (idsidemenu == "mn25") {
        window.location.href = "video.aspx";
    }
    else if (idsidemenu == "mn26") {
        window.location.href = "conferenza.aspx";
    }
}
function showhidden() {
    document.getElementById('mnhide').style.display = "block";
}
function hidehidden() {
    document.getElementById('mnhide').style.display = "none";
}
function showhiddenmenu(id) {
    if (id == "mn16") {
        document.getElementById('mnhide').style.display = "block";
        document.getElementById('mnhide').style.marginLeft = "536px";
    }
    if (id == "mn26") {
        document.getElementById('mnhide2').style.display = "block";
        document.getElementById('mnhide2').style.marginLeft = "400px";
    }
}
function hidehiddenmenu() {
    document.getElementById('mnhide').style.display = "none";
    document.getElementById('mnhide2').style.display = "none";
}
function cb(id) {
    mnon("mn16");
    document.getElementById('mnhide').style.visibility = "visible";
    document.getElementById('mnhide').style.cursor = 'pointer';
    if (id == "mo1") {
    document.getElementById('mo1').style.backgroundPosition = "0 -31px";
    }
    if (id == "mo2") {
    document.getElementById('mo2').style.backgroundPosition = "0 -31px";
    }
}
function cbclick(id) {
    if (id == "mo1") {
        window.location.href = "aziende.aspx";
    }
    if (id == "mo2") {
        window.location.href = "prodotti.aspx";
    }
}
function cboff(id) {
    mnoff("mn16");
    document.getElementById('mnhide').style.visibility = "visible";
    document.getElementById('mnhide').style.cursor = 'pointer';
    if (id == "mo1") {
    document.getElementById('mo1').style.backgroundPosition = "0 0";
    }
    if (id == "mo2") {
    document.getElementById('mo2').style.backgroundPosition = "0 0";
    }
}
function cb2(id) {
    mnon2("mn26");
    document.getElementById('mnhide2').style.visibility = "visible";
    document.getElementById('mnhide2').style.cursor = 'pointer';
    if (id == "mo3") {
    document.getElementById('mo3').style.backgroundPosition = "0 -23px";
    }
    if (id == "mo4") {
    document.getElementById('mo4').style.backgroundPosition = "0 -23px";
    }
    if (id == "mo5") {
    document.getElementById('mo5').style.backgroundPosition = "0 -23px";
    }
    if (id == "mo6") {
    document.getElementById('mo6').style.backgroundPosition = "0 -23px";
    }
    if (id == "mo7") {
    document.getElementById('mo7').style.backgroundPosition = "0 -23px";
    }
    if (id == "mo8") {
        document.getElementById('mo8').style.backgroundPosition = "0 -23px";
    }
}
function cb2click(id) {
    if (id == "mo3") {
        window.open('http://www.insic.it/eventi/CARDS2009/index.htm', '_blank');
    }
    if (id == "mo4") {
        window.open('http://www.insic.it/eventi/CARDS2008/index.htm', '_blank');
    }
    if (id == "mo5") {
        window.location.href = "index.aspx";
    }
    if (id == "mo6") {
        window.location.href = "index.aspx";
    }
    if (id == "mo7") {
        window.open('http://www.insic.it/cards/', '_blank');
    }
    if (id == "mo8") {
        window.location.href = "http://www.bancamatica.it/eventi.aspx?id=73029";
    }
}
function cb2off(id) {
    mnoff("mn26");
    document.getElementById('mnhide2').style.visibility = "visible";
    document.getElementById('mnhide2').style.cursor = 'pointer';
    if (id == "mo3") {
    document.getElementById('mo3').style.backgroundPosition = "0 0";
    }
    if (id == "mo4") {
    document.getElementById('mo4').style.backgroundPosition = "0 0";
    }
    if (id == "mo5") {
    document.getElementById('mo5').style.backgroundPosition = "0 0";
    }
    if (id == "mo6") {
    document.getElementById('mo6').style.backgroundPosition = "0 0";
    }
    if (id == "mo7") {
    document.getElementById('mo7').style.backgroundPosition = "0 0";
    }
    if (id == "mo8") {
        document.getElementById('mo8').style.backgroundPosition = "0 0";
    }
}
function logodown() 
{
            window.open('attach/logobanca.zip', '_blank');
}

function abbonati() 
{
            window.open('attach/bancamatica.rtf', '_blank');
}
function accedirivista() 
{
            window.open("http://www.epc.it/ArchivioRivisteOnline.aspx?id=03", "_blank");
}
function gobn(link)
{
    window.open(link, '_blank');
}
function apribanner(link,id) {
    window.open("bannerstat.aspx?link=" + link + "&idb=" + id, "_blank");
}
function gohome() {
        window.location.href = "index.aspx";
}
function validareg() {
    if (document.getElementById('ctl00_ContentPlaceHolder1_check1').checked == true) {
        return true;
    }
    else 
    {
        alert("Per registrarti devi accettare il trattamento dei tuoi dati secondo il decreto sulla Privacy");
        return false;
    }
    return false;
}
function ric()
{
    var cioccio = document.getElementById("TextBox1").value;
    window.location.href = "ricerca.aspx?t=" + cioccio;
}
function checkKey(){
alert(event.keyCode);
if(event.keyCode==13){ric()}}
