home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 April / PCWorld_1999-04_cd.bin / Software / TemaCD / ICE / ic405.exe / DATA.Z / BANNER.SCR < prev    next >
Text File  |  1996-06-03  |  1KB  |  47 lines

  1.  
  2. <script language="JavaScript">
  3. <!-- Begin code
  4.  
  5. function scroll(seed)
  6. {
  7.     var m1  = "BANNERTEMPLATE";
  8.     
  9.         var msg=m1;
  10.         var out = " ";
  11.         var c   = 1;
  12.  
  13.         if (seed > 100) {
  14.                 seed--;
  15.                 var cmd="scroll(" + seed + ")";
  16.                 timerTwo=window.setTimeout(cmd,100);
  17.         }
  18.         else if (seed <= 100 && seed > 0) {
  19.                 for (c=0 ; c < seed ; c++) {
  20.                         out+=" ";
  21.                 }
  22.                 out+=msg;
  23.                 seed--;
  24.                 var cmd="scroll(" + seed + ")";
  25.                     window.status=out;
  26.                 timerTwo=window.setTimeout(cmd,100);
  27.         }
  28.         else if (seed <= 0) {
  29.                 if (-seed < msg.length) {
  30.                         out+=msg.substring(-seed,msg.length);
  31.                         seed--;
  32.                         var cmd="scroll(" + seed + ")";
  33.                         window.status=out;
  34.                         timerTwo=window.setTimeout(cmd,100);
  35.                 }
  36.                 else {
  37.                         window.status=" ";
  38.                         timerTwo=window.setTimeout("scroll(100)",75);
  39.                 }
  40.         }
  41. }
  42.  
  43.  
  44. // -- End code -->
  45.  
  46. </script>
  47.