//for home page scroll content
function scrollup(o, d, c)
{

  if (d <= c) {
      var first = o.firstChild;
    var t = first.cloneNode(true);
    o.removeChild(o.firstChild);
    o.appendChild(t);
    t.style.marginTop = o.firstChild.style.marginTop = '0px';
    first = o.firstChild;
  }
  else {
    var s = 3,c = c + s,l = (c >= d ? c - d : 0);
    o.firstChild.style.marginTop = -c + l + 'px';
    window.setTimeout(function()
    {
      scrollup(o, d, c - l)
    }, 100);
  }
}

function autoScroll(id, h, i)
{
  var o = document.getElementById(id);
  var mr = window.setInterval(function()
  {
    scrollup(o, h, 0)
  }, i);
  o.onmouseover = function()
  {
    clearInterval(mr);
  };
  o.onmouseout = function()
  {
    mr = window.setInterval(function()
    {
      scrollup(o, h, 0)
    }, i)
  };
}

