function initFadeIn(who){
// fade in logo dafault.asp tutti i browsers
    var margin = (window.innerHeight - 500) / 2; 
    $('intro').style.paddingTop = margin + 'px';
    who.style.opacity = 0;
    who.style.visibility = 'visible';
    fadeInitimageIn(who, 0);
}

function fadeInitimageIn(who, op){
// fade in logo dafault.asp tutti i browsers
    if(op < 100){
        op += 5;
        who.style.opacity = op / 100;
        setTimeout(function(){fadeInitimageIn(who, op);}, 50);
    }else document.forms[0].style.visibility = 'visible';
}    

//---------------------------------------------------------- funzioni di 'PRESS'
function getImage(n, elm){
    var img_coll = $('press_menu').getElementsByTagName('img');
    $('press_image').setAttribute('src', 'images/press/image' + n + '.png');

    for(i = 0; i < img_coll.length; i++){
        if(img_coll[i].parentNode == elm){
            img_coll[i].style.width = '155px';
            img_coll[i].style.height = '26px';
            img_coll[i].parentNode.setAttribute('style','font-size: 1.1em;');
        }else{
            img_coll[i].style.width = '147px';
            img_coll[i].style.height = '25px';
            img_coll[i].parentNode.removeAttribute('style');
        }
    }
}


function _mouseover(who){
    who.setAttribute('src','images/press/bgButtOvr.png');
}

function showBg(who){
    who.style.opacity = 0;
    who.setAttribute('src','images/press/bgButt.png');
    fadein(who, 0);
}

function getParentEvent(e){
    return e.target.parentNode;
}

function fadein(who, op){
    if(op < 10){
        op ++;
        who.style.opacity = op / 10;
        setTimeout((function(who, op){return function(){fadein(who, op);};})(who, op), 50);
    }
}
