/* -----------------------------------------------
   (c) 2011 www.studenti.it
  ------------------------------------------------ */

x = 50;
y = 50;
function setVisible(obj)
{
    obj = document.getElementById(obj);
    obj.style.display = (obj.style.display == 'block') ? 'none' : 'block';
}
function placeIt(sz_obj)
{
    obj = document.getElementById(sz_obj);
    if (!obj) {
      //alert('oggetto false ' + sz_obj);
      return;
    }
    if (document.documentElement)
    {
        theLeft = document.documentElement.scrollLeft;
        theTop = document.documentElement.scrollTop;
    }
    else if (document.body)
    {
        theLeft = document.body.scrollLeft;
        theTop = document.body.scrollTop;
    }
    theLeft += x;
    theTop += y;
    obj.style.left = theLeft + '%' ;
    obj.style.top = theTop + '%' ;
    setTimeout("placeIt('popup-login')",500);
}
window.onscroll = setTimeout("placeIt('popup-login')",500);

/*---*/

x = 0;
y = 0;
function setVisible(obj)
{
  //alert('dentro la funzione ' + obj);
    obj = document.getElementById(obj);
    if (!obj) {
        //alert('obj ' + obj);
        return;
    }
    //alert('era ' + obj.style.display);
    if (obj.style.display == 'block') {
      obj.setAttribute('style', 'display: \'none\' ');
      obj.style.display = 'none';
    } else {
      obj.setAttribute('style', 'display: \'block\' ');
      obj.style.display = 'block';      
    }
    //alert('diventa ' + obj2.style.display);
    // obj2.style.display = (obj2.style.display == 'block') ? 'none' : 'block';
}

window.onscroll = setTimeout("placeIt('popup-login-darkening')",500);



