if((pos=navigator.appVersion.indexOf("MSIE")) > -1 && navigator.userAgent.indexOf("Opera") == -1) {
	versione = parseInt(navigator.appVersion.substr(pos+5));
	
	if(versione <=6) alert('Per una migliore visualizzazione si consiglia l\'utilizzo di uno dei seguenti browser:\nMozilla Firefox, Opera, Konqueror, SeaMonkey Safari;\no in alternativa di aggiornare Internet Explorer alla versione 7.');
}

function loadClass(elem_id, elem_css) {
	document.getElementById(elem_id).className=elem_css;
	return false;
}

function loadImg(id, src) {
	//alert('loadImg id:'+id+' src:'+src);
	document.getElementById(id).src=src;
}

//fa ciclare l'immagine di sfondo della barra dei contatti per ottenere diversi livelli di trasparenza
function fadeContacts() {
	var tmp=getComputedStyle(document.getElementById('contactBar'),'').backgroundImage;
	//alert("[1] " + getComputedStyle(document.getElementById('contactBar'),'').backgroundImage);
	
	//alert("[2] " + document.getElementById('contactBar').currentStyle.backgroundImage);
	
	if (tmp.indexOf("/img/contacts.png)")!=-1) document.getElementById('contactBar').style.backgroundImage="url(../img/contacts2.png)";
		else document.getElementById('contactBar').style.backgroundImage="url(../img/contacts.png)";
}


//ritorna lo style di un oggetto
// es: alert("immagine di sfondo: " + getComputedStyle(document.getElementById('contactBar'),'').backgroundImage);
if(typeof window.getComputedStyle!="function"){ 
  window.getComputedStyle=function(elt,pseudoElt){
   return (elt!=null && typeof elt.currentStyle=="object")?elt.currentStyle:null;
  } //creo la getComputedStyle se il browser non la supporta
 } //vedo se esiste già
 
 
//imposta la classe .voceCorrente al menuitem cliccato
/*
function selectMenu(sender){
 	var help=sender.parentNode.parentNode;
 	for(i=0;i<help.childNodes.length;i++) {
 		if (help.childNodes[i].nodeName==="LI") help.childNodes[i].className="";
 	}
 	sender.parentNode.className="voceCorrente";
}
*/

//imposta l'id #VoceCorrente al menuitem cliccato
function selectMenu(sender){
	var nd = document.getElementById("VoceCorrente");
	if (nd) nd.id="";
	sender.parentNode.id = "VoceCorrente";
} 