﻿// File JScript www.bonellialessandro.it
/*
function fadeObj (obj) {
    var varObj = obj.id;
    var value=0;
    var speed=25;
    var str='';
    alert(obj.id);
    this.fadeMe = function() {
       
       for (var i=0;i<11;i++) {
            value=i;
            str='\n'+'form1.'+varObj+'.style.opacity = '+value+'/10;\n';
            str = str +'form1.'+varObj+'.style.filter = \'alpha(opacity=\' + '+value+'*10 + \')\';\n';
            setTimeout('{'+str+'}',speed*i);
        }
        return false;
    }    
}
*/
function Init() {
     icon1 = new fadeObj2('ico1');  
     icon2 = new fadeObj2('ico2');
     icon3 = new fadeObj2('ico3');
     icon4 = new fadeObj2('ico4'); 
}

function fadeObj2 (obj) {
    var varObj = obj;
    var value=0;
    var speed=25;
    var str='';
    this.fadeMe = function() {
       
       for (var i=0;i<11;i++) {
            value=i;
            str='\n'+'form1.'+varObj+'.style.opacity = '+value+'/10;\n';
            str = str +'form1.'+varObj+'.style.filter = \'alpha(opacity=\' + '+value+'*10 + \')\';\n';
            setTimeout('{'+str+'}',speed*i);
        }
        return false;
    }    
}

function popup(img) {
    // Copyright 2008 - Gabriele Pagani
    // funziona con IE 7 e con Firefox 2
    if(document.getElementById(img).style.display == 'block') {
        document.getElementById(img).style.display = 'none';  
    } else {
        document.getElementById(img).style.display = 'block';
        //   popup centrato nella pagina
        var x= (document.body.clientWidth-document.getElementById(img).width)/2+10;
        var y = 130;
        document.getElementById(img).style.left = x +'px'; 
        document.getElementById(img).style.top = y +'px';      
    }   
}

