var speed=50;       
var divwidth=500;   
var divheight=35;  
var divincbt=1;                 
var divinctb=-1;
var divincrl=10;
var divinclr=-10;
var divpause=2500; 
var divtop="3";    
var divleft="10";               

var divname1="scroll2";  
var divname2="scroll3";  
var whichscroll="1";

var msg=new Array();

var divinc
var stopposa
var stopposb
var scrollmsga
var scrollmsgb 
var thediva
var thedivb
var posa
var posb
var i=msg.length
var firsttime="y"
var divprop
var whichdiv=divname1

if(whichscroll=="1")
  {
   stopposa=0
   stopposb=divheight*-1
   divprop="top"
   divinc=divincbt
  }
if(whichscroll=="2")
  {
   stopposa=0
   stopposb=divheight
   divprop="top"
   divinc=divinctb
  }
if(whichscroll=="3")
  {
   stopposa=0
   stopposb=divwidth*-1
   divprop="left"
   divinc=divincrl
  }
if(whichscroll=="4")
  {
   stopposa=1
   stopposb=divwidth+2
   divprop="left"
   divinc=divinclr
  }

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
             {
                 eval("elma.style."+divprop+"='"+posa+"px'")
                 elma.style.visibility="visible"
              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
              {
               eval("elmb.style."+divprop+"='" +posb +"px'")
               scrollmsgb=setTimeout("Scrollboxb(savobjb)",speed)
              }
     }
function scrollit()
   {
    i++
    if(i>=msg.length)
      {i=0}
    posa=stopposb*-1
    posb=0
    if(firsttime=="y")
      {
       firsttime= "n"
		elma=document.getElementById(divname1)
		elma.innerHTML=msg[i];
		Scrollboxa(thediva)
      }
    else
      {
       if(whichdiv==divname1)
         {
		 elmb=document.getElementById(divname1)
		 elma=document.getElementById(divname2)
          elma.innerHTML=msg[i];

          Scrollboxb(thedivb)
          whichdiv=divname2
          Scrollboxa(thediva)
         }
       else
         {

          elmb=document.getElementById(divname2)
          elma=document.getElementById(divname1)
        elma.innerHTML=msg[i];

          Scrollboxb(thedivb)
          whichdiv=divname1
          Scrollboxa(thediva)
         }
      }
  }
