	function popup()
	{
		window.open('pagina.html','NomePopup','resizable=no,width=300,height=200')
	}

	function countdown()
	{
		iniData= new Date(2010,03,18,00,00,00); // data inizio sequenza mesi-1 es. set=8
		oggi= new Date();
		//oggi.setHours(1,1,1,0) ;
		iniDataIt=iniData.getDate()+'-'+(iniData.getMonth()+1)+'-'+iniData.getFullYear()+' '+iniData.getHours()+':'+iniData.getMinutes()+':'+iniData.getSeconds();
		milDif=(iniData-oggi)
		giorni=parseInt(milDif/86400000);
		milDif=milDif-(giorni*86400000); //millisecondi restanti tolti i giorni
		ore=parseInt(milDif/3600000);
		milDif=milDif-(ore*3600000); //millisecondi restanti tolti i giorni
		minuti=parseInt(milDif/60000);
		milDif=milDif-(minuti*60000); //millisecondi restanti tolti i giorni
		secondi=parseInt(milDif/1000);
		milDif=milDif-(secondi*1000); //millisecondi restanti tolti i giorni
		giorni=giorni*1;
		ore=ore*1;
		minuti=minuti*1;
		secondi=secondi*1;
		testo="<table cellpadding=6><tr><td align=center><hr><br><font size='4' color=\""+coloresfondo+"\"><center><b>Informatica Valdinievole </b></center></font><font size='4' color=\""+coloresfondo+"\">ricorda ai clienti che per poter effettuare il <b>Login</b> sul nuovo sito ed usufruire di tutte le novit&agrave; che il </font><center><font  color=\""+coloresfondo+"\" size=\"4\"><b>CENTRO SERVIZI WEB&nbsp;<img  src=\"images/sivshad.png\" border=0 width='33px' height='28px'>&nbsp;</b></font></center><font size='4' color=\""+coloresfondo+"\">mette a Vostra disposizione &egrave; necessario effettuare una nuova <a href='javascript:CaricaLetteraRegistrazione();'><u>Registrazione</u></a>.</font><br><br><hr><br><center><font size='4' color=\""+coloresfondo+"\"> Il <a href=\"http://www.iv-srl.it/old\" href='_new'><u>link alla versione precedente del sito</u></a> sar&agrave; attivo fino al </font></center><font size='5' color=\""+coloresfondo+"\"><center><b>17 aprile</b></center><center><b>I giorni restanti sono "+giorni+"</b></center></font><hr> </td></tr></table>";
		//alert(testo); //commentare
		//return testo
		var doc=document.getElementById('dt');
		if (doc!=undefined && doc)
		  doc.innerHTML=testo;
		
		
		
	}
	function ProvaPar()
	{
		document.write("<h1>This is a header</h1>");
		document.write("<p>This is a paragraph</p>");
		document.write("<p>This is another paragraph</p>");
	}
	function Message()
	{
		alert("Butta giù le manii!");
	}
	function startTime()
	{
		var today=new Date();
		var h=today.getHours();
		var m=today.getMinutes();
		var s=today.getSeconds();
		// add a zero in front of numbers<10
		m=checkTime(m);
		s=checkTime(s);
		document.getElementById('txt').innerHTML=h+":"+m+":"+s;
		t=setTimeout('startTime()',500);
	}

	function checkTime(i)
	{
	if (i<10)
	  {
	  i="0" + i;
	  }
	return i;
	}

	function writeText(txt)
	{
		document.getElementById("desc").innerHTML=txt;
	}
	function whichButton(event)
	{
		alert(event.keyCode);
	}
	var x = 0; var timer; 
      function starttimeout()
      {
	timer = setTimeout("countdown()",500);	
      }

      function stoptimeout()	
      {
	clearTimeout(timer);
      }


function weekNo()
{
	var totalDays = 0;
	now = new Date();
	years=now.getYear();
	var days = new Array(12); // Array to hold the total days in a month
	days[0] = 31;
	days[2] = 31;
	days[3] = 30;
	days[4] = 31;
	days[5] = 30;
	days[6] = 31;
	days[7] = 31;
	days[8] = 30;
	days[9] = 31;
	days[10] = 30;
	days[11] = 31;

	// Check to see if this is a leap year
	if (Math.round(now.getYear()/4) == now.getYear()/4) {
	days[1] = 29
	}else{
	days[1] = 28
	}

	// If this is January no need for any fancy calculation otherwise figure out the
	// total number of days to date and then determine what week
	if (now.getMonth() == 0) {
	totalDays = totalDays + now.getDate();
	}else{
	var curMonth = now.getMonth();
	for (var count = 1; count <= curMonth; count++) {
	totalDays = totalDays + days[count - 1];
	}
	totalDays = totalDays + now.getDate();
	}
	// Here is the modification: considering when start the 1st week of year.
	// Originally was only: var week = Math.round(totalDays/7)
	// Check if browser is "Microsoft Internet Explorer" or not and apply the right var
	var agt=navigator.userAgent.toLowerCase();
	if ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)) {
	var firstday=new Date("01/01/"+String(now.getYear())).getDay();
	}
	else {
	var firstday=new Date("01/01/"+String(1900+now.getYear())).getDay();
	}
	var diff=7-firstday+1;
	var week = Math.round((totalDays+diff-firstday)/7);
	return week;
}
function ScriviSettimana()
{
	now = new Date();
	years=now.getFullYear();
	month=now.getMonth()+1;
	day=now.getDate()+'';
	testo = 'Benvenuto nella  '+weekNo()+'a settimana  del '+years+' mese:'+month+' giorno:'+day+' umpf';
	document.getElementById("sept").innerHTML=testo;
/*	if (document.layers)
	{
		document.layers.span1.document.write(testo);
		document.layers.span1.document.close();
	}
	else if (document.all)
	{
			span1.innerHTML = testo;
	}
*/

}

function customize(form)
{
        var address = document.form1.url.value;
        var op_tool  = (document.form1.tool.checked== true)  ? 1 : 0;
        var op_loc_box  = (document.form1.loc_box.checked == true)  ? 1 : 0;
        var op_dir  = (document.form1.dir.checked == true)  ? 1 : 0;
        var op_stat  = (document.form1.stat.checked == true)  ? 1 : 0;
        var op_menu  = (document.form1.menu.checked == true)  ? 1 : 0;
        var op_scroll  = (document.form1.scroll.checked == true)  ? 1 : 0;
        var op_resize  = (document.form1.resize.checked == true)  ? 1 : 0;
        var op_wid  = document.form1.wid.value;
        var op_heigh = document.form1.heigh.value;
        var option = "toolbar="      + op_tool +                ",location="    + op_loc_box +                ",directories="
        + op_dir +                ",status="      + op_stat
        +                ",menubar="     + op_menu +                ",scrollbars="

        + op_scroll +                ",resizeable="  + op_resize
        +                ",width="
        + op_wid +                ",height="      + op_heigh;
        var win3 = window.open("", "what_I_want", option);
        var win4 = window.open(address, "what_I_want");
}
function clear(form)
{
        document.form1.wid.value="";
        document.form1.heigh.value="";
}

