function finestra(str) {
	var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=450,height=350,status=no,location=no,toolbar=no,menubar=no');
	searchWin.focus();
}


function finestra_del(str) {
      var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=600,height=500,status=no,location=yes,toolbar=yes,menubar=yes');
 	searchWin.focus();
}

<!--
function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' deve contenere un indirizzo e-mail valido.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' deve contenere un numero.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' deve contenere un numero fra '+min+' e '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' è richiesto.\n'; }
  } if (errors) alert('Sono stati rilevati i seguenti errori:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
function finestra_news(str) {
	var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=400,height=350,status=no,location=no,toolbar=no,menubar=no');
	searchWin.focus();
}
	
function finestra_mod_forum(str) {
	var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=400,height=300,status=no,location=no,toolbar=no,menubar=no');
	searchWin.focus();
}

function finestra_vis_forum(str) {
	var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=450,height=450,left=0,top=0,status=no,location=no,toolbar=no,menubar=no');
	searchWin.focus();
}
	
function finestra_mod_forum(str) {
	var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=400,height=300,status=no,location=no,toolbar=no,menubar=no');
	searchWin.focus();

}


function finestraAllegato(str) {

      var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=650,height=450,status=yes,location=yes,toolbar=yes,menubar=yes');
 searchWin.focus();

}

function finestra_lunga(str) {
      var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=470,height=600,left=0,top=0,status=no,location=no,toolbar=no,menubar=no');
	searchWin.focus();
}

function finestra_dettagli(str) {
	var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=550,height=450,status=no,location=no,toolbar=no,menubar=no');
	searchWin.focus();

}
function finestra_news_home(str) {
	var  searchWin = window.open(str,"nuova",'scrollbars=yes,resizable=yes,width=480,height=360,status=no,location=no,toolbar=no,menubar=no');
	searchWin.focus();
}
/**********************************************************/
function Show(id1){
if(document.getElementById){
	el1=document.getElementById(id1);
	el1.style.display="block";
	//addMenu(id1);
	}
}
function Hide(id1){
if(document.getElementById){
	el1=document.getElementById(id1);
	el1.style.display="none";
	//remMenu(id1);
	}
}
function ShowAndHide(id1){
if(document.getElementById){
    el1=document.getElementById(id1);
	id2 = 'EXPAND' + id1;
	id3 = 'COLLAPSE' + id1;
    el2=document.getElementById(id2);
	el3=document.getElementById(id3);
    if(el1.style.display=="none"){
        el1.style.display="block";
			//addMenu(id1);
        el2.style.display="none";		
		el3.style.display="block";
        }
    else{
        el1.style.display="none";
			//remMenu(id1);
        el2.style.display="block";
		el3.style.display="none";
        }
    }
}
function LEspandi(esp1){
	esp2 = 'EXPAND' + esp1
	document.write('<span title=\"Clicca col mouse per espandere la sezione\" class=\"jsEspandi\" style=\"display:block;float:right;\" onclick=\"ShowAndHide\(\''+ esp1 + '\',\''+ esp2 +'\'\);return\(false\);\" id=\"'  + esp2 + '\">&nbsp;</span>');
	//Show(id3);
}
function LCollassa(esp1){
	esp2 = 'COLLAPSE' + esp1
	document.write('<span title=\"Clicca col mouse per richiudere la sezione\" class=\"jsCollassa\" style=\"display:block;float:right;\" onclick=\"ShowAndHide\(\''+ esp1 + '\',\''+ esp2 +'\'\);return\(false\);\" id=\"'  + esp2 + '\">&nbsp;</span>');
}

function ShowAndHideFirst(id1){
if(document.getElementById){
    el1=document.getElementById(id1);
	id2 = 'EXPAND' + id1;
	id3 = 'COLLAPSE' + id1;
    el2=document.getElementById(id2);
    if(el1.style.display=="none"){
        el1.style.display="block";
        el2.style.display="none";
        }
    else{
        el1.style.display="none";
        el2.style.display="block";
        }
    }
	Hide(id3);
}
function ExpandSelected(codd) {
	alert('CI PASSO');
	d = document.getElementsByTagName('div');
	alert(d);
	alert(d.length);
	for (i = 0 ; i = d.length; i++) {
		//alert('CI PASSO' + i);
		//str = new String(d[i]);
		//if ( str.search(codd) != -1 ) {
			//ci sono!
			//alert('CI SONO!');
		//}
	}

}
/*****************************************************************/

function createCookie(name,value,days) {
	//alert('createCookie; name: '+ name +'; value: ' + value +';days: ' + days);
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = '; expires='+date.toGMTString();
  }
  else expires = '';
  document.cookie = name+'='+value+expires+'; path=/';
}

function readCookie(name) {
  var nameEQ = name + '=';
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}
function setFontSize(size) {
	var body = document.getElementsByTagName('body')[0];
	var percentuale = "100%"; // default
	if (size == 1) percentuale = "85%";
	if (size == 2) percentuale = "100%";
	if (size == 3) percentuale = "140%";
	body.style.fontSize = percentuale;
	createCookie('TuoSitoFontSize',size,365);
}

function FunzioniCaratteri() {
	document.write('&nbsp;<a href="\#\" onclick=\"setFontSize(1);\" title=\"Setta il carattere a dimensione piccola\"><img src=\"images/css-gest/carattere_piccolo.gif\" alt=\"Setta il carattere a dimensione piccola\" /></a> &nbsp;<a href=\"#\" onclick=\"setFontSize(2);\" title=\"Setta il carattere a dimensione media\"><img src=\"images/css-gest/carattere_medio.gif\" alt=\"Setta il carattere a dimensione media\" /></a>	&nbsp;<a href=\"#\" onclick=\"setFontSize(3);\" title=\"Setta il carattere a dimensione grande\"><img src=\"images/css-gest/carattere_grande.gif\" alt=\"Setta il carattere a dimensione grande\" /></a>');
}
window.onload = function() {
	size = readCookie('TuoSitoFontSize');
	setFontSize(size);
}


