<!--
	document.write('<META http-equiv="Page-Enter" CONTENT="progid:DXImageTransform.Microsoft.Fade(Duration=0.5)">');
	document.write('<META http-equiv="Page-Exit" CONTENT="progid:DXImageTransform.Microsoft.Fade(Duration=0.5)">');
//-->

// --- FUNZIONI NASCONDI-VISUALIZZA DIV

function getEl(id)
{
    element = document.getElementById(id);

    return element;
}

function hideEl(id)
{
    var element = getEl(id);

    element.style.display = 'none';
}

function showEl(id)
{
    var element = getEl(id);

    element.style.display = '';
}

function ShowHide(sid, last)
{
    var el = 'info_' + sid;

    if(getEl(el).style.display == 'none')
    {
        showEl(el);
        getEl('href_' + sid).innerHTML = '<img border=\"0\" src=\"immagini/fr.gif\"> Meno informazioni';
    }
    else
    {
        hideEl(el);
        getEl('href_' + sid).innerHTML = '<img border=\"0\" src=\"immagini/fr.gif\"> Pi&ugrave; informazioni';
    }
}

// --- FUNZIONI NASCONDI-VISUALIZZA DIV

function popupLogin() {
	// check to make sure a valid username has been entered
	// the size of the popup window
	var width = 800;
	var height = 600;

	// the x,y position of the popup window
	// NOTE: this formula will auto-center the popup on the screen
	var y = (screen.height - height) / 2;
	var x = (screen.width - width) / 2;

	var indi = "chat/flashchat.php?username=__random__&lang=it";
	var options = "width=" + width + ",height=" + height + ",top=" + y + ",left=" + x + ",resizable";

	// open the chat window as a popup, instead of embedded in webpage
	window.open( indi, "chat", options );
}
//-->



var aa=null;
var foto=null;

function vai(url, nome, opzioni){
foto=window.open(url,nome,opzioni)
foto.focus();
}

function apri(url)
	{
	aa=window.open(url,'aa','toolbar=no,width='+(screen.Width)+',height='+(screen.Height)+', directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	aa.focus();
	}


/* Preferiti */

var bookmarkurl="http://www.distretto2110.org"
var bookmarktitle="Il portale del Distretto 2110"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

/* Fine Preferiti */

/* OROLOGIO */

var dayarray=new Array("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato")
var montharray=new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre")

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate="<small><font color='000000' face='Arial'><b>Benvenuti oggi è "+dayarray[day]+" "+daym+" "+montharray[month]+" "+year+" e sono le ore "+hours+":"+minutes+":"+seconds+" "+dn
+"</b></font></small>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}

/* FINE OROLOGIO */

/* MENU */

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

/* FINE MENU */

