function funClock() {
/*
if (!document.layers && !document.all)
return;
*/
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "AM";
if (hours >= 24) {
dn = "PM";
hours = 0;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime = hours + ":" + minutes + ":" + seconds + " ";

clock_ora.innerHTML = movingtime;

/*
if (document.layers) {
document.layers.clock_ora.document.write(movingtime);
document.layers.clock_ora.document.close();
}
else if (document.all) {
clock_ora.innerHTML = movingtime;
}
*/

setTimeout("funClock()", 1000);
}

function mese_orario(){
var months=new Array(13);
months[1]="Gennaio";
months[2]="Febbraio";
months[3]="Marzo";
months[4]="Aprile";
months[5]="Maggio";
months[6]="Giugno";
months[7]="Luglio";
months[8]="Agosto";
months[9]="Settembre";
months[10]="Ottobre";
months[11]="Novembre";
months[12]="Dicembre";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)    
year = year + 1900;
document.write(date + " ");
document.write(lmonth + ", " + year);
}

function Scrollboxa(obja)
     {
         savobja=obja;
         posa=posa-divinc;
         if(((whichscroll=="1" || whichscroll=="3")&&(posa<=stopposa))||
           ((whichscroll=="2" || whichscroll=="4")&&(posa>=stopposa)))
           {
            clearTimeout(scrollmsga);
            setTimeout("scrollit()",divpause);
           } 
         else
             {
              if(document.getElementById) // IE5 and NS6
                {
                 eval("elma.style."+divprop+"=posa");
                 elma.style.visibility="visible";
                }
              if(document.layers)    // NS4+
                {
                 eval("obja."+divprop+"=posa");
                 document.main.visibility="show";
                }
              scrollmsga=setTimeout("Scrollboxa(savobja)",speed);
             }
     }
	 
function Scrollboxb(objb)
     {
         savobjb=objb;
         posb=posb-divinc;
         if(((whichscroll=="1" || whichscroll=="3")&&(posb<=stopposb))||
            ((whichscroll=="2" || whichscroll=="4")&&(posb>=stopposb)))
           {
            clearTimeout(scrollmsgb);
           }
         else
              {
               if(document.getElementById) // IE5 and NS6
                 {
                  eval("elmb.style."+divprop+"=posb");
                 }
               if(document.layers)  // NS4+
                 {
                  eval("objb."+divprop+"=posb");
                  objb.visibility="show";
                 }
               scrollmsgb=setTimeout("Scrollboxb(savobjb)",speed);
              }
     }
	 
function scrollit()
   {
    i++;
    if(i>=msg.length)
      {i=0;}
    posa=stopposb*-1;
    posb=0;
    if(firsttime=="y")
      {
       firsttime= "n";
       if(document.getElementById)      // IE5 and NS6
         {
          elma=document.getElementById(divname1);
          elma.innerHTML=msg[i];
         }
      if(document.layers)   // NS4+
        {
         thediva=eval("document.main.document."+divname1);
         thediva.document.write(msg[i]);
         thediva.document.close();
        }
       Scrollboxa(thediva);
      }
    else
      {
       if(whichdiv==divname1)
         {
          if(document.getElementById)  // IE5 and NS6
            {
             elmb=document.getElementById(divname1);
             elma=document.getElementById(divname2);
             elma.innerHTML=msg[i];
            }
          if(document.layers)  //  NS4+
            {
             thedivb=eval("document.main.document."+divname1);
             thediva=eval("document.main.document."+divname2)  ;
             thediva.document.write(msg[i]);
             thediva.document.close();
            }
          Scrollboxb(thedivb);
          whichdiv=divname2;
          Scrollboxa(thediva);
         }
       else
         {
          if(document.getElementById)   // IE5 and NS6
            {
             elmb=document.getElementById(divname2);
             elma=document.getElementById(divname1);
             elma.innerHTML=msg[i];
             }
          if(document.layers)  // NS4+
            {
             thedivb=eval("document.main.document."+divname2);
             thediva=eval("document.main.document."+divname1);
             thediva.document.write(msg[i]);
             thediva.document.close();
             }
          Scrollboxb(thedivb);
          whichdiv=divname1;
          Scrollboxa(thediva);
         }
      }
  }
