function JumpMenu(targ, selObj){ //v3.0
	//alert(selObj);
	window.open(targ, '_self');
  	//eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  	//if (restore) selObj.selectedIndex=0;
}

function mostraMenu(menuCorrente) {
		if (document.getElementById) {
			questoMenu = document.getElementById(menuCorrente).style
			if (questoMenu.display == "block") {
				questoMenu.display = "none"
			}
			else {
				questoMenu.display = "block"
			}
			return false
		}
		else {
			return true
		}
}

function fElimina(cc, testo) {
					sHdr=window.confirm(testo);
						if (sHdr == true) {
							window.open(cc, '_self');
						}
					}
					
//verifica campo numerico
function VerificaCampo(campo)
{
 var colore = "#ffcc00"
 
 
         if ( campo.value == "" )
         {
               // alert( "Inserire un valore numerico." );
			   //	campo.style.backgroundColor = colore; 
               // campo.focus();
               //  return ( false );
			   campo.value = "0"
         }
		 
		 
		 
         var cifre= "0123456789";
         var verifica= campo.value;
         var allValid = true;
		
		//verifica = verifica.replace(/\,/g, '\.')
		
         var allNum = "";
         for ( i = 0; i < verifica.length; i++ )
         {
                ch = verifica.charAt( i );
                for ( j = 0; j < cifre.length; j++ )
                 if ( ch == cifre.charAt( j ))
                        break;
                if ( j == cifre.length )
                {
                 allValid = false;
                 break;
                }
                allNum += ch;
         }
         if (!allValid)
         {
                
				alert( "Sono presenti dei caratteri alfanumerici, sono consentite solo cifre numeriche. Non inserire punti" );
				campo.style.backgroundColor = colore; 
                campo.focus();
                return  false ;
         }
		 campo.style.backgroundColor = "#fff"; 
        return  true ;
}						


function isnum(obj) {

intro = obj.value;
intro = intro.replace(/\./g, ',');
intro = intro.replace(/\,/g, '\.');


if(intro != ""){
	if (isNaN(intro))
		{
			alert('Nel campo è possibile immettere solo numeri!');
			obj.value="";
			obj.focus();
		}
}
}



function apri(file){
	  window.open(file, '_blank', "scrollbars=yes,resizable=no,width=580,height=580,status=no,location=no,toolbar=no,top=250,left=250");		
}

function apri_account(page,targ,selObj,restore){
	var cc;
	cc = document.getElementById('codiceAccount').value;
	 if(cc != ""){
	 	 if(cc != "--"){
			window.open(page + cc, 'new', "scrollbars=yes,resizable=no,width=580,height=580,status=no,location=no,toolbar=no,top=250,left=250");
			}
	}
}

