function chiama(query,destino)
{
if (destino.length==0)
  { 
  return;
  }
if (query.length==0)
  { 
  document.getElementById(destino).innerHTML="";
  return;
  }
document.getElementById(destino).innerHTML='caricamento in corso...';
if (window.XMLHttpRequest)
	{
	xmlHttp=new XMLHttpRequest();
	}
else // IE 5/6
	{
	xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}

	var url="/it/xml.php?q=" + query;
	url=url+"&amp;sid="+Math.random();
	xmlHttp.open("GET",url,false);
	xmlHttp.send(null);
	if(xmlHttp.responseText!='')
	document.getElementById(destino).innerHTML=xmlHttp.responseText;
}

function valuta(query)
{
if (query.length==0) return;
if (window.XMLHttpRequest)
        {
	xmlHttp=new XMLHttpRequest();
	}
else // IE 5/6
	{
	xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
var url="/it/xml.php?q=" + query;
url=url+"&amp;sid="+Math.random();
xmlHttp.open("GET",url,false);
        xmlHttp.send(null);
	eval(xmlHttp.responseText);
}

function auth(act,login,pass,destino)
	{
	var ricorda=document.getElementById(destino).innerHTML;
	var erremail=0;
	zot=login.replace(/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/,"");
	if(zot!="" || login=="")
		{
		erremail=1;
		}
	if(erremail==1)
		{
		alert('email errata');
		}
	else
		{
		if(pass=="" && document.getElementById('campoinvia').value=="accedi")
			{
			alert('devi inserire la password');
			}
		else
			{
			if(document.getElementById('campoinvia').value=="richiedi")
				{
				chiama(act+'|-'+login+'-|-'+pass,'campomsgindietro');
				document.getElementById('campomsgindietro').innerHTML='';
				document.getElementById('campoinvia').value='accedi';
				document.getElementById('campopass').style.display='block';
				document.getElementById('campomsg').innerHTML='<b>Ti abbiamo inviato una email con la tua password, controlla la posta e inserisci qui la password ricevuta</b>. Se non ricevi nessuna email significa che non ti sei ancora <a href="javascript:void(0)" onclick="chiama(\'formregister\',\'fullboxpersonalcontent\');">registrato</a> <br><br>';
				document.getElementById('campomsg').style.display='block';
				document.getElementById('campolostpass').style.display='block';
				}
			else
				{
				chiama(act+'|-'+login+'-|-'+pass,destino);
				if(document.getElementById(destino).innerHTML=='email o password errata')
					{
					document.getElementById(destino).innerHTML='';
					alert('email o password errata');
					}
				else
					{
					aggiornaboxlogin(document.getElementById(destino).innerHTML);
					//chiudi('fullpersonal','fullboxpersonal');
					chiama('welcomemyundo-','fullboxpersonalcontent');
					}
				}
			}
		}
	}
function cambiamail(email,email2)
	{
	var erremail=0;
	zot=email.replace(/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/,"");
	if(zot!="" || email=="")
		{
		erremail=1;
		}
	if(erremail==1)
		{
		alert('email errata');
		}
	else if(email!=email2)
		{
		alert('devi riscrivire due volte lo stesso indirizzo');
		}
	else
		{
		chiama('profilo-|-cambiaemail-|-'+email+'-|-'+email2,'fullboxpersonalcontent');
		}
	}
function cambiapass(pass,pass2)
	{
	if(pass.length<5)
		{
		alert('password troppo corta: occorrono almeno 5 caratteri');
		}
	else if(pass!=pass2)
		{
		alert('devi riscrivere la password uguale');
		}
	else if(pass==pass2)
		{
		chiama('profilo-|-cambiapass-|-'+pass+'-|-'+pass2,'fullboxpersonalcontent');
		}
	}
function confermacancellazione()
	{
	var r=confirm("Vuoi veramente cancellare la tua registrazione ? ")
	if (r==true)
	  {
	  chiama('profilo-|-cancellazione','fullboxpersonalcontent');
	  }
	else
	  {
	  }
	}
function confermacancellazionenewsletter()
	{
	var r=confirm("Non vuoi piu' ricevere la newsletter d'informazione sull'arte e sulla cultura? ")
	if (r==true)
	  {
	  chiama('statonewsletter-nonews','fullboxpersonalcontent');
	  }
	else
	  {
	  }
	}
function lineadiretta(gliid)
	{
	var allid=gliid.split(",");
	var daeli="";
	for(mid in allid)
		{
		if(document.getElementById('undold'+allid[mid]))
		  {
		if(document.getElementById('undold'+allid[mid]).checked==true)
			{
			daeli=daeli+allid[mid]+'-';
			}
		  }
		}
	if(daeli!="")
		{
		chiama('lineadiretta-'+daeli,'fullboxpersonalcontent');
		}
	else
		{
		alert('non hai selezionato nulla');
		}
	}
function aggiornaboxlostpass()
	{
	document.getElementById('password').value='';
	document.getElementById('campopass').style.display='none';
	document.getElementById('campomsg').style.display='block';
	document.getElementById('campoinvia').value='richiedi';
	document.getElementById('campomsg').innerHTML='<b>Inserisci la tua email e riceverai immediatamente<br> la password al tuo indirizzo di posta</b><br><br>';
	document.getElementById('campomsgindietro').innerHTML='&nbsp; o <a href="javascript:chiama(\'formlogin\',\'fullboxpersonalcontent\')" style="color:black">torna indietro</a><br><br>';
	document.getElementById('campolostpass').style.display='none';
	}
function aggiornaboxlostpassback()
	{
	document.getElementById('campoinvia').value='entra';
	document.getElementById('campopass').style.display='block';
	document.getElementById('campomsg').style.display='none';
	document.getElementById('campolostpass').style.display='block';
	}
	// menu utente loggato
function aggiornaboxlogin(nome)
	{
	document.getElementById('boxaccesso').style.marginTop='10px';
	document.getElementById('boxaccesso').innerHTML='<ul style=""><li style="margin:0px;padding:0px 0px 6px 0px;position:relative"><a href="javascript:void(0)" onclick="if(document.getElementById(\'combop\').style.display==\'block\') $(\'#combop\').slideUp(\'fast\'); else if(document.getElementById(\'combop\').style.display==\'none\') $(\'#combop\').slideDown(\'fast\');"><span style="color:#ffa000;font-style:oblique">My</span><span style="color:black;font-style:oblique">UnDo</span> <span style="color:#ffa000;">::</span> '+nome+'</a> <div id="combop" style="display:none"><ul><li><a href="javascript:void(0)" onclick="chiamafull(\'profilo\');">il tuo profilo</a></li> <li><a href="javascript:void(0)" onclick="chiamafull(\'statonewsletter\');">preferenze newsletter</a></li><li><a href="/it/myeventi.php">i tuoi eventi</a></li><!--<li><a href="javascript:void(0)" onclick="chiamafull(\'contributi\');">i tuoi contributi</a></li>--></ul></div></li> <li style="position:relative;float:right;margin:0px;padding:0px 0px 0px 0px"><a href="/it/?action=logout">Esci</a></li></ul>';
	}
function aggiornaprofilo()
	{
chiama('profilo-|-cambiaprofilo-|-'+document.getElementById('profilonome').value+'-|-'+document.getElementById('profilonazione').value+'-|-'+document.getElementById('profilocitta').value+'-|-'+document.getElementById("cate1042550325").checked+'-|-'+document.getElementById("cate1042550344").checked+'-|-'+document.getElementById("cate1042550351").checked+'-|-'+document.getElementById("cate1042550356").checked+'-|-'+document.getElementById("cate1042626118").checked+'-|-'+document.getElementById("cate1042626128").checked+'-|-'+document.getElementById("sett1").checked+'-|-'+document.getElementById("sett2").checked+'-|-'+document.getElementById("sett3").checked+'-|-'+document.getElementById("sett4").checked+'-|-'+document.getElementById("sett5").checked+'-|-'+document.getElementById("sett6").checked+'-|-'+document.getElementById("sett7").checked+'-|-'+document.getElementById("sett8").checked,'fullboxpersonalcontent')
	}
function aggiornastatonewsletter(mod)
	{
	chiama('statonewsletter-cambiastato-|-'+mod.tihtml[1].checked+'-|-'+document.getElementById('gio1').checked+'-|-'+document.getElementById('gio2').checked+'-|-'+document.getElementById('gio3').checked+'-|-'+document.getElementById('gio4').checked+'-|-'+document.getElementById('gio5').checked+'-|-'+document.getElementById('gio6').checked+'-|-'+document.getElementById('gio7').checked,'fullboxpersonalcontent')
	}
function register(act,email,privacy,destino)
	{
	var erremail=0;
	zot=email.replace(/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/,"");
	if(zot!="" || email=="")
		{
		erremail=1;
		}
	if(erremail==1)
		{
		alert('email errata');
		}
	else if(privacy=="accetto")
		{
		//document.getElementById('boxregister').style.display='none';
		//document.getElementById('campolostpass').style.display='none';
		//document.getElementById('boxlogin').style.display='block';
		//document.getElementById('email').value=email;
		chiama(act+email,destino);
		//controllo=document.getElementById(destino).innerHTML;
		//if(controllo.match(/^ATTENZIONE/))
			//{
			//document.getElementById('campolostpass').style.display='block';
			//}
		}
	}

function condividiaprichiudi(q)
	{
	if(document.getElementById(q).style.display=='block')
		{
		document.getElementById(q).style.display='none';
		document.getElementById(q).innerHTML=orig;
		}
	else
		{
		orig=document.getElementById(q).innerHTML;
		document.getElementById(q).style.display='block';
		}
	}
function condividi(cosa)
	{
	var erremail=0;
	var email=document.getElementById('condividiemail').value;
	var emailto=document.getElementById('condividiemailto').value;
	zot=email.replace(/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/,"");
	zotb=emailto.replace(/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/,"");
	if((zot!="" || email=="")||(zotb!="" || emailto==""))
		{
		erremail=1;
		}
	if(erremail==1)
		{
		alert('email errata');
		}
	else if(cosa!="")
		{
		chiama(cosa+'-|-'+document.getElementById('condividinome').value+'-|-'+document.getElementById('condividiemail').value+'-|-'+document.getElementById('condividiemailto').value+'-|-'+document.getElementById('condividimsg').value,'formcondividi');
		}
	}
function evcambiacolore(objev,evc,totevc)
	{
	for(i=1;i<=totevc;i++) 
		{
		document.getElementById("evnum"+evc+"-"+i).style.color='#666';
		document.getElementById("evnum"+evc+"-"+i).style.fontWeight='normal';
		}
	objev.style.color='#ff3300';
	objev.style.fontWeight='bold';
	}
function avanti(qualebox,totevc,dove)
        {
	eval("var arraev=boxevento"+dove+qualebox);
	eval("var posatt=posboxevento"+dove+qualebox);
	posatt++;
	if(posatt>totevc-1) { posatt=0; }
	eval("posboxevento"+dove+qualebox+"=posatt");
	chiama('evboxhome'+arraev[posatt],'contboxevento'+dove+qualebox);
	document.getElementById('contatoreboxevento'+dove+qualebox).innerHTML=posatt+1;
	}
function indietro(qualebox,totevc,dove)
        {
	eval("var arraev=boxevento"+dove+qualebox);
	eval("var posatt=posboxevento"+dove+qualebox);
	posatt--;
	if(posatt<0) { posatt=totevc-1; }
	eval("posboxevento"+dove+qualebox+"=posatt");
	chiama('evboxhome'+arraev[posatt],'contboxevento'+dove+qualebox);
	document.getElementById('contatoreboxevento'+dove+qualebox).innerHTML=posatt+1;
	}
// per indici
function indiceavanti(qualebox,totele,chiamata)
        {
	eval("var arraidx=boxindice"+qualebox);
	eval("var posidxatt=posboxindice"+qualebox);
	posidxatt++;
	if(posidxatt>totele-1) { posidxatt=0; }
	eval("posboxindice"+qualebox+"=posidxatt");
	chiama(chiamata+arraidx[posidxatt],'boxindicecont'+qualebox);
	document.getElementById('contatoreboxindice'+qualebox).innerHTML=posidxatt+1;
	}
function indiceindietro(qualebox,totele,chiamata)
        {
	eval("var arraidx=boxindice"+qualebox);
	eval("var posidxatt=posboxindice"+qualebox);
	posidxatt--;
	if(posidxatt<0) { posidxatt=totele-1; }
	eval("posboxindice"+qualebox+"=posidxatt");
	chiama(chiamata+arraidx[posidxatt],'boxindicecont'+qualebox);
	document.getElementById('contatoreboxindice'+qualebox).innerHTML=posidxatt+1;
	}
/*
divcreato = document.createElement("div"); //crea blocco div
divcreato.id = "mine"; //assegna al div un nome
document.body.appendChild(divcreato); //appende al documento html il blocco
div appena creato
mydiv = document.getElementById("mine"); //lo trova
divcreato.style.position = "absolute"; //alcune proprietÃ 
divcreato.style.zindex= "5";
divcreato.style.color= "red";
divcreato.style.left = 222;
divcreato.style.top = 444;
divcreato.innerHTML=""; //qua il codice html all'interno del div


// cambiaclasse
var elem = document.getElementById("uno");
elem.className = "due"; 
*/
function creadiv(iddiv,figliodi,classe)
	{
	nuovodiv=document.createElement("div");
	nuovodiv.id=idddiv;
	document.getElementById(figliodi).appendChild(nuovodiv);
	document.getElementById(nuovodiv).className = classe;
	}
function svuota(quale)
	{
  	document.getElementById(quale).innerHTML="";
	}
function listahome(chiamata,dove,svuotalo,linco,lincoscrivo)
	{
	chiama(chiamata,dove);
	svuota(svuotalo);
	if(dove=="evallita") lang="ita"; else lang="est";
	document.getElementById(linco).href='javascript:window.location.reload()';
	document.getElementById(linco).innerHTML=lincoscrivo;
	document.location="#"+lang;
	}
function tabbizza(chiamata,dove,numbo,quantibox,messaggio,soggetto)
	{
	if(dove=="evallita") lang="ita"; else lang="est";
	document.getElementById('visuatutti'+lang).style.color='#777';
	if(lang=='ita')
	 {
	if(quantibox)
		{
		if(document.getElementById('visuaprovi'))
		document.getElementById('visuaprovi').style.color='#ffa000';
		if(document.getElementById('visuaregio'))
		document.getElementById('visuaregio').style.color='#777';
		}
	else
		{
		if(document.getElementById('visuaregio'))
		document.getElementById('visuaregio').style.color='#ffa000';
		if(document.getElementById('visuaprovi'))
		document.getElementById('visuaprovi').style.color='#777';
		}
	 }
	 if(messaggio) chiamata=chiamata+'-'+document.getElementById(messaggio).innerHTML;
	 if(soggetto) chiamata=chiamata+' <b>'+soggetto+'</b>';
	chiama(chiamata,dove);
	}
	/*
function tabcambia(q,lang)
	{
	for(i=1;i<=6;i++)
		{
		document.getElementById('tab'+lang+i).style.color='#ff3300';
		}
	if(q>0)
	document.getElementById('tab'+lang+q).style.color='#ffa000';
	}
	*/
function chiudi(q1,q2,q3)
	{
	if (q1 && document.getElementById(q1))
	document.getElementById(q1).style.display='none';
	if(q2 && document.getElementById(q2))
	document.getElementById(q2).style.display='none';
	if(q3 && document.getElementById(q3))
	document.getElementById(q3).style.display='none';
	}
function apri(q1,q2,q3)
	{
	if(q1)
	document.getElementById(q1).style.display='block';
	if(q2)
	document.getElementById(q2).style.display='block';
	if(q3)
	document.getElementById(q3).style.display='block';
	}
function aprichiudi(q)
	{
	if(document.getElementById(q).style.display=='block')
		{
		document.getElementById(q).style.display='none';
		}
	else
		{
		document.getElementById(q).style.display='block';
		}
	}
var t;
var timer_is_on=0;
var aprec;

function startloopavanti(a,b,c)
	{
	if(!timer_is_on)
		{
	        timer_is_on=1;
	//	t=setTimeout("",2000);
	//	loopavanti(a,b,c);
		clearTimeout(t);
		//var t=setTimeout("loopavanti("+a+","+b+",'"+c+"')",2000);
		loopavanti(a,b,c);
	//	aprec=a;
        	}
	else
		{
		stoploopavanti();
		//if(aprec!=a){  timer_is_on=1;aprec=a;loopavanti(a,b,c); }
		}
	}
function loopavanti(a,b,c)
	{
	if(timer_is_on)
		{
	avanti(a,b,c);
	clearTimeout(t);
	var t=setTimeout("loopavanti("+a+","+b+",'"+c+"')",2000);
		}
	}

function stoploopavanti()
	{
	clearTimeout(t);
	timer_is_on=0;
	}


function chiamafull(cosa)
	{
	//document.getElementById('fullpersonal').style.display='block';
	//ocument.getElementById('fullboxpersonal').style.display='block';
	jQuery("#fullpersonal").show(500);
	jQuery("#fullboxpersonal").show(500);
	try
		{
		document.getElementById('fullboxpersonal').style.top=pageYOffset+'px';
		}
	catch(erro)
		{
		//per ie ;(
		document.getElementById('fullboxpersonal').style.top=document.documentElement.scrollTop+'px';
		}
	chiama(cosa,'fullboxpersonalcontent');
	}


// per il cale
function giorniAlMese(mese,anno)
        {
	var gio=Array (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
	if(mese!=2) return gio[mese-1];
	var ok=new Date();
	ok.setDate(29);
	ok.setMonth(1);
	ok.setFullYear(anno);
	if(ok.getDate()==29) return 29; else return 28;
	}

// verticale

function calendario(quale,gg,mm,aa,start,giorniok)
        {
	var mesi=Array ('Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre');
//	var controllogg=Array ();
	//controllogg=giorniok.split(",");
	msg="";
	oggi=new Date();
	if(mm==0 && aa==0)
		{
		inizio=new Date();
		gg=inizio.getDate();
		mm=inizio.getMonth();
		mm++;
		aa=inizio.getFullYear();
		}
	inizio=new Date();
	inizio.setDate(gg);
	inizio.setMonth(mm-1);
	inizio.setFullYear(aa);
	nextMonth=mm+1;
	nextYear=aa;
	if(nextMonth>12) { nextMonth=1; nextYear++; }
	prevMonth=mm-1;
	prevYear=aa;
	if(prevMonth<1) { prevMonth=12; prevYear--; }
	var numeroGiorni=giorniAlMese(mm,aa);
	inizio.setDate(1);
	giornoInizio=inizio.getDay();
	if(giornoInizio==0) giornoInizio=7;
	settimana=0;
	msg=msg+"<table style=\"\" align=center cellpadding=0 cellspacing=0 border=0> <tr><td style=\"border-bottom:1px solid #414141;text-transform:capitalize;color:#000\" colspan=7>Inaugurazioni&nbsp;|&nbsp;<a href=\"javascript:calendarioincorso('"+quale+"',"+gg+","+mm+","+aa+","+start+",'"+giorniok+"')\">In&nbsp;corso</a></td></tr> <tr><td style=\"border-bottom:1px solid #414141\">";
	if(prevYear>1998)
	msg=msg+"<a href=\"javascript:calendario('"+quale+"',1,"+prevMonth+","+prevYear+",0,'"+giorniok+"')\"><img src=\"img/freccina-calend-sx.png\" border=0></a>";
	msg=msg+"</td><td colspan=5 align=center style=\"color:#414141;border-bottom:1px solid #414141;font-size:11px;letter-spacing:0px;text-transform:capitalize\">";
	msg=msg+mesi[mm-1]+" "+aa+"</td><td style=\"border-bottom:1px solid #414141\">";
	if(nextYear<=(oggi.getFullYear()+1))
	msg=msg+"<a href=\"javascript:calendario('"+quale+"',1,"+nextMonth+","+nextYear+",0,'"+giorniok+"')\"><img src=\"img/freccina-calend-dx.png\" border=0></a>";
	msg=msg+"</td></tr><tr style=\"color:#414141\"><td style=\"border-bottom:1px solid #414141\">l</td><td style=\"border-bottom:1px solid #414141\">m</td><td style=\"border-bottom:1px solid #414141\">m</td><td style=\"border-bottom:1px solid #414141\">g</td><td style=\"border-bottom:1px solid #414141\">v</td><td style=\"border-bottom:1px solid #414141\">s</td><td style=\"border-bottom:1px solid #414141\">d</td></tr>";
	for(scarto=1;scarto<=(giornoInizio-1);scarto++)
		{
		msg=msg+"<td>&nbsp;</td>";
		settimana++;
		}
	for(g=1;g<=numeroGiorni;g++)
		{
		if(g==oggi.getDate() && mm==(oggi.getMonth()+1) && aa==oggi.getFullYear())
		msg=msg+"<td style=\"border:1px solid #ff3300;background:#ff3300\"><a href=\"/it/?d="+g+"&m="+mm+"&Y="+aa+"#"+quale+"\" style=\"color:white\">"+g+"</a></td>";
		else if (start==1 && g==gg)
		msg=msg+"<td style=\"border:1px solid #ffa000;background:#ffa000\"><a href=\"javascript:window.location.reload()\" style=\"color:#414141\">"+g+"</a></td>";
		else if ((aa<oggi.getFullYear()) || (aa==oggi.getFullYear() && mm<(oggi.getMonth()+1)) || (aa==oggi.getFullYear() && mm<=(oggi.getMonth()+1) && g<oggi.getDate()))
			msg=msg+"<td><a href=\"/it/?d="+g+"&m="+mm+"&Y="+aa+"#"+quale+"\">"+g+"</a></td>";
		else
			{
			if(giorniok.indexOf(','+g+'-'+mm+'-'+aa+',')>=0)
			msg=msg+"<td><a href=\"/it/?d="+g+"&m="+mm+"&Y="+aa+"#"+quale+"\">"+g+"</a></td>";
			else
			msg=msg+"<td style=\"color:#ddd\">"+g+"</td>";
			}
		settimana++;
		if(settimana==7)
			{
			msg=msg+"</tr><tr>";
			settimana=0;
			}
		}
	msg=msg+"</tr><tr><td colspan=7 style=\"border-top:1px solid #414141\">&nbsp;</td></tr></table>";
	document.getElementById("cal"+quale+"cont").innerHTML=msg;
	}

function calendarioincorso(quale,gg,mm,aa,start,giorniok)
        {
	var mesi=Array ('Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre');
//	var controllogg=Array ();
	//controllogg=giorniok.split(",");
	msg="";
	oggi=new Date();
	if(mm==0 && aa==0)
		{
		inizio=new Date();
		gg=inizio.getDate();
		mm=inizio.getMonth();
		mm++;
		aa=inizio.getFullYear();
		}
	inizio=new Date();
	inizio.setDate(gg);
	inizio.setMonth(mm-1);
	inizio.setFullYear(aa);
	nextMonth=mm+1;
	nextYear=aa;
	if(nextMonth>12) { nextMonth=1; nextYear++; }
	prevMonth=mm-1;
	prevYear=aa;
	if(prevMonth<1) { prevMonth=12; prevYear--; }
	var numeroGiorni=giorniAlMese(mm,aa);
	inizio.setDate(1);
	giornoInizio=inizio.getDay();
	if(giornoInizio==0) giornoInizio=7;
	settimana=0;
	msg=msg+"<table style=\"\" align=center cellpadding=0 cellspacing=0 border=0> <tr><td style=\"border-bottom:1px solid #414141;text-transform:capitalize;color:#000\" colspan=7><a href=\"javascript:calendario('"+quale+"',"+gg+","+mm+","+aa+","+start+",'"+giorniok+"')\">Inaugurazioni</a>&nbsp;|&nbsp;In&nbsp;corso</td></tr> <tr><td style=\"border-bottom:1px solid #414141\">";
	if(prevYear>1998)
	msg=msg+"<a href=\"javascript:calendarioincorso('"+quale+"',1,"+prevMonth+","+prevYear+",0,'"+giorniok+"')\"><img src=\"img/freccina-calend-sx.png\" border=0></a>";
	msg=msg+"</td><td colspan=5 align=center style=\"color:#414141;border-bottom:1px solid #414141;font-size:11px;letter-spacing:0px;text-transform:capitalize\">";
	msg=msg+mesi[mm-1]+" "+aa+"</td><td style=\"border-bottom:1px solid #414141\">";
	if(nextYear<=(oggi.getFullYear()+1))
	msg=msg+"<a href=\"javascript:calendarioincorso('"+quale+"',1,"+nextMonth+","+nextYear+",0,'"+giorniok+"')\"><img src=\"img/freccina-calend-dx.png\" border=0></a>";
	msg=msg+"</td></tr><tr style=\"color:#414141\"><td style=\"border-bottom:1px solid #414141\">l</td><td style=\"border-bottom:1px solid #414141\">m</td><td style=\"border-bottom:1px solid #414141\">m</td><td style=\"border-bottom:1px solid #414141\">g</td><td style=\"border-bottom:1px solid #414141\">v</td><td style=\"border-bottom:1px solid #414141\">s</td><td style=\"border-bottom:1px solid #414141\">d</td></tr>";
	for(scarto=1;scarto<=(giornoInizio-1);scarto++)
		{
		msg=msg+"<td>&nbsp;</td>";
		settimana++;
		}
	for(g=1;g<=numeroGiorni;g++)
		{
		if(g==oggi.getDate() && mm==(oggi.getMonth()+1) && aa==oggi.getFullYear())
		msg=msg+"<td style=\"border:1px solid #ff3300;background:#ff3300\"><a href=\"/it/?eventi=incorso#"+quale+"\" style=\"color:white\">"+g+"</a></td>";
		else if (start==1 && g==gg)
		msg=msg+"<td style=\"border:1px solid #ffa000;background:#ffa000\"><a href=\"/it/?eventi=incorso&icd="+g+"&icm="+mm+"&icy="+aa+"#"+quale+"\" style=\"color:#414141\">"+g+"</a></td>";
		else
			msg=msg+"<td><a href=\"/it/?eventi=incorso&icd="+g+"&icm="+mm+"&icy="+aa+"#"+quale+"\">"+g+"</a></td>";
		settimana++;
		if(settimana==7)
			{
			msg=msg+"</tr><tr>";
			settimana=0;
			}
		}
	msg=msg+"</tr><tr><td colspan=7 style=\"border-top:1px solid #414141\">&nbsp;</td></tr></table>";
	document.getElementById("cal"+quale+"cont").innerHTML=msg;
	}

var slidepointita=1;
var slidepointest=1;
function nextslide(dove,quanti)
	{
	if(dove=="ita") slidepoint=slidepointita; else slidepoint=slidepointest;
	if((slidepoint+6)<=quanti)
	{
	for(i=slidepoint;i<slidepoint+6;i++)
		{
		if(i<=quanti)
		//$('#boxevento'+dove+i).hide('fast');
		document.getElementById('boxevento'+dove+i).style.display='none';
		}
	for(i=slidepoint+6;i<slidepoint+12;i++)
		{
		if(i<=quanti)
		//$('#boxevento'+dove+i).show('fast');
		document.getElementById('boxevento'+dove+i).style.display='block';
		}
	slidepoint=slidepoint+6;
	if(slidepoint==7) document.getElementById("slideindietroimg"+dove).src='img/freccia-sx.png';
	if(slidepoint>quanti-6) document.getElementById("slideavantiimg"+dove).src='img/freccia-dx-spento.png';
	if(dove=="ita") slidepointita=slidepoint; else slidepointest=slidepoint;
	}
	}
function prevslide(dove,quanti)
	{
	if(dove=="ita") slidepoint=slidepointita; else slidepoint=slidepointest;
	if((slidepoint-6)>0)
	{
	for(i=slidepoint;i<slidepoint+6;i++)
		{
		if(i<=quanti)
		document.getElementById('boxevento'+dove+i).style.display='none';
		}
	for(i=slidepoint-6;i<(slidepoint);i++)
		{
		if(i<=quanti)
		document.getElementById('boxevento'+dove+i).style.display='block';
		//$('#boxevento'+dove+i).show('fast');
		}
	slidepoint=slidepoint-6;
	if(slidepoint==1) document.getElementById("slideindietroimg"+dove).src='img/freccia-sx-spento.png';
	if(slidepoint<quanti) document.getElementById("slideavantiimg"+dove).src='img/freccia-dx.png';
	if(dove=="ita") slidepointita=slidepoint; else slidepointest=slidepoint;
	}
	}
function visuatutti(dove,quanti)
	{
	for(i=1;i<=quanti;i++)
		{
		//document.getElementById('boxevento'+dove+i).style.display='block';
		$('#boxevento'+dove+i).show('fast');
		}
	}

/*
function pgS(s) {
var o='<'+'script src="http://api.visual.paginegialle.it/tcolnew/mapsapi/'+s+'"'+' type="text/javascript"><'+'/script>';
document.write(o);
}
pgS('jquery-1.3.2.js');
*/
	         // pgS('mapsapi2/pgMappy-2.3.8.min.js');
		 //    // if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) {pgS('excanvas.js');}
		 //

function pgS(s) {
  var o='<'+'script src="/it/'+s+'"'+' type="text/javascript"><'+'/script>';
      document.write(o);
          }
	      pgS('jquery-1.4.4.min.js');
	         // pgS('mapsapi2/pgMappy-2.3.8.min.js');



