/* **********************************************************************************
    * This code was created by Jim Young of www.requestcode.com .                *
    * You may use this code at no charge.  All I ask is that you give me             *
    * credit.  Please visit my site for more scripts like this one.                          *
    **********************************************************************************
    Enter your links or text in the array below that you want to scroll.  Mak sure that you use single quotes within
    the double quotes
*/
var msg=new Array()
msg[0]="Спасибо огромное создателям сайта! Очень много интересного узнала о своих письмах и других людей. Всё верно, просто гениально!&nbsp;&nbsp;&nbsp;&nbsp;<em>Мария</em>" 
msg[1]="Прекрасно!!! Очень понравилось! Я никогда ещё не встречалась с таким способом узнать о себе и своих чувствах.... &nbsp;&nbsp;&nbsp;&nbsp;<em>Алёна</em>"
msg[2]="Неслабо... так держать!... &nbsp;&nbsp;&nbsp;&nbsp;<em>Игорь</em>"
msg[3]="Всем доброго дня! Была приятно удивлена точностью анализа своих собственных писем друзьям и начальству! &nbsp;&nbsp;&nbsp;&nbsp;<em>Анастасия.</em>"
msg[4]="Очень качественный анализ. Очень помогает. &nbsp;&nbsp;&nbsp;&nbsp;<em>Алексей.</em>"
msg[5]="Очень люблю эту страничку. И думаю все со мной соглосятся. Пока целую в обе щёчки.&nbsp;&nbsp;&nbsp;&nbsp;<em>Марина.</em>"
msg[6]="Здорово! Великолепно! &nbsp;&nbsp;&nbsp;&nbsp;<em>Алик</em>"
msg[7]="Попробовала проанализировать пару писем, получилось весьма похоже на правду. Если честно, я даже не ожидала. Спасибо!&nbsp;&nbsp;&nbsp;&nbsp;<em>Анна</em>"
msg[8]="Интересно. сижу тут, анализирую. &nbsp;&nbsp;&nbsp;&nbsp;<em>Инак</em>"
msg[9]="Узнал про себя много интересного. Никакой человек такое в глаза прямо не скажет. Спасибо.&nbsp;&nbsp;&nbsp;&nbsp;<em>Николай</em>"
msg[10]="Очень интересно сравнивать данные, полученные электронным анализом, и личное психологическое ощущение от письма.&nbsp;&nbsp;&nbsp;&nbsp;<em>Ellaire</em>"
msg[11]="Проверил несколько своих писем и был поражен сходством стечения обстоятельств. Очень, очень интересно.&nbsp;&nbsp;&nbsp;&nbsp;<em>Евгений.</em>"
msg[12]="Увидела в чужой записи ссылку. Воспользовалась. Попробовала. Застряла. Очень интересно. &nbsp;&nbsp;&nbsp;&nbsp;<em>Снежок</em>"
msg[13]="Уже давно пользуюсь. Очень доволен сервисом. В тексте не было никаких отрицательных эмоций, но правда всплыла. &nbsp;&nbsp;&nbsp;&nbsp;<em>Андрей</em>"
msg[14]="Даа, много узнал о своей бывшей девушке... &nbsp;&nbsp;&nbsp;&nbsp;<em>Springer</em>"
msg[15]="Полезный сайт. Не знаю, насколько достоверно, но часто пользуюсь... &nbsp;&nbsp;&nbsp;&nbsp;<em>Эпса</em>"
/* The variables below are the ones you want to change  */

speed=50                      // Sets the speed in milliseconds at which the link or text scrolls.
var divwidth=265            // Sets the width of the div or layer in pixels.  You will have to play with this to get it set correctly.
var divheight=44            // Sets the height of the div or layer in pixels.  Same as above.

/*
   The variables divincbt, divinctb, divincrl and divinclr set the increment in pixels that the div that contains the text
    or links is moved.  Which one is used is determined by the direction that you pick in the variable whichscroll.
    The variable divinctb would be used if you set whichscroll to 1, divinctb if you set whichscroll to 2, divincrl if
     you set whichscroll to 3 and divinclr if you set whichscroll to 4.  You can change these variables to speed up
     or slow down the movement of the scroll.
*/

var divincbt=1
var divinctb=-1
var divincrl=10
var divinclr=-10

var divpause=5000        // Sets how long to pause in milliseconds before scrolling the next link or text.

var divtop="50"              // divtop and divleft set the top and left positions of the container div or layer in pixels.
var divleft="10"

var divcolor="white"      // Sets the background color of the div or layer

var divname1="scroll2"  // Sets the name of your div or layer for the first link or text that is displayed
var divname2="scroll3"  // Sets the name of your div or layer for the next link or text to be displayed

/*
   The variable whichscroll is used to set the direction of the scrolling.  It is currently set to 1.
    1 = Bottom to Top
    2 = Top to Bottom
    3 = Right to Left
    4 = Left to Right
*/
var whichscroll="1"

/* END OF CONFIGURATION VARIABLES */

/* THERE IS NO NEED TO CHANGE THE VARIABLES OR SCRIPTS BELOW */

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
             {
              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)
         }
      }
  }