function changeImg(targ,selObj){
	var movie = selObj.options[selObj.selectedIndex].text;
	if(movie.indexOf(".swf")==-1){
		document.images[targ].src = selObj.options[selObj.selectedIndex].value;
	} else { 
		document.images[targ].src = "gif/banflash.gif";
	}
	document.getElementById("data"+targ).value = selObj.options[selObj.selectedIndex].text;
}

function today(){
	var now = new Date( );
	var giorno = now.getDate();
	var mese = now.getMonth()+1;
	var anno = now.getFullYear();
	if(giorno<10) giorno = "0"+giorno;
	if(mese<10) mese = "0"+mese;

	document.getElementById("gg").value = giorno;
	document.getElementById("mm").value = mese;
	document.getElementById("aa").value = anno;
}

function confirmDelete(cosa) {
 	return (confirm('Sicuro di voler cancellare '+cosa+'?\r\nL\'operazione non puo\' essere annullata!'));
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function selectAll(id){
    document.getElementById(id).focus();
    document.getElementById(id).select();
}
function getE(element){
	var e;
	if( document.getElementById ) // this is the way the standards work
		e = document.getElementById( element );
	else if( document.all ) // this is the way old msie versions work
		e = document.all[element]; 
	else if( document.layers ) // this is the way nn4 works
		e = document.layers[element];
	return (e);
}
function toggleLayer(whichLayer,action){
	var elem, vis;  
	elem = getE(whichLayer);
	vis = elem.style;  // if the style.display value is blank we try to figure it out here  
	if (vis.display=='') vis.display='none';
	if(elem.offsetWidth!=undefined && elem.offsetHeight!=undefined){
		if(action=="on") vis.display = 'block';
		if(action=="off") vis.display = 'none';
		//vis.display = (vis.display==''||vis.display=='block')?'none':'block';
	}
}
