function immagineView(archiviopath,imgsrc)
{
 document.write('<A HREF="javascript:afficheMaxi(\''+archiviopath+imgsrc+'\')">'+imgsrc+'</A>');
}

function afficheVignette(cheminVignette,cheminMaxi)
{
 document.write('<A HREF="javascript:afficheMaxi(\''+cheminMaxi+'\')"><IMG SRC="'+cheminVignette+'" HSPACE=0 VSPACE=0 BORDER=0 ALT="Clicca qui per ingrandire la foto"></A>');
}

function afficheMaxi(chemin)
{
 i1 = new Image;
 i1.src = chemin;
 html = '<HTML>\n<HEAD>\n<TITLE>Image</TITLE>\n</HEAD>\n<BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>\n<CENTER><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+32)"></CENTER>\n</BODY>\n</HTML>';
 popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
 popupImage.document.open();
 popupImage.document.write(html);
 popupImage.document.close()
};


function immagineView2(archiviopath,imgsrc,descr)
	{
	document.write('<A HREF="javascript:afficheMaxi2(\''+archiviopath+imgsrc+'\')">'+descr+'</A>');
	}
function afficheMaxi2(chemin)
	{
	i1 = new Image;
	i1.src = chemin;
	html = '<HTML>\n<HEAD>\n<TITLE>Image</TITLE>\n</HEAD>\n<BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>\n<CENTER><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+25,document.imageTest.height+60)"></CENTER>\n</BODY>\n</HTML>';
	popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	};

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_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}






var bHtmlMode = false;
var str_iFrameDoc = (document.all)? "document.frames(\"Composition\").document\;": "document.getElementById(\"Composition\").contentDocument\;";

function initialize(contenuto) {
	iFrameDoc = eval(str_iFrameDoc);
	iFrameDoc.open();
	iFrameDoc.write("<html><body MONOSPACE style='font:10pt verdana,arial,sans-serif'>"+contenuto+"</body></html>");
	iFrameDoc.close();
	iFrameDoc.designMode = "On";
}

function validateMode() {
	if (! bHtmlMode)
		return true;
	alert("Deselezionare \"Visualizza HTML\" per utilizzare le barre degli strumenti");

	setFocus();
	return false;
}

function formatC(what,opt) {
	if (!validateMode())
		return;

	iFrameDoc = eval(str_iFrameDoc);
	iFrameDoc.execCommand(what,false,opt);
 
	setFocus();
}

function setMode(newMode) {
	var testo;

	bHtmlMode = newMode;

	iFrameDoc = eval(str_iFrameDoc);
	riquadro = iFrameDoc.body;

	if (document.all) {
		if (bHtmlMode) {
			testo = riquadro.innerHTML;
			riquadro.innerText = testo; 
		} else {
			testo = riquadro.innerText;
			riquadro.innerHTML = testo;
		}
	} else if(document.getElementById && document.createTextNode) {
		if (bHtmlMode) {
			testo = document.createTextNode(riquadro.innerHTML);
			riquadro.innerHTML = "";
			riquadro.appendChild(testo);
		} else {
			testo = document.createRange();
			testo.selectNodeContents(riquadro);
			riquadro.innerHTML = testo.toString();
		}
	}

	setFocus();
}

function setFocus() {
if (document.all)
	document.frames("Composition").focus();
else
	document.getElementById('Composition').contentWindow.focus()
return;
}












var bHtmlModeEN = false;
var str_iFrameDocEN = (document.all)? "document.frames(\"CompositionEN\").document\;": "document.getElementById(\"CompositionEN\").contentDocument\;";

function initializeEN(contenuto) {
	iFrameDoc = eval(str_iFrameDocEN);
	iFrameDoc.open();
	iFrameDoc.write("<html><body MONOSPACE style='font:10pt verdana,arial,sans-serif'>"+contenuto+"</body></html>");
	iFrameDoc.close();
	iFrameDoc.designMode = "On";
}

function validateModeEN() {
	if (! bHtmlModeEN)
		return true;
	alert("Deselezionare \"Visualizza HTML\" per utilizzare le barre degli strumenti");

	setFocusEN();
	return false;
}

function formatCEN(what,opt) {
	if (!validateModeEN())
		return;

	iFrameDoc = eval(str_iFrameDocEN);
	iFrameDoc.execCommand(what,false,opt);
 
	setFocusEN();
}

function setModeEN(newMode) {
	var testo;

	bHtmlModeEN = newMode;

	iFrameDoc = eval(str_iFrameDocEN);
	riquadro = iFrameDoc.body;

	if (document.all) {
		if (bHtmlModeEN) {
			testo = riquadro.innerHTML;
			riquadro.innerText = testo; 
		} else {
			testo = riquadro.innerText;
			riquadro.innerHTML = testo;
		}
	} else if(document.getElementById && document.createTextNode) {
		if (bHtmlModeEN) {
			testo = document.createTextNode(riquadro.innerHTML);
			riquadro.innerHTML = "";
			riquadro.appendChild(testo);
		} else {
			testo = document.createRange();
			testo.selectNodeContents(riquadro);
			riquadro.innerHTML = testo.toString();
		}
	}

	setFocusEN();
}

function setFocusEN() {
if (document.all)
	document.frames("CompositionEN").focus();
else
	document.getElementById('CompositionEN').contentWindow.focus()
return;
}




var bHtmlModeFR = false;
var str_iFrameDocFR = (document.all)? "document.frames(\"CompositionFR\").document\;": "document.getElementById(\"CompositionFR\").contentDocument\;";

function initializeFR(contenuto) {
	iFrameDoc = eval(str_iFrameDocFR);
	iFrameDoc.open();
	iFrameDoc.write("<html><body MONOSPACE style='font:10pt verdana,arial,sans-serif'>"+contenuto+"</body></html>");
	iFrameDoc.close();
	iFrameDoc.designMode = "On";
}

function validateModeFR() {
	if (! bHtmlModeFR)
		return true;
	alert("Deselezionare \"Visualizza HTML\" per utilizzare le barre degli strumenti");

	setFocusFR();
	return false;
}

function formatCFR(what,opt) {
	if (!validateModeFR())
		return;

	iFrameDoc = eval(str_iFrameDocFR);
	iFrameDoc.execCommand(what,false,opt);

	setFocusFR();
}

function setModeFR(newMode) {
	var testo;

	bHtmlModeFR = newMode;

	iFrameDoc = eval(str_iFrameDocFR);
	riquadro = iFrameDoc.body;

	if (document.all) {
		if (bHtmlModeFR) {
			testo = riquadro.innerHTML;
			riquadro.innerText = testo;
		} else {
			testo = riquadro.innerText;
			riquadro.innerHTML = testo;
		}
	} else if(document.getElementById && document.createTextNode) {
		if (bHtmlModeFR) {
			testo = document.createTextNode(riquadro.innerHTML);
			riquadro.innerHTML = "";
			riquadro.appendChild(testo);
		} else {
			testo = document.createRange();
			testo.selectNodeContents(riquadro);
			riquadro.innerHTML = testo.toString();
		}
	}

	setFocusFR();
}

function setFocusFR() {
if (document.all)
	document.frames("CompositionFR").focus();
else
	document.getElementById('CompositionFR').contentWindow.focus()
return;
}



var bHtmlModeDE = false;
var str_iFrameDocDE = (document.all)? "document.frames(\"CompositionDE\").document\;": "document.getElementById(\"CompositionDE\").contentDocument\;";

function initializeDE(contenuto) {
	iFrameDoc = eval(str_iFrameDocDE);
	iFrameDoc.open();
	iFrameDoc.write("<html><body MONOSPACE style='font:10pt verdana,arial,sans-serif'>"+contenuto+"</body></html>");
	iFrameDoc.close();
	iFrameDoc.designMode = "On";
}

function validateModeDE() {
	if (! bHtmlModeDE)
		return true;
	alert("Deselezionare \"Visualizza HTML\" per utilizzare le barre degli strumenti");

	setFocusDE();
	return false;
}

function formatCDE(what,opt) {
	if (!validateModeDE())
		return;

	iFrameDoc = eval(str_iFrameDocDE);
	iFrameDoc.execCommand(what,false,opt);

	setFocusDE();
}

function setModeDE(newMode) {
	var testo;

	bHtmlModeDE = newMode;

	iFrameDoc = eval(str_iFrameDocDE);
	riquadro = iFrameDoc.body;

	if (document.all) {
		if (bHtmlModeDE) {
			testo = riquadro.innerHTML;
			riquadro.innerText = testo;
		} else {
			testo = riquadro.innerText;
			riquadro.innerHTML = testo;
		}
	} else if(document.getElementById && document.createTextNode) {
		if (bHtmlModeDE) {
			testo = document.createTextNode(riquadro.innerHTML);
			riquadro.innerHTML = "";
			riquadro.appendChild(testo);
		} else {
			testo = document.createRange();
			testo.selectNodeContents(riquadro);
			riquadro.innerHTML = testo.toString();
		}
	}

	setFocusDE();
}

function setFocusDE() {
if (document.all)
	document.frames("CompositionDE").focus();
else
	document.getElementById('CompositionDE').contentWindow.focus()
return;
}



var bHtmlModeES = false;
var str_iFrameDocES = (document.all)? "document.frames(\"CompositionES\").document\;": "document.getElementById(\"CompositionES\").contentDocument\;";

function initializeES(contenuto) {
	iFrameDoc = eval(str_iFrameDocES);
	iFrameDoc.open();
	iFrameDoc.write("<html><body MONOSPACE style='font:10pt verdana,arial,sans-serif'>"+contenuto+"</body></html>");
	iFrameDoc.close();
	iFrameDoc.designMode = "On";
}

function validateModeES() {
	if (! bHtmlModeES)
		return true;
	alert("Deselezionare \"Visualizza HTML\" per utilizzare le barre degli strumenti");

	setFocusES();
	return false;
}

function formatCES(what,opt) {
	if (!validateModeES())
		return;

	iFrameDoc = eval(str_iFrameDocES);
	iFrameDoc.execCommand(what,false,opt);

	setFocusES();
}

function setModeES(newMode) {
	var testo;

	bHtmlModeES = newMode;

	iFrameDoc = eval(str_iFrameDocES);
	riquadro = iFrameDoc.body;

	if (document.all) {
		if (bHtmlModeES) {
			testo = riquadro.innerHTML;
			riquadro.innerText = testo;
		} else {
			testo = riquadro.innerText;
			riquadro.innerHTML = testo;
		}
	} else if(document.getElementById && document.createTextNode) {
		if (bHtmlModeES) {
			testo = document.createTextNode(riquadro.innerHTML);
			riquadro.innerHTML = "";
			riquadro.appendChild(testo);
		} else {
			testo = document.createRange();
			testo.selectNodeContents(riquadro);
			riquadro.innerHTML = testo.toString();
		}
	}

	setFocusES();
}

function setFocusES() {
if (document.all)
	document.frames("CompositionES").focus();
else
	document.getElementById('CompositionES').contentWindow.focus()
return;
}






