﻿////------------------------------------------------------ expansion menu

function menufunc(menuId)
{
    if (document.getElementById(menuId).style.display == "none")
    {
        invokeMenuService(menuId, "open");
        document.getElementById(menuId).style.display = "block";
    }
    else
    {
        invokeMenuService(menuId, "closed");
        document.getElementById(menuId).style.display = "none";
    }
}

////----------------------------------------------------PopUp 

var popupcontactsRef = null;

function PopUpContacts()
{   
    if (popupcontactsRef!=null && !popupcontactsRef.closed)
        popupcontactsRef.focus();
    else
    {
        popupcontactsRef = window.open("Contacts.aspx","","left=350,top=100,width=540,height=490,status=no,titlebar=no,menubar=no");
        if (popupcontactsRef == null)
            alert("Disabilita il blocco Pop Up");
        else
            popupcontactsRef.focus();
    }
}

var popupLoginFormRef = null;

function PopUpLoginForm()
{   
    if (popupLoginFormRef!=null && !popupLoginFormRef.closed)
        popupLoginFormRef.focus();
    else
    {
        popupLoginFormRef = window.open("Login.aspx","","left=350,top=100,width=275,height=173,status=no,titlebar=no,menubar=no");
        if (popupLoginFormRef == null)
            alert("Disabilita il blocco Pop Up");
        else
            popupLoginFormRef.focus();
    }
}

var popuprespoRef = null;

function PopUpRespo()
{   
    if (popuprespoRef!=null && !popuprespoRef.closed)
        popuprespoRef.focus();
    else
    {
        popuprespoRef = window.open("responsabilita.htm","","left=360,top=150,width=650,height=500,status=no,titlebar=no,menubar=no");
        if (popuprespoRef == null)
            alert("Disabilita il blocco Pop Up");
        else
            popuprespoRef.focus();
    }
}

