﻿function popupok(mylink, windowname, popuplink, ok) {
    if (ok == 'false' || ok == 'False')
        alert('L\’indirizzo e-mail inserito risulta già registrato nell’elenco degli iscritti alla Newsletter,\n clicca su OK per proseguire e scaricare il modulo di richiesta IDENTIKIT');
    popup(mylink, windowname, popuplink);
}

function popup(mylink, windowname, popuplink) {
    if (!window.focus)
        return true;

    var href;
    if (typeof (mylink) == 'string')
        href = mylink;
    else
        href = mylink.href;

    var oWin = window.open(href, windowname, 'width=800,height=600,scrollbars=yes,resizable=yes');
    if (oWin == null || typeof (oWin) == "undefined") {
        var link = document.getElementById(popuplink)
        if (link != null && typeof (link) != "undefined") {
            link.style.display = "block";
        }
    }
    return false;
}
