
var larghezza;
var altezza;
var url;
var win;
var name;

function popUpWindow(name,url,larghezza,altezza)
{
	if(win == null || win.closed)
		{
		win = window.open(url,name,"scrollbars=yes,status=yes,resizable=yes,left=100,top=100,width=" + larghezza + ",height=" + altezza);
		win.focus();
		}
	else
		{
		win.close();
		win = window.open(url,name,"scrollbars=yes,status=yes,resizable=yes,left=100,top=100,width=" + larghezza + ",height=" + altezza);
		}
	
}

function popUpRichWindow(name,url,larghezza,altezza)
{
	if(win == null || win.closed)
		{
		win = window.open(url,name,"menubar=yes,scrollbars=yes,status=yes,resizable=no,left=100,top=100,width=" + larghezza + ",height=" + altezza);
		win.focus();
		}
	else
		{
		win.close();
		win = window.open(url,name,"menubar=yes,scrollbars=yes,status=yes,resizable=no,left=100,top=100,width=" + larghezza + ",height=" + altezza);
		}
}
	
	
function startclock() 
{  
   var ntime  = new Date();
   
   var mnames = new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre");
  
   var nhour = ntime.getHours();
   var nmin  = ntime.getMinutes();
   var nsec  = ntime.getSeconds();
   var nday  = ntime.getDate();
   var nyear = ntime.getYear();
   

   if (nyear < 1900) { nyear += 1900; }
   if (nsec < 10)   { nsec="0"+nsec; }
   if (nmin < 10)   { nmin="0"+nmin; }
   if (nday < 10)   { nday="0"+nday; }

   document.getElementById("myclock").innerHTML =  nday  +  " " + mnames[ntime.getMonth()] + " " + nyear+ " " + nhour + ":" + nmin  + "&#160;";
                      setTimeout("startclock()", 1000);
}
