/******************************************************************************************
Apri popUp
-------------------------------------------------------------------------------------------
pagename: nome della popUp
page: percorso pagina da aprire
params: settaggio popUp:
                                              scrollbars=yes,
                                             toolbar=no,
                                             location=no,
                                             directories=no,
                                             status=no,
                                             menubar=no,
                                             resizable=no,
                                             top=50,
                                             left=50,
                                             width=750,
                                             height=425
--------------------------------------------------------------------*/
function openWindow(pagename, page, params) {
    //var LeftPosition = (screen.width) ? (screen.width-500)/2 : 0;
    //var TopPosition = (screen.height) ? (screen.height-350)/2 : 0;
    var r;
    r = window.open(pagename, page, params);
    r.focus();
    return false;
}

//**************************************************************************************************************
//          DISABILITA  TASTO DESTRO del mouse
//**************************************************************************************************************
var messageRightClick="";

function clickIE() 
{
    if (document.all) 
    {
        (messageRightClick);
        return false;
     }
}
function clickNS(e) 
{
    if (document.layers||(document.getElementById&&!document.all)) 
    {
        if (e.which==2||e.which==3) 
        {
            (messageRightClick);return false;
        }
    }
}
if (document.layers) 
{
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS;
}
else
{
    document.onmouseup=clickNS;
    document.oncontextmenu=clickIE;
}

document.oncontextmenu=new Function("return false");

//**************************************************************************************************************
//          DISABILITA  Tasto invio da tastiera
//**************************************************************************************************************

document.onkeydown = checkKeycode
function checkKeycode(e) {
    var keycode;
    if (window.event) keycode = window.event.keyCode;
    else if (e) keycode = e.which;
        if(keycode==13){
            return false;
        }
}

