 //genera un riferimento all'oggetto con l'id specificato
 //Esempi che possono essere utili a capire
//riferimento = getElementReference("divFormCambioPass");
//getElementReference("sfondoCambioPass").style.display = "block";
function getElementReference(id) {


	//W3C
	if( document.getElementById ) return document.getElementById(id); 
	//IE et al.
	else if( document.all ) return document.all[id]; 
	//NS: funziona solo con i layers non nidificati
	else if( document.layers ) return document.layers[id]; 
	else return null;
}


  	function overSpec(id){
	  	obj = getElementReference(id);
	  	obj.style.color='#E1B700';
	  	
	  	
  	}
  	
  	function outSpec(id){
	  	obj = getElementReference(id);
	  	obj.style.color='#30595b';
	  	
  	}
  	
  	function p(id){
  		obj = getElementReference(id);
  		alert(obj.style.color);
  	}


//permette di visualizzare in una pagina le informazioni relative al visitatore
 function whatBrowser(){
 		alert(navigator.appName);
		alert(navigator.appVersion);
		alert(navigator.appCodeName);
		alert(navigator.userAgent);
	}

function Calendario(nome){
	 window.open("/Meridiana/html/calendario.html?"+nome,"Calendario","width=200, height=235, toolbar=no,location=no,directories=no,screenX=50,screenY=50,top=250,left=250,status=no,menubar=no,scrollbars=no,resizable=no");
 }


function send(formSel,campo,oper){

	getElementReference(campo).value = oper;
	document.forms[formSel].submit();
}

 function verificaNumeri(stringa) {
	 var numeri = '0123456789.';
	 var c;
	 for (i=0; i<stringa.length; i++) {
	  c = stringa.charAt(i);
	  if (i==0 && c==0)
	   return false;
	  if (numeri.indexOf(c)==-1)
	   return false;
	 } 
	 return true;
}
