function VediFoto (nFoto, nNotizia) {
  var newW;
 
  newW=window.open('browse.asp?id='+nFoto+'&IDN='+nNotizia,'galleria','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,screenX=150,screenY=200,width=616,height=446'); 
	newW.focus();
}

function VediNota (nNotizia) {
  var newWN;
 
  newWN=window.open('notizie.asp?id='+nNotizia,'notizia','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=no,width=408,height=580'); 
	newWN.focus();
}

function finestra (img,w,h,txt) {
  alert("qui");
	var Fin;

	Fin=open('','','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+w+',height='+(h+30)); 
	Fin.document.open(); 
  Fin.document.write("<HTML><HEAD><title>Dettaglio foto</title></HEAD>"); 
  Fin.document.write("<body leftmargin='0' topmargin='0' rightmargin='0' bottommargin='0' marginwidth='0'>"); 
  Fin.document.write("<table width='"+w+"' border='0' cellspacing='0' cellpadding='0'><tr><td width='100%' bgcolor='#FFFFFF'><img border='0' src='" +img+"'></td></tr>"); 
  Fin.document.write ("<tr><td width='100%' height='35' bgcolor='#000000' style='font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: White;'>&nbsp;&nbsp;"+txt+"</td></tr>");
	Fin.document.write("</table></BODY></HTML>"); 
	Fin.document.close(); 
	Fin.focus();
}

function aprifin (cUrl, w, h) {
	if (w==undefined) {w=450}
	if (h==undefined) {h=580}
	
  newWN=window.open(cUrl,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=no,width='+w+',height='+h);
	newWN.focus();
}

function PopUp (cUrl, w, h, lBar, lResize) {
  var newPU;
 
  newPU=window.open(cUrl,'PopUp','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+lBar+',resizable='+lResize+',width='+w+',height='+h); 
	newPU.focus();
}

function Skinf (nPag) {
  var newWNV;

  newWNV=window.open(nPag,'Scheda','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=423,height=500'); 
	newWNV.focus();
}

function Visit (nPag) {
  var newWNV;

  newWNV=window.open(nPag,'Visita','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=416,height=580'); 
	newWNV.focus();
}

function Emailvalidation(entered, alertbox) {
	with (entered) {
		apos=value.indexOf("@");
		dotpos=value.lastIndexOf(".");
		lastpos=value.length-1;

		if ( (value!="" && value!= null) && (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2)) 
		{if (alertbox) {alert(alertbox);} return false;}
		else {return true;}
	}
}

function emptyvalidation(entered, alertbox) {
	with (entered) {
		if (value==null || value=="") {
			if (alertbox!="") {alert(alertbox);} return false;}
		else {return true;}
	}
}
