function stopAction() {
  clearTimeout(handler);
  status = 0;
}

function startAction() {
  if($('scroller_bar')) {
    if (status == 0) {
       if (totalImages > 9) {
        scrollPics();
       }
    }
  }
}

function scrollPics() {

    $('div1').style.left=m+'px';
    $('div2').style.left=n+'px';
     m--;
     n--;
     
    if(m==-totalWidth) {
      m=totalWidth;
    }
    
    if(n==-totalWidth) {
      n=totalWidth;
    }
    
    handler = setTimeout('scrollPics()',speed);
    status = 1;
    
} 

function observeScroller() {
  Event.observe($('div1'), 'mouseover', function() { stopAction(); });   
  Event.observe($('div1'), 'mouseout', function() { startAction(); }); 
  Event.observe($('div2'), 'mouseover', function() { stopAction(); });    
  Event.observe($('div2'), 'mouseout', function() { startAction(); });   
}