// ***********************************************
// ***********************************************

version = ""browserName = navigator.appName;browserVer  = parseInt(navigator.appVersion);bPlatform = navigator.platform;
if ( browserName == "Netscape" && browserVer >= 3 )
	version = "n3+";else
if ( browserName == "Microsoft Internet Explorer" && browserVer >= 4 )	version = "ie4+";

	
browserPlat  = "win";if ( navigator.platform.indexOf("Mac") != -1 )
	browserPlat = "mac";
else
if ( bPlatform.indexOf("Win") != -1 )
	browserPlat = "win";



// ***********************************************
function NuovaFinestra (content, wName, width, height, status, resizable, toolbar, menubar, scrollbars, location, directories)
{
if (version == "ie4+" )
	if (browserPlat == "mac")		{
		width -= 16;		height -= 16;		}	else		{
		}elseif (version == "n3+" )
	if (browserPlat == "mac")		{		}	else		{
		}	
params = ""
params += "width=" + width;params += ",";

params += "height=" + height;params += ",";
status ? params += "status=1" : "status=0" ;
params += ",";

resizable ? params += "resizable=1" : "resizable=0" ;
params += ",";
toolbar ? params += "toolbar=1" : "toolbar=0" ;
params += ",";
menubar ? params += "menubar=1" : "menubar=0" ;
params += ",";
scrollbars ? params += "scrollbars=1" : "scrollbars=0" ;
params += ",";
location ? params += "location=1" : "location=0" ;
params += ",";
directories ? params += "directories=1" : "directories=0" ;
params += ",";
//params += "location=0, directories=0";
aWind = window.open(content, wName, params);
aWind.focus();
return aWind;}

// ***********************************************
function CheckForm (theForm)
{
if ( theForm.nome.value == '' )
	{
	alert('ATTENZIONE: il campo NOME non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.cognome.value == '' )
	{
	alert('ATTENZIONE: il campo COGNOME non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.indirizzo.value == '' )
	{
	alert('ATTENZIONE: il campo INDIRIZZO non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.cap.value == '' )
	{
	alert('ATTENZIONE: il campo CAP non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.citta.value == '' )
	{
	alert('ATTENZIONE: il campo CITTA non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.provincia.value == '' )
	{
	alert('ATTENZIONE: il campo PROVINCIA non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.telefono.value == '' )
	{
	alert('ATTENZIONE: il campo TELEFONO non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.email.value == '' )
	{
	alert('ATTENZIONE: il campo E-MAIL non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.codicefiscale.value == '' )
	{
	alert('ATTENZIONE: il campo CODICE FIDCALE non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.nascitadata.value == '' )
	{
	alert('ATTENZIONE: il campo DATA DI NASCITA non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.nascitaluogo.value == '' )
	{
	alert('ATTENZIONE: il campo LUOGO DI NASCITA non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.resindirizzo.value == '' )
	{
	alert('ATTENZIONE: il campo RESIDENZA non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.rescap.value == '' )
	{
	alert('ATTENZIONE: il campo CAP RESIDENZA non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.rescitta.value == '' )
	{
	alert('ATTENZIONE: il campo CITTA\' RESIDENZA non puo\' essere vuoto.');
	
	return false;
	}

if ( theForm.respv.value == '' )
	{
	alert('ATTENZIONE: il campo PROVINCIA RESIDENZA non puo\' essere vuoto.');
	
	return false;
	}



if ( !theForm.consenso1.checked || !theForm.consenso2.checked )
	{
	alert('ATTENZIONE: Per poter aggiornare i dati\nabilitare entrambe le dichiarazioni di consenso.');
	
	return false;
	}
	
return true;
}

// ***********************************************

function ShowImage( imagePath, winName, width, height )
{

NuovaFinestra (imagePath, winName, width, height, false, false, false, false, false, false, false);

}

// ***********************************************
// ***********************************************

