	// funzione per prendere un elemento con id univoco
		function prendiElementoDaId(id_elemento) {
			var elemento;
			if(document.getElementById)
				elemento = document.getElementById(id_elemento);
			else
				elemento = document.all[id_elemento];
			return elemento;
		};
		
  function VisualizzaDiv(nome_div) {  
  	  var e = document.getElementById(nome_div);
	    if (e.style.visibility == 'hidden') {
		      e.style.visibility = 'visible';
    		  e.style.display = 'block';
	    } else {
  		    e.style.visibility = 'hidden';
      		e.style.display = 'none';
    	}
  } 
	
  function trim(stringa) {
    while (stringa.substring(0,1) == ' ') {
     stringa = stringa.substring(1, stringa.length);
    }
		while (stringa.substring(stringa.length-1, stringa.length) == ' ') {
      stringa = stringa.substring(0,stringa.length-1);
		}
    return stringa;
	}		