﻿window.scrollTimer = null;

function ToggleShowContent(sender, e)
{
    
    var el = sender.parentNode.getElementsByTagName('div')[0];
    el.className = (el.className == 'hidden_content') ? 'visible_content' : 'hidden_content';
    
    scrollbar.recalculateLayout();
    scrollbar.recalculateLayout();
}

function ScrollUp() 
{
    if (!window.scrollTimer)
        window.scrollTimer = setInterval("Scroll(-4)", 1);
}

function ScrollDown() 
{
    if (!window.scrollTimer)
        window.scrollTimer = setInterval("Scroll(4)", 1);
}

function Scroll(direction) 
{
    scrollbar.scrollBy(direction);      
}


function StopScroll() 
{
    clearInterval(window.scrollTimer);
    window.scrollTimer = null;
}       