function MM_openBrWindow(theURL,winName,features) { //v2.0
			window.open(theURL,winName,features);
		}	

function ctrlCarattere() {
		  // I CARATTERI UNICODE COMPRESI TRA 48 E 57 SONO LE CIFRE DA 0 A 9.

		  if (((event.keyCode < 65) || (event.keyCode > 90)) && ((event.keyCode < 97) || (event.keyCode > 122)) && (event.keyCode != 39) &&  (event.keyCode != 32) && ((event.keyCode < 48) || (event.keyCode > 57)) && ((event.keyCode < 223) || (event.keyCode > 253))) 
				return false;
		  else
		        return true;
}		

function ctrlNumero() {
		  // I CARATTERI UNICODE COMPRESI TRA 48 E 57 SONO LE CIFRE DA 0 A 9.
			  
		  if ((event.keyCode < 48) || (event.keyCode > 57))
				return false;
		  else
		        return true;
}

function clickInfo() { //v2.0
			document.frmLocator.optype[2].click();
			alert ("Adesso puoi cliccare sulle icone all\'interno della mappa per avere ulteriori informazioni");
}	

// check that they entered an amount tested, an amount passed,
// and that they didn't pass units than they more than tested

function IsValidChar(sText)
{
   var ValidChars = "abcdefghilmnopqrstuvzjkwyx 1234567890אטלעש.()-'";
   var IsChar=true;
   var Char;
   
   sText = sText.toLowerCase();
 
   for (i = 0; i < sText.length && IsChar == true; i++) 
	  { 
	  Char = sText.charAt(i); 
	  if (ValidChars.indexOf(Char) == -1) 
		 {
		 IsChar = false;
		 }
	  }
   return IsChar;
   
}
		   
function TestDataCheck()
{

	var msgalert;
	msgalert = false;

	if (!IsValidChar(document.frmDati.txtLocalita.value)) 
		msgalert = true;

	if ( !IsValidChar(document.frmDati.txtIndirizzo.value) && !msgalert ) 
		msgalert = true;

	if ( !IsValidChar(document.frmDati.txtCivico.value) && !msgalert ) 
		msgalert = true;


	if ( msgalert ) {
		//alert('i campi contengono caratteri non validi');
		document.frmDati.txtLocalita.value='';
		document.frmDati.txtIndirizzo.value='';
		document.frmDati.txtCivico.value='';
    
		return false;

	} else
    
	return true;

    
}
