//-------------------------------------------------
//Non ELIMINARE necessari al programma!!!

// Browser Detection
isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
NS4 = (document.layers) ? true : false;
IEmac = ((document.all)&&(isMac)) ? true : false;
IE4plus = (document.all) ? true : false;
IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
ver4 = (NS4 || IE4plus) ? true : false;
NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;

// Body onload utility (supports multiple onload functions)
var gSafeOnload = new Array();
function SafeAddOnload(f)
{
	if (IEmac && IE4)  // IE 4.5 blows out on testing window.onload
	{
		window.onload = SafeOnload;
		gSafeOnload[gSafeOnload.length] = f;
	}
	else if  (window.onload)
	{
		if (window.onload != SafeOnload)
		{
			gSafeOnload[0] = window.onload;
			window.onload = SafeOnload;
		}		
		gSafeOnload[gSafeOnload.length] = f;
	}
	else
		window.onload = f;
}
function SafeOnload()
{
	for (var i=0;i<gSafeOnload.length;i++)
		gSafeOnload[i]();
}

// Call the following with your function as the argument
//SafeAddOnload(yourfunctioname);

//-----------------------------------------------------------------------------------------------------------------------------------------------------------


function POPUP(theurl){
	popWindow=window.open(theurl,'popUp','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=490,height=360,left=150,top=100');
}


function popup(theurl){
	popWindow=window.open(theurl,'popUp','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,width=550,height=360,left=150,top=100');
}


function setPointer(theRow, thePointerColor) {
    if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
        return false;
    }

    var row_cells_cnt           = theRow.cells.length;
    for (var c = 0; c < row_cells_cnt; c++) {
        theRow.cells[c].bgColor = thePointerColor;
    }
    return true;
}


function settaframe() {
	iFrameContenuto.document.write(ContenutoIframe.innerHTML);
}

//-------------------------------------------------

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  
}
//-->

// FUNZIONI PER L'APERTURA DEI CONTENUTI

function apri(URL) {
window.open(URL,'dati','scrollbars=no,width=550,height=350');
}

// APERTURA POPUP IN TEDESCO

function apride(URL) {
window.open(URL,'dati','scrollbars=no,width=650,height=350');
}

function apriscroll(URL) {
window.open(URL,'dati','scrollbars=yes,width=550,height=350');
}

function apri_info(URL) {
window.open(URL,'dati','scrollbars=no, width=400, height=150');
}

function apri_materiale(URL) {
window.open(URL,'materiale','scrollbars=no, width=300, height=425');
}

function apri_credits(URL) {
window.open(URL,'credits','scrollbars=no,width=250,height=570');
}

function apri_numeri(URL) {
window.open(URL,'numeri','scrollbars=no,width=510,height=565');
}

function apri_dati(URL) {
window.open(URL,'credits','scrollbars=no,width=368,height=366');
}

//FUNZIONI PER L'APERTURA DELLE FOTO

function aprifoto(URL) {
window.open(URL,'foto','scrollbars=no,width=368,height=366');
}

//FUNZIONI PER LA GESTIONE DEI LAYER

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}