function opCt(theURL,winName,winWidth,winHeight,features) {
  var w = (screen.width - winWidth)/2;
  var h = (screen.height - winHeight)/2 - 60;
  features = features+',width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
  window.open(theURL,winName,features);
}

function refresh()
{
    window.location.replace( sURL );
}

function refresh()
{
    window.location.reload( false );
}

function submitform(nomeform)
{
  var form = document.getElementById(nomeform);
  form.submit();
}

function zoom() {
	imanew = document.getElementById('imgo').innerHTML;
//		alert(imanew);
//		window.open(imanew);
	opCt(imanew,'popfoto','530','530');
}

function zoom2(nomediv) {
	var supediv = document.getElementById(nomediv);
	var imanew = supediv.innerHTML;
	opCt(imanew,'popfoto','530','530');
}

function zoomfoto(foto) {
	opCt(foto,'popfoto','530','530');
}

function bordizza(indicef,massimo)
{
	for (i=0; i<=massimo; i++)
	{
		document.getElementById("foto_th"+i).style.borderColor="#fff";
	}
	document.getElementById("foto_th"+indicef).style.borderColor="#676767";
}

function nascondi_vedi_id(mioid)
{
	elemento=document.getElementById(mioid);
	stato=elemento.style.display;
	nuovostato="";
	if(stato=="none")
	{
		nuovostato="block";
	}
	else
	{
		nuovostato="none";
	}
	elemento.style.display=nuovostato;
}