Creating multiple scroll bars
<p>I am facing problems in creating multiple scroll bars.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
  &lt;script&gt; 
   document.observe('dom:loaded',function(){


var scrollbar = new Control.ScrollBar('scrollbar_content','scrollbar_track');

$('scroll_down_50').observe('click',function(event){
    scrollbar.scrollBy(-50);
    event.stop();
    alert('hey');
});

$('scroll_up_50').observe('click',function(event){
    scrollbar.scrollBy(50);
    event.stop();
});

$('scroll_top').observe('click',function(event){
    scrollbar.scrollTo('top');
    event.stop();
});

$('scroll_bottom').observe('click',function(event){
    //to animate a scroll operation you can pass true
    //or a callback that will be called when scrolling is complete
    scrollbar.scrollTo('bottom',function(){
        if(typeof(console) != "undefined")
            console.log('Finished scrolling to bottom.');
    });
    event.stop();
});

$('scroll_second').observe('click',function(event){
    //you can pass a number or element to scroll to
    //if you pass an element, it will be centered, unless it is
    //near the bottom of the container
    scrollbar.scrollTo($('second_subhead'));
    event.stop();
});

$('scroll_third').observe('click',function(event){
    //passing true will animate the scroll
    scrollbar.scrollTo($('third_subhead'),true);
    event.stop();
});

$('scroll_insert').observe('click',function(event){
    $('scrollbar_content').insert('&amp;lt;p&gt;&lt;b&gt;Inserted: ' + $('repeat').innerHTML + '&lt;/b&gt;&amp;lt;/p&amp;gt;');
    //you only need to call this if ajax or dom operations modify the layout
    //this is automatically called when the window resizes
    scrollbar.recalculateLayout();
    event.stop();
});

    });}
  &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
 &lt;div id="groups"&gt;
                        &lt;p style="font-family: arial; font-size:13px; font-weight:bold; color: grey; text-align:center;"&gt;My Groups&lt;/p&gt;
                        &lt;div id="scrollbar_container"&gt;
                            &lt;div id="scrollbar_track"&gt;&lt;div id="scrollbar_handle"&gt;&lt;/div&gt;&lt;/div&gt;  
                            &lt;div id="scrollbar_content"&gt;  &lt;!-- Groups Nmaes--&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g1.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Heye sup&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Sale anywhere?&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g1.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Marriage :)&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Happy b'day divya!&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g1.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;New year plans?&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                            &lt;!--    &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Wassup???&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                             --&gt;&lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                        &lt;div id="follow"&gt;
                        &lt;p style="font-family: arial; font-size:14px; font-weight:bold; color: grey; text-align:center;"&gt;Follow Alerts&lt;br/&gt;&lt;span style="font-size:11px; font-weight:400;"&gt;(Updates of people whom you follow)&lt;/span&gt;&lt;/p&gt;
                        &lt;div id="scrollbar_container"&gt;
                        &lt;div id="scrollbar_track"&gt;&lt;div id="scrollbar_handle"&gt;&lt;/div&gt;&lt;/div&gt;
                            &lt;div id="scrollbar_content"&gt;  &lt;!-- Groups Nmaes--&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g1.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Sanjeev Kapoor&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Shehnaz Hussain&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g1.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Sonia Gandhi&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Shobha De&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g1.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;A R Rahman&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                                &lt;a href="http://google.co.in"&gt;&lt;span id="g1"&gt;&lt;img alt="image" src="images/g2.png" id="group_img" style="vertical-align:middle"/&gt;&lt;span style="vertical-align:middle"&gt;Dr Jayanti Reddy&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>i am able to get a scroll bar for 'groups' div, but i am unable to get it for 'follow' div.
Can some one suggest me where i am going wrong.can some one explain the working of    document.observe('dom:loaded',function()) in javascript.</p>
