<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


// __________________________
// VALIDA L'EMAIL INSERITA
// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
function isEmail(TheField)
{
   var theEmail = new String(TheField.value)
   var theChar

   PosET     = theEmail.indexOf("@")
   PosPnt    = theEmail.lastIndexOf(".")
   BeforeET  = theEmail.charAt(PosET-1)
   BeforePnt = theEmail.charAt(PosPnt-1)

   var cont = 0
   for (j = theEmail.length; j >=0 ; j--){
      if (theEmail.charAt(j)!=".") 
         cont+=1
      else 
         break
 }

  if ( (PosET==-1)||(PosPnt==-1)||(BeforeET=="")||(BeforePnt=="@")||(PosET>PosPnt)||(cont-1<2) ) return false

   return true
}




// __________________________
// CONTROLLA LA LUNGHEZZA MINIMA DEL CAMPO 
// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
function isMinLength(TheField, minLength) {
	if (TheField.value.length >= minLength)
		return true
	else {
		return false
	     }
}



// __________________________
// CONTROLLA SE IL CAMPO E' VUOTO 
// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
function Hilite(TheField, msg) {
	TheField.focus()
	alert(msg)
	return false
}



//funzione per abilitare regione e provincia nella registrazione
function enable(){
	if (document.demoform.stato.value=="78") {document.demoform.regione.disabled = false; document.demoform.provincia.disabled = false;}
	if (document.demoform.stato.value!="78") {
		document.demoform.regione.disabled = true; 
		document.demoform.regione.value = "0"; 
		document.demoform.provincia.disabled = true; 
		document.demoform.provincia.value = "0";}
}


// __________________________
// FINESTRE DIMENSIONI FOTO 
// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
	PositionX = 100;
	PositionY = 100;
	
	defaultWidth  = 500;
	defaultHeight = 333;
	
	var AutoClose = true;
	
	// Do not edit below this line...
	// ================================
	if (parseInt(navigator.appVersion.charAt(0))>=4){
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
	var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
	var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
	
	function popImage(imageURL,imageTitle,imageURLnext){
		if (isNN){imgWin=window.open('about:blank','',optNN);}
		if (isIE){imgWin=window.open('about:blank','',optIE);}
		with (imgWin.document){
			writeln('<html><head><title>Loading...</title><style>body{margin:20px;}</style>');writeln('<sc'+'ript>');
			writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
			writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
			writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
			writeln('width=160-(document.body.clientWidth-document.images[0].width);');
			writeln('height=290-(document.body.clientHeight-document.images[0].height);');
			writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
			writeln('window.innerWidth=document.images["George"].width+50;');writeln('window.innerHeight=document.images["George"].height+190;}}');
			writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
			if (!AutoClose) writeln('</head><body bgcolor=#f3f3f3 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
			else writeln('</head><body bgcolor=#f3f3f3 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
			writeln('<div align="center"><a href="javascript:window.self.close();" style="display:block; float:left; padding:2px; border:1px solid #999; background-color:#FFF"><img name="George" border="0" src="'+imageURL+'" alt="Click to close"></a><br><img border="0" src="photo/realizzato.gif" vspace="10"></div></body></html>');
			close();		
		}
	}


// -->
