function aprifoto(img)
{
	window.open("/gallery.aspx?img=" + img,"DettaglioImmagine","width=740,height=540,menubar=no,scrollbars=yes,resizable=yes");
}

function Invio()
{
	theForm = document.getElementById("modulo");
	ObbliF = "";
	
	for (i=0; i<theForm.length; i++)
		{ 
			ele = theForm.elements[i];
			
			if ((ele.alt=="Y") && (ele.value=="" || ele.value.length==0))
			{	
				NomeCampo = replaceChars(ele.name, "campo_", "")
				NomeCampo = replaceChars(NomeCampo, "_", " ")
				ObbliF = ObbliF + "  - " + NomeCampo + "\n";
			}
		}

	if (ObbliF.length > 0) 
		{
			alert ("I seguenti campi sono obbligatori:\n" + ObbliF);
			return false;
		}
	
	return true;
}

function setimg (obj, nomeimg)
{ obj.src = nomeimg;  }

function imgopa (immag)
{	// objIm = document.getElementById(immag); 
	immag.className="imgLinkOpa";
}
function imgnorm (immag)
{	// objIm = document.getElementById(immag); 
	immag.className="imgLink";
}


function overin (obj)
{ imgname = obj.src.substr (0, obj.src.length - 4);
  imgext = obj.src.substr (obj.src.length - 4, 4);
  imgname = imgname + '-HO' + imgext;
  obj.src = imgname;  }
  
function overout (obj)
{ imgname = obj.src.substr (0, obj.src.length - 7);
  imgext = obj.src.substr (obj.src.length - 4, 4);
  imgname = imgname + imgext;
  obj.src = imgname; }
