 function PopupCentrata(URL,w,h) {
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2); 
   var stili = "top=" + t + ", left=" + l + ", width=" + w + ", height=" + h + ", status=no, menubar=no, toolbar=no scrollbar=no";
   var testo = window.open("", "", stili);

      testo.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
      testo.document.write("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n");
      testo.document.write("<head>\n");
      testo.document.write("<title>:::::: by Design ::::::</title>\n");
      testo.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n");	  
      testo.document.write("</head>\n");
      testo.document.write("<body style=\"padding:0px; margin:0px;\">\n");
      testo.document.write("<script type=\"text/javascript\">\n");      
      testo.document.write("if(document.all)\n");      
      testo.document.write("document.body.onmousedown=new Function(\"if (event.button==2||event.button==3)alert('Spiacenti, il tasto destro del mouse è disabilitato')\")\n");	  
      testo.document.write("</script>\n");	  	  	  
      testo.document.write("<img src=" + URL + " border=\"0\" alt=\"\" />\n");
      testo.document.write("</body>\n");
      testo.document.write("</html>");
 }




function ControllaForm2() {
var controllo=false; 
if (document.form2.username.value == "")
{
controllo=true;
alert("Inserire il proprio username");
document.form2.username.style.background="#ffffaa";
document.form2.username.focus();
}
else if (document.form2.password.value == "")
{
controllo=true;
alert("Inserire la password");
document.form2.password.style.background="#ffffaa";
document.form2.password.focus();
}
if (controllo){return false}else{return true} 
}




function dis() {
if(document.getElementById) document.getElementById("Pub1").style.visibility = "hidden";
}




var offsetx = 12;
var offsety = -6;

function newelement(newid,w)
{ 
    if(document.createElement)
    { 
        var el = document.createElement('div'); 
        el.id = newid;     
        with(el.style)
        { 
            display = 'none';
            position = 'absolute';
        } 
        el.innerHTML = '&nbsp;'; 
        document.body.appendChild(el); 
    } 
} 
var ie5 = (document.getElementById && document.all); 
var ns6 = (document.getElementById && !document.all); 
var ua = navigator.userAgent.toLowerCase();
var isapple = (ua.indexOf('applewebkit') != -1 ? 1 : 0);
function getmouseposition(e)
{
    if(document.getElementById)
    {
        var iebody=(document.compatMode && 
        document.compatMode != 'BackCompat') ? 
        document.documentElement : document.body;
        pagex = (isapple == 1 ? 0:(ie5)?iebody.scrollLeft:window.pageXOffset);
        pagey = (isapple == 1 ? 0:(ie5)?iebody.scrollTop:window.pageYOffset);
        mousex = (ie5)?event.x:(ns6)?clientX = e.clientX:false;
        mousey = (ie5)?event.y:(ns6)?clientY = e.clientY:false;

        var lixlpixel_tooltip = document.getElementById('tooltip');
        lixlpixel_tooltip.style.left = (mousex+pagex+offsetx) + 'px';
        lixlpixel_tooltip.style.top = (mousey+pagey+offsety) + 'px';
    }
}

function tooltip(tip)
{
    if(!document.getElementById('tooltip')) newelement('tooltip');
    var lixlpixel_tooltip = document.getElementById('tooltip');
    lixlpixel_tooltip.innerHTML = tip;
    lixlpixel_tooltip.style.display = 'block';
    document.onmousemove = getmouseposition;
}

function exit()
{
    document.getElementById('tooltip').style.display = 'none';
}

