function preloadImage() {
	if(document.images){ if(!document.arr) document.arr=new Array();
   	var i,j=document.arr.length,a=preloadImage.arguments;
	for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){
			document.arr[j]=new Image;
			document.arr[j++].src=a[i];
		}
	}
}
function nuovaFinestra(finestra,target,sw,sh,w,h) {
	if(sw>700){
		LeftPosition = (sw-w)/2;
//		TopPosition = (sh-h)/2;
		TopPosition = 10;
	} else {
		LeftPosition = 0;
		TopPosition = 0;
		w=550;
		h=350;
	}
	var finestra = window.open(finestra,target,'scrollbars=yes,resizable=yes,top='+TopPosition+',left='+LeftPosition+',width='+w+',height='+h+',status=no,location=no,toolbar=no');
	if(window.focus){finestra.focus();}
}
function obiettivo(obj,targ) { 
	obj.target=targ; 
} 
function sf(nomeOggetto){
alert(nomeOggetto);
	if(document.getElementById){document.getElementById(nomeOggetto).focus();}
	document.close();
}
function cambiaBg(nomeOggetto,colore){
	if(document.getElementById){document.getElementById(nomeOggetto).style.background.color=colore;}
	document.close();
}
function cambiaImg(nomeOggetto,nomeImg){
	if(document.getElementById){document.getElementById(nomeOggetto).src=nomeImg;}
	document.close();
}
function cambiaBgImg(nomeOggetto,nomeImg){
	if(document.getElementById){document.getElementById(nomeOggetto).style.backgroundImage='url('+nomeImg+')';}
	document.close();
}
function cambiaColor(nomeOggetto,colore){
	if(document.getElementById){document.getElementById(nomeOggetto).style.color=colore;}
	document.close();
}
function cambiaMenu(nomeOggetto,nomeImg){
	if(document.getElementById){document.getElementById(nomeOggetto).src=nomeImg;}
	document.close();
}
function googlemap(richiesta,lat,lng,zoom,label,largo,alto){
	if (GBrowserIsCompatible()) {
		if(richiesta == 0){
			var map = new GMap2(document.getElementById("googlemap"));
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl());
		    	map.addControl(new GOverviewMapControl());
			map.setCenter(new GLatLng(lat,lng), zoom);
			var marker = new GMarker(map.getCenter());
			map.addOverlay(marker);
			if(label!=''){
				map.openInfoWindow(map.getCenter(),
    	              		document.createTextNode(label));
			}
		}
		if(richiesta == 1){
			document.writeln('<div style="text-align:center;"><div id="googlemap" style="width: '+largo+'px; height:'+alto+'px; margin:0px auto; border:#979797 1px solid;"><br /><br /><br /><img src="./tpl/sys/loading.gif" alt=""></div></div>');
		}
		document.close();
	}
}
function mostraHelp(nomeOggetto){
	if(document.getElementById){
		if(document.getElementById(nomeOggetto).style.display=="none"){
			document.getElementById(nomeOggetto).style.display="block";
		} else {
			document.getElementById(nomeOggetto).style.display="none";
		}
	}
	document.close();
}
//-->
