agam84 0 Newbie Poster

Ciao,
this function should show only selected items, in firefox always works, but with IE works only the first time, then are visualized all the elements visualized previusly

function showMapLegend(id){
			alert(id);
			var elem=document.getElementById(id);
			var tohide=document.getElementsByName('legend');
			for(var i=0;i<tohide.length;i++){
			
				tohide[i].style.display='none';
			}
			elem.style.display = '';