  var scrollcurrent = 0;
  var scrollmax = 5000;
  var scrollon = "YES";

  function allowScroll() {
    scrollcurrent = 0;
    scrollon = "YES";
    pageScroll();
  }

  function allowScrollB() {
    scrollcurrent = 5000;
    scrollon = "YES";
    pageScrollB();
  }

  function pageScroll() {
    window.scrollBy(1,0);
    scrollcurrent = scrollcurrent + 1;

    if (scrollcurrent < scrollmax) {
      if (scrollon == "YES") {
        scrolldelay = setTimeout('pageScroll()', 20);
      }
    }
  }

  function pageScrollB() {
    window.scrollBy(-1,0);
    scrollcurrent = scrollcurrent - 1;

    if (scrollcurrent > 0) {
      if (scrollon == "YES") {
        scrolldelay = setTimeout('pageScrollB()', 20);
      }
    }
  }

  function popUp(URL) {
    scrollon = "NO";
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open('art.php?a=" + URL + "', '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=300,left=1,top=1');");
  }

