
function initArray() 

{ 

  this.length = initArray.arguments.length 

  for (var i = 0; i < this.length; i++) 

  this[i+1] = initArray.arguments[i] 

} 

  

function infoscroll(seed,looped) 

{ 

  var now = new Date(); 

  var hours = now.getHours(); 

  var minutes = now.getMinutes(); 

  var seconds = now.getSeconds(); 

  var year = now.getYear(); 

  var month = now.getMonth(); 

  var day = now.getDay(); 

  var date = now.getDate(); 

  var DOWArray = new initArray("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì",
"Sabato"); 

  var MOYArray = new initArray("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno",
"Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"); 

  var timeValue = ((hours < 10) ? "0" : "") + hours 

  var text1  = "Benvenuto su InnovationPoint! Oggi è "; 

  var text2  =  DOWArray[day+1] + " "; 

  var putout = " "; 

  var c   = 1; 

  

  text2 = text2 + date + " "; 

  text2 = text2 + MOYArray[month+1] + " "; 

  if (navigator.appName == "Netscape") 

    {text2 = text2 + (year+1900) + " ...e sono le "} 

  else if (navigator.appName == "Microsoft Internet Explorer") 

    {text2 = text2 + (year) + " ...e sono le "} 

  timeValue += ((minutes < 10) ? ":0" : ":") + minutes 

  timeValue += ((seconds < 10) ? ":0" : ":") + seconds 

  timeValue += ((hours < 12) ? " A.M." : "") 

  text2  = text2 +  timeValue + "..........." 

  if (hours < 12) 

    {text2  = text2 + "Buongiorno!"} 

  else if (hours < 17) 

    {text2  = text2 + "Buon pomeriggio!"} 

  else 

    {text2  = text2 + "Buonasera!"} 

  text2 = text2 + "...Visita il nostro sito, troverai tante opportunità !!! "; 

  var msg=text1+text2; 

  if (seed > 100) 

  { 

     seed--; 

     var cmd="infoscroll(" + seed + "," + looped + ")"; 

     timerTwo=window.setTimeout(cmd,100); 

  } 

  else if (seed <= 100 && seed > 0) 

  { 

    for (c=0 ; c < seed ; c++) 

    {  putout+=" ";  } 

    putout+=msg.substring(0,100-seed); 

    seed--; 

    var cmd="infoscroll(" + seed + "," + looped + ")"; 

    window.status=putout; 

    timerTwo=window.setTimeout(cmd,100); 

  } 

  else if (seed <= 0) 

  { 

    if (-seed < msg.length) 

    { 

      putout+=msg.substring(-seed,msg.length); 

      seed--; 

      var cmd="infoscroll(" + seed + "," + looped + ")"; 

      window.status=putout; 

      timerTwo=window.setTimeout(cmd,100); 

    } 

    else 

    { 

      window.status=" "; 

      looped += 1; 

      var cmd = "infoscroll(100," + looped + ")"; 

      timerTwo=window.setTimeout(cmd,75); 

    } 

  } 

} 

  

// --> 

  

<!-- 

infoscroll(100,1) 

// --> 




