var valore = 0;

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function visualizzaMenu()
{
	if (valore == 0){
	document.getElementById("musei").innerHTML="<table width=250 border=0 cellspacing=0 cellpadding=0>"
 +" <tr>"
 +"   <td colspan=3 bgcolor=#9ebad0>&nbsp;</td>"
 +" </tr>"
 +" <tr>"
 +"   <td><a onclick=caricaMuseo(9) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('POSTbutton','','images/Home-buttons/post-on.gif',1)><img src=images/Home-buttons/post-off.gif alt=POST name=POSTbutton width=280 height=40 border=0 id=POSTbutton /></a></td>"
 +" </tr>"
   +" <tr>"
 +"   <td><a onclick=caricaMuseo(6) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Archeologico','','images/Home-buttons/archeologico-on.gif',1)><img src=images/Home-buttons/archeologico-off.gif alt='Museo Archeologico Nazionale dell&quot;Umbria' name=Archeologico width=280 height=40 border=0 id=Santi /></a></td>"
 +" </tr>"
  +" <tr>"
 +"   <td><a onclick=caricaMuseo(7) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Penna','','images/Home-buttons/penna-on.gif',1)><img src=images/Home-buttons/penna-off.gif alt='Palazzo Penna' name=Penna width=280 height=40 border=0 id=Penna /></a></td>"
 +" </tr>"
 +" <tr>"
 +"   <td><a onclick=caricaMuseo(1) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Acque','','images/Home-buttons/acque-on.gif',1)><img src=images/Home-buttons/acque-off.gif alt='Museo delle Acque di Monte Pacciano' name=Acque width=280 height=40 border=0 id=Acque /></a></td>"
 +" </tr>"
 +" <tr>"
 +"   <td><a onclick=caricaMuseo(16) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Olivo','','images/Home-buttons/olivo-on.gif',1)><img src=images/Home-buttons/olivo-off.gif alt='Museo dell'Olivo e dell'Olio' name=Olivo width=280 height=40 border=0 id=Olivo /></a></td>"
 +" </tr>"
  +" <tr>"
 +"   <td><a onclick=caricaMuseo(8) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Pesca','','images/Home-buttons/pesca-on.gif',1)><img src=images/Home-buttons/pesca-off.gif alt='Museo della Pesca' name=Pesca width=280 height=40 border=0 id=Pesca /></a></td>"
 +" </tr>"
 +" <tr>"
 +"   <td><a onclick=caricaMuseo(13) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Carta','','images/Home-buttons/carta-on.gif',1)><img src=images/Home-buttons/carta-off.gif alt='Museo della Carta e della Filigrana' name=Carta width=280 height=40 border=0 id=Carta /></a></td>"
 +" </tr>"
 +" <tr>"
 +"   <td><a onclick=caricaMuseo(17) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Carifac','','images/Home-buttons/carifac-on.gif',1)><img src=images/Home-buttons/carifac-off.gif alt='Palazzo Fondazione Carifac' name=Carifac width=280 height=40 border=0 id=Carifac /></a></td>"
 +" </tr>"
 +" <tr>"
 +"   <td><a onclick=caricaMuseo(11) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Science','','images/Home-buttons/science-on.gif',1)><img src=images/Home-buttons/science-off.gif alt='Immaginario Scientifico di Trieste' name=Science width=280 height=40 border=0 id=Science /></a></td>"
 +" </tr>"
 +" <tr>"
 +"   <td colspan=3 bgcolor=#9ebad0>&nbsp;</td>"
 +" </tr>"
+"</table>";
	document.getElementById("musei").style.visibility="visible";
	document.getElementById("content-testo2").style.visibility="hidden";
	valore  =1;
	}
	else if (valore == 1){
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.getElementById("content-testo2").style.visibility="visible";
		valore = 0;
	}
}

function caricaMuseo(value)
{
	if (value == 0)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-antiquarium.html";
	}
	else if (value == 1)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-acque.html";
	}
	else if (value == 2)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-dinamico.html";
	}
	else if (value == 3)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-galleria.html";
	}
	else if (value == 4)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-faina.html";
	}
	else if (value == 5)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-canapa.html";
	}
	else if (value == 6)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-archeologico.html";
	}
	else if (value == 7)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-penna.html";
	}
	else if (value == 8)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-pesca.html";
	}
	else if (value == 9)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-post.html";
	}
	else if (value == 10)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-biblioteca.html";
	}
	else if (value == 11)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-science.html";
	}
	else if (value == 12)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-baldeschi.html";
	}
	else if (value == 13)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-carta.html";
	}
	else if (value == 14)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-civica.html";
	}
	else if (value == 15)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-fidelia.html";
	}
	else if (value == 16)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-olivo.html";
	}
	else if (value == 17)
	{
		document.getElementById("musei").innerHTML="";
		document.getElementById("musei").style.visibility="hidden";
		document.location.href="sognando-carifac.html";
	}
}

function visualizzaMenu2(value)
{
	var string;
	if (valore == 0){
	string = "<table width=250 border=0 cellspacing=0 cellpadding=0>"
 +" <tr>"
 +"   <td width=20 rowspan=12 bgcolor=#9ebad0>&nbsp;</td>"
 +"   <td bgcolor=#9ebad0>&nbsp;</td>"
 +"   <td width=20 rowspan=12 bgcolor=#9ebad0>&nbsp;</td>"
 +" </tr>";
	if (value != 9)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(9) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('POSTbutton','','images/Home-buttons/post-on.gif',1)><img src=images/Home-buttons/post-off.gif alt='Perugia Officina per la Scienza e la Tecnologia' name=POSTbutton width=280 height=40 border=0 id=POSTbutton /></a></td>"
 +" </tr>";
	}
	/**
	if (value != 12)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(12) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Baldeschi','','images/Home-buttons/baldeschi-on.gif',1)><img src=images/Home-buttons/baldeschi-off.gif alt='Palazzo Baldeschi al Corso' name=Baldeschi width=280 height=40 border=0 id=Baldeschi /></a></td>"
 +" </tr>";
	}
	if (value != 3)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(3) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Galleria','','images/Home-buttons/galleria-on.gif',1)><img src=images/Home-buttons/galleria-off.gif alt='Galleria Nazionale dell'Umbria' name=Galleria width=280 height=40 border=0 id=Galleria /></a></td>"
 +" </tr>";
	}**/
	if (value != 6)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(6) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Archeologico','','images/Home-buttons/archeologico-on.gif',1)><img src=images/Home-buttons/archeologico-off.gif alt='Museo Archeologico Nazionale dell&quot;Umbria' name=Archeologico width=280 height=40 border=0 id=Archeologico /></a></td>"
 +" </tr>";
	}
	if (value != 7)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(7) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Penna','','images/Home-buttons/penna-on.gif',1)><img src=images/Home-buttons/penna-off.gif alt='Palazzo Penna' name=Penna width=280 height=40 border=0 id=Penna /></a></td>"
 +" </tr>";
	}
	if (value != 1)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(1) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Acque','','images/Home-buttons/acque-on.gif',1)><img src=images/Home-buttons/acque-off.gif alt='Museo delle Acque di Monte Pacciano' name=Acque width=280 height=40 border=0 id=Acque /></a></td>"
 +" </tr>";
	}
	/**
	if (value != 0)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(0) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Antiquarium','','images/Home-buttons/antiquarium-on.gif',1)><img src=images/Home-buttons/antiquarium-off.gif alt='Antiquarium Comunale' name=Antiquarium width=280 height=40 border=0 id=Antiquarium /></a></td>"
 +" </tr>";
	}
	if (value != 10)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(10) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Biblioteca','','images/Home-buttons/biblioteca-on.gif',1)><img src=images/Home-buttons/biblioteca-off.gif alt='Biblioteca Comunale Luigi Salvatorelli' name=Biblioteca width=280 height=40 border=0 id=Biblioteca /></a></td>"
 +" </tr>";
	}
	if (value != 4)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(4) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Faina','','images/Home-buttons/faina-on.gif',1)><img src=images/Home-buttons/faina-off.gif alt='Museo Claudio Faina' name=Faina width=280 height=40 border=0 id=Faina /></a></td>"
 +" </tr>";
	}
	if (value != 5)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(5) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Canapa','','images/Home-buttons/canapa-on.gif',1)><img src=images/Home-buttons/canapa-off.gif alt='Eco-Museo della Canapa' name=Canapa width=280 height=40 border=0 id=Canapa /></a></td>"
 +" </tr>";
	}
	if (value != 2)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(2) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Dinamico','','images/Home-buttons/dinamico-on.gif',1)><img src=images/Home-buttons/dinamico-off.gif alt='Museo Dinamico del Laterizio e delle Terrecotte' name=Dinamico width=280 height=40 border=0 id=Dinamico /></a></td>"
 +" </tr>";
	}*/
	if (value != 16)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(16) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Olivo','','images/Home-buttons/olivo-on.gif',1)><img src=images/Home-buttons/olivo-off.gif alt='Museo dell'Olivo e dell'Olio' name=Olivo width=280 height=40 border=0 id=Olivo /></a></td>"
 +" </tr>";
	}
	if (value != 8)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(8) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Pesca','','images/Home-buttons/pesca-on.gif',1)><img src=images/Home-buttons/pesca-off.gif alt='Museo della Pesca del Lago Trasimeno' name=Pesca width=280 height=40 border=0 id=Pesca /></a></td>"
 +" </tr>";
	}
	if (value != 13)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(13) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Carta','','images/Home-buttons/carta-on.gif',1)><img src=images/Home-buttons/carta-off.gif alt='Museo della Carta e della FIligrana' name=Carta width=280 height=40 border=0 id=Carta /></a></td>"
 +" </tr>";
	}
	/*if (value != 14)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(14) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Civica','','images/Home-buttons/civica-on.gif',1)><img src=images/Home-buttons/civica-off.gif alt='Galleria Civica d'Arte Moderna' name=Civica width=280 height=40 border=0 id=Civica /></a></td>"
 +" </tr>";
	}
	if (value != 15)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(15) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Fidelia','','images/Home-buttons/fidelia-on.gif',1)><img src=images/Home-buttons/fidelia-off.gif alt='Villa Fidelia' name=Fidelia width=280 height=40 border=0 id=Fidelia /></a></td>"
 +" </tr>";
	}*/
	if (value != 17)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(17) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Carifac','','images/Home-buttons/carifac-on.gif',1)><img src=images/Home-buttons/carifac-off.gif alt='Palazzo FOndazione Carifac' name=Carifac width=280 height=40 border=0 id=Carifac /></a></td>"
 +" </tr>";
	}
	if (value != 11)
	{
 string = string +" <tr>"
 +"   <td><a onclick=caricaMuseo2(11) onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Science','','images/Home-buttons/science-on.gif',1)><img src=images/Home-buttons/science-off.gif alt='Immaginario Scientifico di Trieste' name=Science width=280 height=40 border=0 id=Science /></a></td>"
 +" </tr>";
	}
 string = string +" <tr>"
 +"   <td width=20 rowspan=11 bgcolor=#9ebad0>&nbsp;</td>"
 +"   <td bgcolor=#9ebad0>&nbsp;</td>"
 +"   <td width=20 rowspan=11 bgcolor=#9ebad0>&nbsp;</td>"
 +" </tr>"
+"</table>";
	document.getElementById("musei2").innerHTML= string;
	document.getElementById("musei2").style.visibility="visible";
	//if (value==1 || value==5 || value==7 || value==9)
	//{
		document.getElementById("content-testo").style.visibility="hidden";
	//}
	//else
	//{
	//	document.getElementById("content-testo-lungo").style.visibility="hidden";
	//}
	document.getElementById("titolo").style.visibility="hidden";
	valore  =1;
	}
	else if (valore == 1){
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		//if (value==1 || value==5 || value==7 || value==9)
		//{
			document.getElementById("content-testo").style.visibility="visible";
		//}
		//else
		//{
		//	document.getElementById("content-testo-lungo").style.visibility="visible";
		//}
		document.getElementById("titolo").style.visibility="visible";
		valore = 0;
	}
}

function caricaMuseo2(value)
{
	if (value == 0)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-antiquarium.html";
	}
	if (value == 1)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-acque.html";
	}
	if (value == 2)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-dinamico.html";
	}
	if (value == 3)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-galleria.html";
	}
	if (value == 4)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-faina.html";
	}
	if (value == 5)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-canapa.html";
	}
	if (value == 6)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-archeologico.html";
	}
	if (value == 7)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-penna.html";
	}
	if (value == 8)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-pesca.html";
	}
	if (value == 9)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-post.html";
	}

	if (value == 10)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-biblioteca.html";
	}
	if (value == 11)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-science.html";
	}
	if (value == 12)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-baldeschi.html";
	}
	if (value == 13)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-carta.html";
	}
	if (value == 14)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-civica.html";
	}
	if (value == 15)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-fidelia.html";
	}
	if (value == 16)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-olivo.html";
	}
	if (value == 17)
	{
		document.getElementById("musei2").innerHTML="";
		document.getElementById("musei2").style.visibility="hidden";
		document.location.href="sognando-carifac.html";
	}
}

function setCookie(name, value, expire) 
	{
		document.cookie = name + "=" + escape(value) +((expire==null) ? "": ("; expires=" + expire.toGMTString()));
	}

function getCookie(Name)
	{		
		var search = Name + "=";
		if(document.cookie.length >0)
		{
			offset = document.cookie.indexOf(search);
			
			if (offset != -1)
			{
				offset += search.length;
				end = document.cookie.indexOf(";",offset);
				if (end == -1)
					end = document.cookie.length;
				return unescape(document.cookie.substring(offset, end));
			}
		}
	}
	
function verifLog()
{
	
	if (document.cookie.length != 0)
	{
		var nome = getCookie("user");
		if(nome== null)
		{
			window.alert("Effettuare il login!");
			document.location.href="home.html";
		}
		
	}
	else
	{
			window.alert("Effettuare il login!");
			document.location.href="home.html";
	}
}

function verify()
	{
		var password = document.getElementById("password").value;
		if(password=="")
		{
			document.getElementById("erroreLogin").style.visibility='visible';
			document.formLogin.password.value=document.formLogin.password.defaultValue;
		}
		else
		{
			if(password == "post01" || password == "post02" || password == "post03" || password == "post04" || password == "post05" || password == "post06" || password == "post07" || password == "post08" || password == "post09" || password == "post10" || password == "post11" || password == "post12" || password == "post13" || password == "post14" || password == "post15" || password == "post16" || password == "post17" || password == "post18" || password == "post19" || password == "post20" || password == "post21" || password == "post22" || password == "post23" || password == "post24" || password == "post25")
			{
				setCookie("user","sognando-post", null);
				document.location.href="sognando-photogallery-post.html";
			}
			else if(password == "penna01" || password == "penna02" || password == "penna03" || password == "penna04" || password == "penna05" || password == "penna06" || password == "penna07" || password == "penna08" || password == "penna09" || password == "penna10" || password == "penna11" || password == "penna12" || password == "penna13" || password == "penna14" || password == "penna15" || password == "penna16" || password == "penna17" || password == "penna18" || password == "penna19" || password == "penna20" || password == "penna21" || password == "penna22" || password == "penna23" || password == "penna24" || password == "penna25")
			{
				setCookie("user","sognando-penna", null);
				document.location.href="sognando-photogallery-penna.html";
			}
			else if(password == "pesca01" || password == "pesca02" || password == "pesca03" || password == "pesca04" || password == "pesca05" || password == "pesca06" || password == "pesca07" || password == "pesca08" || password == "pesca09" || password == "pesca10" || password == "pesca11" || password == "pesca12" || password == "pesca13" || password == "pesca14" || password == "pesca15")
			{
				setCookie("user","sognando-pesca", null);
				document.location.href="sognando-photogallery-pesca.html";
			}
			else if(password == "trinci01" || password == "trinci02" || password == "trinci03" || password == "trinci04" || password == "trinci05" || password == "trinci06" || password == "trinci07" || password == "trinci08" || password == "trinci09" || password == "trinci10" || password == "trinci11" || password == "trinci12" || password == "trinci13" || password == "trinci14" || password == "trinci15" || password == "trinci16" || password == "trinci17" || password == "trinci18" || password == "trinci19" || password == "trinci20" || password == "trinci21" || password == "trinci22" || password == "trinci23" || password == "trinci24" || password == "trinci25" || password == "trinci26" || password == "trinci27" || password == "trinci28" || password == "trinci29" || password == "trinci30" || password == "trinci31" || password == "trinci32" || password == "trinci33" || password == "trinci34" || password == "trinci35" || password == "trinci36" || password == "trinci37" || password == "trinci38" || password == "trinci39" || password == "trinci40" || password == "trinci41" || password == "trinci42" || password == "trinci43" || password == "trinci44" || password == "trinci45" || password == "trinci46" || password == "trinci47" || password == "trinci48" || password == "trinci49" || password == "trinci50" || password == "trinci51" || password == "trinci52" || password == "trinci53" || password == "trinci54" || password == "trinci55")
			{
				setCookie("user","sognando-trinci", null);
				document.location.href="sognando-photogallery-trinci.html";
			}
			else if(password == "vallemani01" || password == "vallemani02" || password == "vallemani03" || password == "vallemani04" || password == "vallemani05" || password == "vallemani06" || password == "vallemani07" || password == "vallemani08" || password == "vallemani09" || password == "vallemani10" || password == "vallemani11" || password == "vallemani12" || password == "vallemani13" || password == "vallemani14" || password == "vallemani15")
			{
				setCookie("user","sognando-vallemani", null);
				document.location.href="sognando-photogallery-vallemani.html";
			}
			else
			{
				document.getElementById("erroreLogin").style.visibility='visible';
				document.formLogin.password.value=document.formLogin.password.defaultValue;
			}
		}
	}

function ok()
{
	document.getElementById("erroreLogin").style.visibility='hidden';
}

function logoutUser()
{ 
	var expires = new Date(0);
	setCookie("user",null,expires);
	document.location.href="home.html"
}

