﻿function mnon(id) {
    var idsidemenu = id;
    document.getElementById(idsidemenu).style.cursor = "pointer";
    document.getElementById(idsidemenu).style.backgroundPosition = "0 32px";
    if (idsidemenu == "mn17") {
        document.getElementById("mn18").style.backgroundPosition = "0 32px";
    }
    if (idsidemenu == "mn18") {
        document.getElementById("mn17").style.backgroundPosition = "0 32px";
    }
}

function mnoff(id) {
    var idsidemenu = id;
    document.getElementById(idsidemenu).style.cursor = "pointer";
    document.getElementById(idsidemenu).style.backgroundPosition = "0 0px";
    if (idsidemenu == "mn17") {
        document.getElementById("mn18").style.backgroundPosition = "0 0px";
    }
    if (idsidemenu == "mn18") {
        document.getElementById("mn17").style.backgroundPosition = "0 0px";
    }
}

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 = "prodotti.aspx";
    }
    else if (idsidemenu == "mn14") {
        window.location.href = "approfondimenti.aspx";
    }
    else if (idsidemenu == "mn15") {
        window.location.href = "normativa.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 == "mn16") {
        window.location.href = "contattaci.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 = "gare.aspx";
    }
    else if (idsidemenu == "mn25b") {
        window.open('http://www.facebook.com/pages/Bancamatica/137403686291319', '_blank');
    }
}
function gohome() {
    window.location.href = "index.aspx";
}

function logodown() {
    window.open('logoantifurto2.rar', '_blank');
}

function abbonati() {
    window.open('antifurto.rtf', '_blank');
}
function apribanner(link, id) {
    window.open("bannerstat.aspx?link=" + link + "&idb=" + id, "_blank");
}
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 printSelection(node) {

    var content = node.innerHTML
    var pwin = window.open('', 'print_content', 'width=400,height=600');

    pwin.document.open();
    pwin.document.write('<html><body onload="window.print()">' + content + '</body></html>');
    pwin.document.close();

    setTimeout(function () { pwin.close(); }, 1000);

}

