// -------------------------------------------------------------
// Program      : main.js
// Description  : Script da página principal
// Version      : 1.0
// Date         : 28/06/2005
// Author       : Juan Sirgado y Antico
// Copyright(c) 2006 by JSyA Informática. All Rights Reserved.
// -------------------------------------------------------------
// Version      :
// Date         :
// Author       :
// -------------------------------------------------------------
   var scrollstring = "" +
       "Dicas da semana...  " +
       "utilize regularmente o ScanDisk e o Defrag...  " +
       "para organizar o disco...  " +
       "no site da MicroSoft, voce encontra o RegClean...  " +
       "que limpa o registro do sistema...  ";
       
   var timer = 0;
   var timerID = null;
   var timerRunning = false;
// -------------------------------------------------------------
function showclock()
   {
   var nwtime  = new Date();
   var hours   = nwtime.getHours();
   var minutes = nwtime.getMinutes();
   var seconds = nwtime.getSeconds();
   var timeValue = "";

   if(timerRunning)
      {clearTimeout(timerID);}
   timerRunning = false;

   timeValue  += ((hours > 12) ? hours - 12 : hours);
   timeValue   = ((timeValue < 10) ? "  0" + timeValue : "  " + timeValue);
   timeValue  += ((minutes < 10) ? ":0" : ":") + minutes;
   timeValue  += ((seconds < 10) ? ":0" : ":") + seconds;
   timeValue  += ((hours < 12) ? " AM" : " PM");
   document.form1.face.value = timeValue;
   timerID = setTimeout("showclock()",1000);
   timerRunning = true;
   }
// -------------------------------------------------------------   
function scrolltext()
   {
   document.form2.scrolltext.value = scrollstring;
   scrollstring = scrollstring.substring(1,scrollstring.length)+scrollstring.charAt(0);
   timer = setTimeout("scrolltext()",80);
   }
// -------------------------------------------------------------
function startjava()
   {
   showclock();
   scrolltext();
   }
// -------------------------------------------------------------
