function setCookie(NameOfCookie, value, expiredays)
{

// Servono tre variabili per creare il nuovo cookie.
// Il nome del cookie, il valore da memorizzare,
// e infine il numero di giorni fino alla scadenza del cookie.
// Le prime righe nella funzione convertono il numero dei giorni in una data
// valida.

var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

// La riga seguente memorizza il cookie, semplicemente
// assegnandogli
// i valori dell'oggetto "document.cookie".
// Nota che la data è riportata all'ora del Meridiano di Greenwich usando
// la funzione "toGMTstring()".

document.cookie = NameOfCookie + "=" + escape(value) +
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
self.location.replace(document.URL);
}


navHover = function() {
	var lis = document.getElementById("navmenu").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);
if (document.getElementById) { 
	document.getElementById('stylemenu').style.display="block";
}
function setFontSize(value) {
	theStyle = null;
	if (value == "small") theStyle 	= "70%";
	if (value == "medium") theStyle 	= "80%";
	if (value == "large") theStyle 	= "90%";
	if (theStyle) 
		document.getElementsByTagName("body")[0].style.fontSize = theStyle;
}

function clearloginbox()	{
document.forms["loginbox"].password.value='';
document.forms["loginbox"].username.value='';
}


function css()	{
onmouseover=window.css.src='assets/css.gif';
onmouseout=window.css.src='assets/cssbg.gif';
}
function clearnewsbox()	{
document.forms["newsletterbox"].news.value='';
}

function clearnewsletterbox()	{
document.forms["newsletterform"].newsletter.value='';
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function stampa()	{
window.print();
}

function viewstyle(stile)	{
	window.open(stile,'','width=1024,height=768,scrollbars=yes,resizable=yes');
}

function viewprivacy()	{
	window.open('privacy.php','','width=1024,height=900,scrollbars=yes,resizable=yes');
}

function viewlegal()	{
	window.open('legal.php','','width=1024,height=900,scrollbars=yes,resizable=yes');
}

function ringraziamenti()	{
	window.open('ringraziamenti.php','','width=800,height=550,scrollbars=yes,resizable=yes');
}

function notsdx()
	{
	alert('Azione non consetita. Ti ricordiamo che le immagini sono protette da copyright. Leggi "Note legali"');
	return(false);
	}
