// JavaScript Document
/* Browser detection code by Kruglov */
isDOM    = document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
isOpera  = isOpera5 = window.opera && isDOM //Opera 5+
isOpera6 = isOpera && window.print //Opera 6+
isOpera7 = isOpera && document.readyState //Opera 7+
isMSIE   = document.all && document.all.item && !isOpera //Microsoft Internet Explorer 4+
isMSIE5  = isDOM && isMSIE //MSIE 5+
isNetscape4 = document.layers //Netscape 4.*
isMozilla   = isDOM && navigator.appName=="Netscape" //Mozilla или Netscape 6.*
/* End code */


/* Div scroll by Pimenov Dmitriy */
var timer;
var divWidth    = 300;
var scrollWidth = 0;
var scrollSpeed = 15;
var scrollStep  = 50;

if(isNetscape4 || isMozilla)
{
        scrollWidth = 18;
}
else
{
        scrollWidth = 16;
}

function myScrollStart(dir)
{
        if(dir == 'up')
        {
                timer=setInterval('myScrollUp()', scrollStep);
        }
        else
        {
                timer=setInterval('myScrollDown()', scrollStep);
        }
}

function myScrollUp()
{
        //document.getElementById('scroll_content').style.width = (divWidth+scrollWidth)+'px';
        document.getElementById('scroll_content').style.overflow='auto';
        document.getElementById('scroll_content').scrollTop-=scrollSpeed; 
}

function myScrollDown()
{ 
        //document.getElementById('scroll_content').style.width = (divWidth+scrollWidth)+'px';
        document.getElementById('scroll_content').style.overflow='auto';
        document.getElementById('scroll_content').scrollTop+=scrollSpeed;
}

function myScrollTop()
{
        //document.getElementById('scroll_content').style.width = (divWidth+scrollWidth)+'px';
        document.getElementById('scroll_content').style.overflow='auto';
        document.getElementById('scroll_content').scrollTop=0;
}

function myScrollBottom()
{
        //document.getElementById('scroll_content').style.width = (divWidth+scrollWidth)+'px';
        document.getElementById('scroll_content').style.overflow='auto';
        document.getElementById('scroll_content').scrollTop=10000;
}

function myScrollClear()
{ 
        clearInterval(timer);
}
/* End code */


