	function start_slideshow(start_frame, end_frame, delay) {
    	setTimeout(switch_slides(start_frame,start_frame,end_frame, delay), delay);
	}

function switch_slides(frame, start_frame, end_frame, delay) {
    return (function() {
        Effect.Fade('slideshow' + frame);
        if (frame == end_frame) { frame = start_frame; } else { frame = frame + 1; }
        setTimeout("Effect.Appear('slideshow" + frame + "');", 850);
        setTimeout(switch_slides(frame, start_frame, end_frame, delay), delay + 850);
    })
}
 


function toggleLayer(whichLayer)
{
    if (document.getElementById)
    {
    // this is the way the standards work
    var style2 = document.getElementById(whichLayer).style;
    style2.display = (style2.display == "block") ? "none":"block";
    }
    else if (document.all)
    {
    // this is the way old msie versions work
    var style2 = document.all[whichLayer].style;
    style2.display = (style2.display == "block") ? "none":"block";
    }
    else if (document.layers)
    {
    // this is the way nn4 works
    var style2 = document.layers[whichLayer].style;
    style2.display = (style2.display == "block") ? "none":"block";
    }
}

function expandLayers(layerName,totalLayers)
{
    for(i=1; i <= totalLayers; i++)
    {
        var whichLayer = layerName+i
		if (document.getElementById(whichLayer) != null) 
		{		
			var style2 = document.getElementById(whichLayer).style;
			style2.display = (style2.display == "block") ? "none":"block";
		}
    }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function enableTooltip(whichLayer, backImage)
{
	if (document.getElementById)
    {
    // this is the way the standards work
    var styleT = document.getElementById(whichLayer).style;
	var imageT = "http://www.vogliadisalute.it/img/" + backImage;
	styleT.background = "url(" + imageT + ") right no-repeat";
    }
    else if (document.all)
    {
    // this is the way old msie versions work
    var styleT = document.all[whichLayer].style;
    var imageT = "http://www.vogliadisalute.it/img/" + backImage;
	styleT.background = "url(" + imageT + ") right no-repeat";
    }
    else if (document.layers)
    {
    // this is the way nn4 works
    var styleT = document.layers[whichLayer].style;
    var imageT = "http://www.vogliadisalute.it/img/" + backImage;
	styleT.background = "url(" + imageT + ") right no-repeat";
    }
}