            //Begin dHTML Toolltip Timer
            var tipTimer;
            //End dHTML Toolltip Timer

            function MM_goToURL() { //v3.0
                var i, args = MM_goToURL.arguments; document.MM_returnValue = false;
                for (i = 0; i < (args.length - 1); i += 2) eval(args[i] + ".location='" + args[i + 1] + "'");
            }

            function MM_openBrWindow(theURL, winName, features) { //v2.0
                window.open(theURL, winName, features);
            }

            function locateObject(n, d) { //v3.0
                var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
                    d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
                }
                if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
                for (i = 0; !x && d.layers && i < d.layers.length; i++) x = locateObject(n, d.layers[i].document); return x;
            }

            function hideTooltip(object) {
                if (document.all) {
                    locateObject(object).style.visibility = "hidden"
                    locateObject(object).style.left = 1;
                    locateObject(object).style.top = 1;
                    return false
                }
                else if (document.layers) {
                    locateObject(object).visibility = "hide"
                    locateObject(object).left = 1;
                    locateObject(object).top = 1;
                    return false
                }
                else
                    return true
            }


            function showTooltip(object, e, tipContent, backcolor, bordercolor, textcolor, displaytime) {
                window.clearTimeout(tipTimer)

                if (document.all) {
                    locateObject(object).style.top = document.body.scrollTop + event.clientY + 20

                    locateObject(object).innerHTML = '<table style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; border: ' + bordercolor + '; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: ' + backcolor + '" width="10" border="0" cellspacing="1" cellpadding="1"><tr><td nowrap><font style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: ' + textcolor + '">' + unescape(tipContent) + '</font></td></tr></table> '

                    if ((e.x + locateObject(object).clientWidth) > (document.body.clientWidth + document.body.scrollLeft)) {
                        locateObject(object).style.left = (document.body.clientWidth + document.body.scrollLeft) - locateObject(object).clientWidth - 10;
                    }
                    else {
                        locateObject(object).style.left = document.body.scrollLeft + event.clientX
                    }
                    locateObject(object).style.visibility = "visible"
                    tipTimer = window.setTimeout("hideTooltip('" + object + "')", displaytime);
                    return true;
                }
                else if (document.layers) {
                    locateObject(object).document.write('<table width="10" border="0" cellspacing="1" cellpadding="1"><tr bgcolor="' + bordercolor + '"><td><table width="10" border="0" cellspacing="0" cellpadding="2"><tr bgcolor="' + backcolor + '"><td nowrap><font style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: ' + textcolor + '">' + unescape(tipContent) + '</font></td></tr></table></td></tr></table>')
                    locateObject(object).document.close()
                    locateObject(object).top = e.y + 20

                    if ((e.x + locateObject(object).clip.width) > (window.pageXOffset + window.innerWidth)) {
                        locateObject(object).left = window.innerWidth - locateObject(object).clip.width - 10;
                    }
                    else {
                        locateObject(object).left = e.x;
                    }
                    locateObject(object).visibility = "show"
                    tipTimer = window.setTimeout("hideTooltip('" + object + "')", displaytime);
                    return true;
                }
                else {
                    return true;
                }
            }

            function ahah(url, target) {
                document.getElementById(target).innerHTML = ' Fetching data...';
                if (window.XMLHttpRequest) {
                    req = new XMLHttpRequest();
                } else if (window.ActiveXObject) {
                    req = new ActiveXObject("Microsoft.XMLHTTP");
                }
                if (req != undefined) {
                    req.onreadystatechange = function() { ahahDone(url, target); };
                    req.open("GET", url, true);
                    req.send("");
                }
            }

            function ahahDone(url, target) {
                if (req.readyState == 4) { // only if req is "loaded"
                    if (req.status == 200) { // only if "OK"
                        //alert(req.responseText);
                        document.getElementById(target).innerHTML = req.responseText;
                    } else {
                        document.getElementById(target).innerHTML = " AHAH Error:\n" + req.status + "\n" + req.statusText;
                    }
                }
            }

            function load(name, div) {
                ahah(name, div);
                return false;
            }

function AttentFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}


/***********************************************
* DHTML Billboard script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//List of transitional effects to be randomly applied to billboard:
var billboardeffects = ["GradientWipe(GradientSize=1.0 Duration=0.7)", "Inset", "Iris", "Pixelate(MaxSquare=5 enabled=false)", "RadialWipe", "RandomBars", "Slide(slideStyle='push')", "Spiral", "Stretch", "Strips", "Wheel", "ZigZag"]

//var billboardeffects=["Iris"] //Uncomment this line and input one of the effects above (ie: "Iris") for single effect.

var tickspeed = 2000 //ticker speed in miliseconds (2000=2 seconds)
var effectduration = 500 //Transitional effect duration in miliseconds
var hidecontent_from_legacy = 1 //Should content be hidden in legacy browsers- IE4/NS4 (0=no, 1=yes).

var filterid = Math.floor(Math.random() * billboardeffects.length)

document.write('<style type="text/css">\n')
if (document.getElementById)
    document.write('.billcontent{display:none;\n' + 'filter:progid:DXImageTransform.Microsoft.' + billboardeffects[filterid] + '}\n')
else if (hidecontent_from_legacy)
    document.write('#contentwrapper{display:none;}')
document.write('</style>\n')

var selectedDiv = 0
var totalDivs = 0

function contractboard() {
    var inc = 0
    while (document.getElementById("billboard" + inc)) {
        document.getElementById("billboard" + inc).style.display = "none"
        inc++
    }
}

function expandboard() {
    var selectedDivObj = document.getElementById("billboard" + selectedDiv)
    contractboard()
    if (selectedDivObj.filters) {
        if (billboardeffects.length > 1) {
            filterid = Math.floor(Math.random() * billboardeffects.length)
            selectedDivObj.style.filter = "progid:DXImageTransform.Microsoft." + billboardeffects[filterid]
        }
        selectedDivObj.filters[0].duration = effectduration / 1000
        selectedDivObj.filters[0].Apply()
    }
    selectedDivObj.style.display = "block"
    if (selectedDivObj.filters)
        selectedDivObj.filters[0].Play()
    selectedDiv = (selectedDiv < totalDivs - 1) ? selectedDiv + 1 : 0
    setTimeout("expandboard()", tickspeed)
}

function startbill() {
    if (document.getElementById("billboard0") != null) {
        while (document.getElementById("billboard" + totalDivs) != null)
            totalDivs++
        if (document.getElementById("billboard0").filters)
            tickspeed += effectduration
        expandboard()
    }

}


