function cambia(elem, come) {
	if(come == 1) {
		elem.style.fontWeight = 'bolder';
		elem.style.color = 'orange';
		elem.style.cursor = 'hand';
	}
	else {
		elem.style.fontWeight = 'bold';
		elem.style.color = '#3D5C8D';
		elem.style.cursor = 'pointer';
	}
}

function cambia2(elem, come) {
	if(come == 1) {
		elem.style.fontWeight = 'bold';
		elem.style.color = 'orange';
		elem.style.cursor = 'hand';
	}
	else {
		elem.style.fontWeight = 'normal';
		elem.style.color = '#3D5C8D';
		elem.style.cursor = 'pointer';
	}
}

function cambia3(elem, come) {
	if(come == 1) {
		elem.style.fontWeight = 'bold';
		elem.style.color = 'orange';
		elem.style.cursor = 'hand';
	}
	else {
		elem.style.fontWeight = 'bold';
		elem.style.color = '#3D5C8D';
		elem.style.cursor = 'pointer';
	}
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_findObj(n, d) { //v4.01
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//Roll over image

var index_img = 0;

function Swap_BgImg(index1) 
{
	Swap_BgImg(index1, "images");
}

function Swap_BgImg(index1, prefix) 
{
    var img = document.images.namedItem(index1);
    if( (index_img + 1) > 15) index_img = -1;
    switch(++index_img) 
    {
        case 0 : img.src = prefix + "/index_bg_img10.jpg"; break;
		case 1 : img.src = prefix + "/index_bg_img0.jpg"; break;
        case 2 : img.src = prefix + "/index_bg_img17.jpg"; break;
        case 3 : img.src = prefix + "/index_bg_img12.jpg"; break;
        case 4 : img.src = prefix + "/index_bg_img2.jpg"; break;
        case 5 : img.src = prefix + "/index_bg_img13.jpg"; break;
        case 6 : img.src = prefix + "/index_bg_img14.jpg"; break;
        case 7 : img.src = prefix + "/index_bg_img15.jpg"; break;
        case 8 : img.src = prefix + "/index_bg_img16.jpg"; break;
        case 9 : img.src = prefix + "/index_bg_img3.jpg"; break;
		case 10 : img.src = prefix + "/index_bg_img11.jpg"; break;
		case 11 : img.src = prefix + "/index_bg_img4.jpg"; break;
		case 12 : img.src = prefix + "/index_bg_img5.jpg"; break;
		case 13 : img.src = prefix + "/index_bg_img6.jpg"; break;
		case 14 : img.src = prefix + "/index_bg_img8.jpg"; break;
		case 15 : img.src = prefix + "/index_bg_img9.jpg"; break;
    }
}

//galleria fotografica
//var ie=document.all
//var ns=document.layers
//var ns6=document.getElementById&&!document.all

function enlarge(which,e) 
{ 
	/*
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById(which).style.visibility = 'visible'; 	
	} 
	*/
	
	theImgWin = window.open(which,'image','height=630,width=800,toolbar=no,directories=no,status=no,' + 'menubar=no,scrollbars=yes,resizable=yes');
	theImgWin.focus();
} 

/*
function enlarge(which,e) {
if (ie||ns6) {
	crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage;
	if (crossobj.style.display=="none")
	{
		crossobj.style.top=window.screenTop;
		crossobj.style.left=window.screenLeft + window.screen.width/2 - 400;
		crossobj.innerHTML='<div align=right id=drag style=\'background-color=black\'><SPAN STYLE="cursor:hand; background-color:black"><font face="verdana" color="#3D5C8D" size="3"><b onMouseOver="cambia(this,1)" onMouseOut="cambia(this,0)" onClick=closepreview()>Chiudi</b></font></span></div><img class=\'fotos\' src="'+which+'">';
		crossobj.style.display="block";
		
	}
	else
		crossobj.style.display="none";
		return false;
	}
else if (document.layers){
if (document.showimage.display=="none"){
document.showimage.document.write('<a href="#" onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
document.showimage.document.close()
document.showimage.left=e.x
document.showimage.top=e.y
document.showimage.display="block"
}
else
document.showimage.display="none"
return false
}
else
return true
}
*/
function closepreview(){
crossobj.style.display="none"
}
//fine galleria fotografica