Scroll = function (scroller, scroller_bar, menu, widthAll)
{
    this.canDrag = false;
    this.prepared = false;

    this.shift_x;
    this.delta;

    this.scroller = scroller;
    this.scrollerBar = scroller_bar;
    this.menu = menu;

    this.scrollerStartShift;
    this.menuStartShift;

    this.scrollerTrackWidth = widthAll-20;
    this.menuTrackWidth;

    this.scrollerWidth;
    this.menuWidth = widthAll;

    this.step;

    this.dontmove = false;

    this.a = false;

    this.prepare = function()
    {
        if(get(this.scroller) && get(this.menu))
        {
            this.scroller = get(this.scroller);
            this.scrollerBar = get(this.scroller_bar);
            this.menu = get(this.menu);
            
            this.scrollerStartShift = parseInt(this.scroller.style.left);
			if (isNaN(this.scrollerStartShift)) {this.scroller.style.left=0;this.scrollerStartShift=0;}
            this.menuStartShift = parseInt(this.menu.style.marginLeft);
			if (isNaN(this.menuStartShift)) this.menuStartShift=0;
            
            this.menuTrackWidth = this.menu.offsetWidth + this.menuStartShift;
            
            this.scrollerWidth = Math.round( (this.menuWidth * this.scrollerTrackWidth) / this.menuTrackWidth );
            
            // 8 px - ширина стрелки => минимальная ширина скроллера 16px        
            this.scrollerWidth = (this.scrollerWidth < 16) ?  16 : this.scrollerWidth;
            
            // максимальная ширина скроллера - ширина трэка
            this.scrollerWidth = (this.scrollerWidth > this.scrollerTrackWidth) ?  this.scrollerTrackWidth : this.scrollerWidth;
            
            // устанавливаем ширину скроллера 
            this.scroller.style.paddingRight = this.scrollerWidth - 8 + "px";
            
            // теперь принимаем за скроллер точку (его левую границу), все расчеты будем производить относительно нее
            // задаем ширину трэка скроллера и меню
            this.scrollerTrackWidth -= this.scrollerWidth;
            this.menuTrackWidth -= this.menuWidth;
            
            // рассчитываем коэффициэнт
			this.delta=0;
            this.delta = (parseInt(this.menuTrackWidth)/parseInt(this.scrollerTrackWidth));

            this.prepared = true;
        }
        return false;
    }

    this.fixForBrowsers = function(event)
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if(event.stopPropagation) event.stopPropagation();
        else event.cancelBubble = true;
        if(event.preventDefault) event.preventDefault();
        else event.returnValue = false;
    }

    this.setStep = function()
    {
//		step = Math.round(scrollerWidth / 3 * 2);
//		alert(this.menuTrackWidth);
        this.step = Math.round(this.menu.getElementsByTagName("td")['0'].offsetWidth * this.scrollerTrackWidth / this.menuTrackWidth / 2);    
    }

    this.setPosition = function(newPosition)
    {
	
        if(newPosition <= this.scrollerTrackWidth + this.scrollerStartShift && newPosition >= this.scrollerStartShift)
        {
            this.scroller.style.left = newPosition + "px";
        }
        else
        {
            if(newPosition >= this.scrollerTrackWidth + this.scrollerStartShift)
            {        
                this.scroller.style.left = this.scrollerTrackWidth + this.scrollerStartShift + "px";
            }
            if(newPosition < this.scrollerStartShift)
            {
                this.scroller.style.left = this.scrollerStartShift + "px";
            }
        }
        this.menu.style.marginLeft = Math.round( (parseInt(this.scroller.style.left) - this.scrollerStartShift) * this.delta * (-1) ) + this.menuStartShift + "px";
//		alert(this.step);
//		alert(this.menu.style.marginLeft);
		if (this.step==17)
		{
			this.menu.style.marginLeft="-"+Math.round(parseInt(this.scroller.style.left)/34*160) + "px";
		}
//		alert(this.menu.style.marginLeft);
        return false;
    }
	
    this.setPositionMy = function(newPosition,id,lastItem) {
//		alert(lastItem);
//        if ((newPosition <= this.scrollerTrackWidth + this.scrollerStartShift && newPosition >= this.scrollerStartShift) || id<7) {
        //if (newPosition <= this.scrollerTrackWidth + this.scrollerStartShift && newPosition >= this.scrollerStartShift) {
        if (id<=lastItem) {
            this.scroller.style.left = newPosition + "px";
			if (isNaN(this.delta)) { this.delta = 0; }
			if (this.delta==Infinity) { this.delta = 0; }			
			this.menu.style.marginLeft = Math.round((parseInt(this.scroller.style.left) - this.scrollerStartShift) * (-1)) + this.menuStartShift + "px";
        }
        else {
			
            if (newPosition >= this.scrollerTrackWidth + this.scrollerStartShift) {
                this.scroller.style.left = this.scrollerTrackWidth + this.scrollerStartShift + "px";
            }
            if (newPosition < this.scrollerStartShift) {
                this.scroller.style.left = this.scrollerStartShift + "px";
            }
			if (isNaN(this.delta)) { this.delta = 0; }
			if (this.delta==Infinity) { this.delta = 0; }
			if (this.delta==-Infinity) { this.delta = 0; }
			this.menu.style.marginLeft = Math.round((parseInt(this.scroller.style.left) - this.scrollerStartShift) * this.delta * (-1)) + this.menuStartShift + "px";			
        }
		//		alert(this.step);
        //		alert(this.menu.style.marginLeft);
        if (this.step == 17) {
//            this.menu.style.marginLeft = "-" + Math.round(parseInt(this.scroller.style.left) / 34 * 160) + "px";
        }
        //		alert(this.menu.style.marginLeft);
        return false;
    }		

    this.drag = function(event)
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (this.prepared)
        {
            this.canDrag = true;
            this.shift_x = event.clientX - parseInt(this.scroller.style.left);
            this.fixForBrowsers(event);
        }    
        return false;
    }

    this.movescroller_ = function(event,i)
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (this.prepared && !this.dontmove)
        {
            this.setStep();
            var currentPosition = parseInt(this.scroller.style.left);               
            var newPosition = 2*i*this.step + parseInt(this.scroller.style.left); 
//			alert(newPosition);
            this.setPosition(newPosition);
            this.fixForBrowsers(event);
        }
        else
        {
            this.dontmove = false;
        }
        return false;
    }

    this.movescroller = function(event)
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (this.prepared && !this.dontmove)
        {
            this.setStep();
            var clickX = event.layerX ? event.layerX : event.offsetX;
            var currentPosition = parseInt(this.scroller.style.left);               
            var i = (clickX > currentPosition) ? 1 : -1;


            var newPosition = 2*i*this.step + parseInt(this.scroller.style.left); 
            this.setPosition(newPosition);
            this.fixForBrowsers(event);
        }
        else
        {
            this.dontmove = false;
        }
        return false;
    }

    this.move = function(event)
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (this.prepared && this.canDrag)
        {
            this.setPosition(event.clientX-this.shift_x);
            this.fixForBrowsers(event);
        }
        return false;
    }

    this.drop = function()
    {
        this.canDrag=false; 
    }
    
    this.scrollerClickHandler = function()
    {
        this.dontmove=true;    
    }    

    this.handle = function(delta, event) 
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        var i = (delta < 0) ? 1 : -1;
        this.setStep()
        var currentPosition = parseInt(this.scroller.style.left);               
        var newPosition = i*this.step + currentPosition; 
        this.setPosition(newPosition);        
        this.fixForBrowsers(event);        
    }

    this.cancelWheelAction = function(event)
    {
        /*
        Отменяем действие колеса
        */
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (event.preventDefault)
        {
            event.preventDefault();
        }
        event.returnValue = false;
    }

    this.wheel = function(event)
    {
        var delta = 0;
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (event.wheelDelta) 
        {
            // IE/Opera.
            delta = event.wheelDelta/120;
            
            // В Opera 9, значение delta не отличается по знаку от значения в IE.
            if (window.opera)
            {
                delta = delta;
            }
        } 
        else if (event.detail) 
        {
            /* 
            Заточка под Mozilla
            В Mozilla, значение delta отличается по знаку от значения в IE.
            Обычно, delta умножается на 3.
            */    
            delta = -event.detail/3;
        }
        /*
        Если delta отлична от 0 - юзаем ее
        Если скроллить вверх, то delta > 0
        Если скролить вниз - delta < 0
        */		
        if (delta)
        {
            this.handle(delta, event);
            this.cancelWheelAction(event);
            this.fixForBrowsers(event);
            return false;
        }
    }
}

VerticalScroll = function (scroller, scroller_bar, menu, widthAll)
{
    this.canDrag = false;
    this.prepared = false;

    this.shift_y;
    this.delta;

    this.scroller = scroller;
    this.scrollerBar = scroller_bar;
    this.menu = menu;

    this.scrollerStartShift;
	if (isNaN(this.scrollerStartShift)) {this.scrollerStartShift=0;}
    this.menuStartShift;
	if (isNaN(this.menuStartShift)) this.menuStartShift=0;	

    this.scrollerTrackWidth = widthAll;
    this.menuTrackWidth;

    this.scrollerWidth;
    this.menuWidth = widthAll+9;

    this.step;

    this.dontmove = false;

    this.a = false;

    this.prepare = function()
    {
        if(get(this.scroller) && get(this.menu))
        {
            this.scroller = get(this.scroller);
            this.scrollerBar = get(this.scroller_bar);
            this.menu = get(this.menu);
            
            this.scrollerStartShift = parseInt(this.scroller.style.top);
            this.menuStartShift = parseInt(this.menu.style.marginTop);
            
            this.menuTrackWidth = this.menu.offsetHeight + this.menuStartShift;
            
            this.scrollerWidth = Math.round( (this.menuWidth * this.scrollerTrackWidth) / this.menuTrackWidth );
            
            // 8 px - ширина стрелки => минимальная ширина скроллера 16px        
            this.scrollerWidth = (this.scrollerWidth < 16) ?  16 : this.scrollerWidth;
            
            // максимальная ширина скроллера - ширина трэка
            this.scrollerWidth = (this.scrollerWidth > this.scrollerTrackWidth) ?  this.scrollerTrackWidth : this.scrollerWidth;
            
            // устанавливаем ширину скроллера 
            this.scroller.style.paddingBottom = this.scrollerWidth - 8 + "px";
            
            // теперь принимаем за скроллер точку (его левую границу), все расчеты будем производить относительно нее
            // задаем ширину трэка скроллера и меню
            this.scrollerTrackWidth -= this.scrollerWidth;
            this.menuTrackWidth -= this.menuWidth;
            
            // рассчитываем коэффициэнт
			this.delta=0;
     		this.delta = (parseInt(this.menuTrackWidth)/parseInt(this.scrollerTrackWidth));

            this.prepared = true;
        }
        return false;
    }

    this.fixForBrowsers = function(event)
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if(event.stopPropagation) event.stopPropagation();
        else event.cancelBubble = true;
        if(event.preventDefault) event.preventDefault();
        event.returnValue = false;
    }

    this.setStep = function()
    {
		try
		{
			this.step = Math.round(this.menu.getElementsByTagName("td")['0'].offsetHeight * this.scrollerTrackWidth / this.menuTrackWidth);    
		}
		catch (exception_var)
		{
			this.step = Math.round(this.scrollerWidth / 3 * 2);
		}       
    }

    this.setPosition = function(newPosition)
    {
        if(newPosition <= this.scrollerTrackWidth + this.scrollerStartShift && newPosition >= this.scrollerStartShift)
        {
            this.scroller.style.top = newPosition + "px";
        }
        else
        {
            if(newPosition >= this.scrollerTrackWidth + this.scrollerStartShift)
            {        
                this.scroller.style.top = this.scrollerTrackWidth + this.scrollerStartShift + "px";
            }
            if(newPosition <= this.scrollerStartShift)
            {
                this.scroller.style.top = this.scrollerStartShift + "px";
            }
        }
		
        this.menu.style.marginTop = Math.round( (parseInt(this.scroller.style.top) - this.scrollerStartShift) * this.delta * (-1) ) + this.menuStartShift + "px";
		
        return false;
    }

    this.drag = function(event)
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (this.prepared)
        {
            this.canDrag = true;
            this.shift_y = event.clientY - parseInt(this.scroller.style.top);
            this.fixForBrowsers(event);
        }    
        return false;
    }

    this.movescroller = function(event)
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (this.prepared && !this.dontmove)
        {
            this.setStep();
            var clickY = event.layerY ? event.layerY : event.offsetY;
            var currentPosition = parseInt(this.scroller.style.top);               
            var i = (clickY > currentPosition) ? 1 : -1;
            var newPosition = 2*i*this.step + parseInt(this.scroller.style.top); 
            this.setPosition(newPosition);
            this.fixForBrowsers(event);
        }
        else
        {
            this.dontmove = false;
        }
        return false;
    }

    this.move = function(event)
    {
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (this.prepared && this.canDrag)
        {
            this.setPosition(event.clientY-this.shift_y);
            this.fixForBrowsers(event);
        }
        return false;
    }

    this.drop = function()
    {
        this.canDrag=false; 
    }
    
    this.scrollerClickHandler = function()
    {
        this.dontmove=true;    
    }    

    this.handle = function(delta, event) 
    {        
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        var i = (delta < 0) ? 1 : -1;
        this.setStep()
        var currentPosition = parseInt(this.scroller.style.top);               
        var newPosition = i*this.step + currentPosition; 
        this.setPosition(newPosition);        
        this.fixForBrowsers(event);        
    }

    this.cancelWheelAction = function(event)
    {
        /*
        Отменяем действие колеса
        */
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (event.preventDefault)
        {
            event.preventDefault();
        }
        event.returnValue = false;
    }

    this.wheel = function(event)
    {
        var delta = 0;
        if (!event)
        {
            // For IE.
            event = window.event;
        }
        if (event.wheelDelta) 
        {
            // IE и Safari значения delta всегда строго 120, вне зависимости от настроек пользователя.
            //alert(event.wheelDelta);
            delta = event.wheelDelta/120;
            
            // В Opera 9, значение delta равна 40*количество строк установленных пользователем в настройках
            // Не отличается по знаку от IE
            if (window.opera)
            {
                delta = event.wheelDelta/40;
            }
        } 
        else if (event.detail) 
        {
            /* 
            Заточка под Mozilla
            В Mozilla, значение delta отличается по знаку от значения в IE.
            по модулю delta строго совпадает со значением в пользовательких настройках
            */    
            //alert(-event.detail);
            delta = -event.detail;
        }
        /*
        Если delta отлична от 0 - юзаем ее
        Если скроллить вверх, то delta > 0
        Если скролить вниз - delta < 0
        */
        if (delta)
        {
            this.handle(delta, event);
            //this.cancelWheelAction(event);
            this.fixForBrowsers(event);
            return false;
        }
    }
}



function get(id)
{
    return document.getElementById(id);
}
function handleOnMouseUp(event)
{
    if (first) first.drop(event);
    if (second) second.drop(event);
    if (vertical) vertical.drop(event);	
    if (vertical_1) vertical_1.drop(event);	
    if (vertical_2) vertical_2.drop(event);	
    if (vertical_3) vertical_3.drop(event);	
    if (vertical_4) vertical_4.drop(event);	
    if (vertical_5) vertical_5.drop(event);	
    if (vertical_6) vertical_6.drop(event);	
    if (vertical_7) vertical_7.drop(event);	
    if (vertical_8) vertical_8.drop(event);	
    if (second10) second10.drop(event);		
}
function handleOnMouseMove(event)
{
    if (first) first.move(event);
    if (second) second.move(event);
    if (vertical) vertical.move(event);		
    if (vertical_1) vertical_1.move(event);		
    if (vertical_2) vertical_2.move(event);		
    if (vertical_3) vertical_3.move(event);		
    if (vertical_4) vertical_4.move(event);		
    if (vertical_5) vertical_5.move(event);		
    if (vertical_6) vertical_6.move(event);	
    if (vertical_7) vertical_7.move(event);	
    if (vertical_8) vertical_8.move(event);	
    if (vertical_8) vertical_8.move(event);	
    if (second10) second10.move(event);		
	
}

// first
function handleOnClickBarFirst(event) 
{
    if (first) first.movescroller(event);
}
function handleOnClickBarFirst_next(event) 
{
    first.movescroller_(event,1);
}
function handleOnClickBarFirst_prev(event) 
{
   if (first) first.movescroller_(event,-1);
}
function handleOnMouseDownFirst(event)
{
    if (first) first.drag(event);
}
function handleOnClickFirst(event) 
{
   if (first) first.scrollerClickHandler(event);
}
function handleOnMouseWheelFirst(event)
{
    if (first) first.wheel(event);
}

var first;

// second
function handleOnClickBarsecond(event) 
{
    if (second) second.movescroller(event);
}
function handleOnClickBarsecond_next(event) 
{
    if (second) second.movescroller_(event,1);
}
function handleOnClickBarsecond_prev(event) 
{
    if (second) second.movescroller_(event,-1);
}
function handleOnMouseDownsecond(event)
{
    if (second) second.drag(event);
}
function handleOnClicksecond(event) 
{
    if (second) second.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond(event)
{
    if (second) second.wheel(event);
}

var second;

// vertical
function handleOnClickBarVertical(event) 
{
    vertical.movescroller(event);
}
function handleOnMouseDownVertical(event)
{
    vertical.drag(event);
}
function handleOnClickVertical(event) 
{
    vertical.scrollerClickHandler(event);
}
function handleOnMouseWheelVertical(event)
{
    vertical.wheel(event);
}

var vertical;

// vertical_1
function handleOnClickBarVertical_1(event) 
{
    vertical_1.movescroller(event);
}
function handleOnMouseDownVertical_1(event)
{
    vertical_1.drag(event);
}
function handleOnClickVertical_1(event) 
{
    vertical_1.scrollerClickHandler(event);
}
function handleOnMouseWheelVertical_1(event)
{
    vertical_1.wheel(event);
}

var vertical_1;

// vertical
function handleOnClickBarVertical_2(event) 
{
    vertical_2.movescroller(event);
}
function handleOnMouseDownVertical_2(event)
{
    vertical_2.drag(event);
}
function handleOnClickVertical_2(event) 
{
    vertical_2.scrollerClickHandler(event);
}
function handleOnMouseWheelVertical_2(event)
{
    vertical_2.wheel(event);
}

var vertical_2;

// vertical
function handleOnClickBarVertical_3(event) 
{
    vertical_3.movescroller(event);
}
function handleOnMouseDownVertical_3(event)
{
    vertical_3.drag(event);
}
function handleOnClickVertical_3(event) 
{
    vertical_3.scrollerClickHandler(event);
}
function handleOnMouseWheelVertical_3(event)
{
    vertical_3.wheel(event);
}

var vertical_3;

// vertical
function handleOnClickBarVertical_4(event) 
{
    vertical_4.movescroller(event);
}
function handleOnMouseDownVertical_4(event)
{
    vertical_4.drag(event);
}
function handleOnClickVertical_4(event) 
{
    vertical_4.scrollerClickHandler(event);
}
function handleOnMouseWheelVertical_4(event)
{
    vertical_4.wheel(event);
}

var vertical_4;


// vertical
function handleOnClickBarVertical_5(event) 
{
    vertical_5.movescroller(event);
}
function handleOnMouseDownVertical_5(event)
{
    vertical_5.drag(event);
}
function handleOnClickVertical_5(event) 
{
    vertical_5.scrollerClickHandler(event);
}
function handleOnMouseWheelVertical_5(event)
{
    vertical_5.wheel(event);
}

var vertical_5;

// vertical
function handleOnClickBarVertical_6(event) 
{
    vertical_6.movescroller(event);
}
function handleOnMouseDownVertical_6(event)
{
    vertical_6.drag(event);
}
function handleOnClickVertical_6(event) 
{
    vertical_6.scrollerClickHandler(event);
}
function handleOnMouseWheelVertical_6(event)
{
    vertical_6.wheel(event);
}

var vertical_6;

// vertical
function handleOnClickBarVertical_7(event) 
{
    vertical_7.movescroller(event);
}
function handleOnMouseDownVertical_7(event)
{
    vertical_7.drag(event);
}
function handleOnClickVertical_7(event) 
{
    vertical_7.scrollerClickHandler(event);
}
function handleOnMouseWheelVertical_7(event)
{
    vertical_7.wheel(event);
}

var vertical_7;

// vertical
function handleOnClickBarVertical_8(event) 
{
    vertical_8.movescroller(event);
}
function handleOnMouseDownVertical_8(event)
{
    vertical_8.drag(event);
}
function handleOnClickVertical_8(event) 
{
    vertical_8.scrollerClickHandler(event);
}
function handleOnMouseWheelVertical_8(event)
{
    vertical_8.wheel(event);
}

var vertical_8;

// second9
function handleOnClickBarsecond9(event) 
{
    if (second9) second9.movescroller(event);
}
function handleOnClickBarsecond9_next(event) 
{
    if (second9) second9.movescroller_(event,1);
}
function handleOnClickBarsecond9_prev(event) 
{
    if (second9) second9.movescroller_(event,-1);
}
function handleOnMouseDownsecond9(event)
{
    if (second9) second9.drag(event);
}
function handleOnClicksecond9(event) 
{
    if (second9) second9.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond9(event)
{
    if (second9) second9.wheel(event);
}

var second9;

// second8
function handleOnClickBarsecond10(event) 
{
    if (second10) second10.movescroller(event);
}
function handleOnClickBarsecond10_next(event) 
{
    if (second10) second10.movescroller_(event,1);
}
function handleOnClickBarsecond10_prev(event) 
{
    if (second10) second10.movescroller_(event,-1);
}
function handleOnMouseDownsecond10(event)
{
    if (second10) second10.drag(event);
}
function handleOnClicksecond10(event) 
{
    if (second10) second10.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond10(event)
{
    if (second10) second10.wheel(event);
}

var second10;

function init()
{
	if (get("scroller_bar"))
	{
			first = new Scroll('scroller', 'scroller_bar', 'movemenu', 307);
			first.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			if (get('scroller_next')) get('scroller_next').onclick = handleOnClickBarFirst_next;    
			if (get('scroller_prev')) get('scroller_prev').onclick = handleOnClickBarFirst_prev;   
			 
			get('scroller_bar').onclick = handleOnClickBarFirst;    
			get('scroller').onmousedown = handleOnMouseDownFirst;
			get('scroller').onmouseup = handleOnMouseUp;
			get('scroller').onclick = handleOnClickFirst;    
		
			if (get('withscript').addEventListener)
				get('withscript').addEventListener('DOMMouseScroll', handleOnMouseWheelFirst, false);
			get('withscript').onmousewheel = handleOnMouseWheelFirst;
	}	
	if (get("scroller_bar_v"))
	{
			vertical = new VerticalScroll('scroller_v', 'scroller_bar_v', 'movemenu_v', 98);			
			vertical.prepare();
			
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			get('scroller_bar_v').onclick = handleOnClickBarVertical;			
			get('scroller_v').onmousedown = handleOnMouseDownVertical;
			get('scroller_v').onmouseup = handleOnMouseUp;
			get('scroller_v').onclick = handleOnClickVertical;   

			if (get('withscript_v').addEventListener)
				get('withscript_v').addEventListener('DOMMouseScroll', handleOnMouseWheelVertical, false);
			get('withscript_v').onmousewheel = handleOnMouseWheelVertical;
	}	
	if (get("scroller_bar_v_1"))
	{
			vertical_1 = new VerticalScroll('scroller_v_1', 'scroller_bar_v_1', 'movemenu_v_1', 133);			
			vertical_1.prepare();
			
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			get('scroller_bar_v_1').onclick = handleOnClickBarVertical_1;			
			get('scroller_v_1').onmousedown = handleOnMouseDownVertical_1;
			get('scroller_v_1').onmouseup = handleOnMouseUp;
			get('scroller_v_1').onclick = handleOnClickVertical_1;   

			if (get('withscript_v_1').addEventListener)
				get('withscript_v_1').addEventListener('DOMMouseScroll', handleOnMouseWheelVertical_1, false);
			get('withscript_v_1').onmousewheel = handleOnMouseWheelVertical_1;
	}	
	if (get("scroller_bar_v_2"))
	{
			vertical_2 = new VerticalScroll('scroller_v_2', 'scroller_bar_v_2', 'movemenu_v_2', 133);			
			vertical_2.prepare();
			
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			get('scroller_bar_v_2').onclick = handleOnClickBarVertical_2;			
			get('scroller_v_2').onmousedown = handleOnMouseDownVertical_2;
			get('scroller_v_2').onmouseup = handleOnMouseUp;
			get('scroller_v_2').onclick = handleOnClickVertical_2;   

			if (get('withscript_v_2').addEventListener)
				get('withscript_v_2').addEventListener('DOMMouseScroll', handleOnMouseWheelVertical_2, false);
			get('withscript_v_2').onmousewheel = handleOnMouseWheelVertical_2;
	}	
	
	if (get("scroller_bar_v_3"))
	{
			vertical_3 = new VerticalScroll('scroller_v_3', 'scroller_bar_v_3', 'movemenu_v_3', 68);			
			vertical_3.prepare();
			
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			get('scroller_bar_v_3').onclick = handleOnClickBarVertical_3;			
			get('scroller_v_3').onmousedown = handleOnMouseDownVertical_3;
			get('scroller_v_3').onmouseup = handleOnMouseUp;
			get('scroller_v_3').onclick = handleOnClickVertical_3;   

			if (get('withscript_v_3').addEventListener)
				get('withscript_v_3').addEventListener('DOMMouseScroll', handleOnMouseWheelVertical_3, false);
			get('withscript_v_3').onmousewheel = handleOnMouseWheelVertical_3;
	}	
	
	if (get("scroller_bar_v_4"))
	{
			vertical_4 = new VerticalScroll('scroller_v_4', 'scroller_bar_v_4', 'movemenu_v_4', 274);			
			vertical_4.prepare();
			
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			get('scroller_bar_v_4').onclick = handleOnClickBarVertical_4;			
			get('scroller_v_4').onmousedown = handleOnMouseDownVertical_4;
			get('scroller_v_4').onmouseup = handleOnMouseUp;
			get('scroller_v_4').onclick = handleOnClickVertical_4;   

			if (get('withscript_v_4').addEventListener)
				get('withscript_v_4').addEventListener('DOMMouseScroll', handleOnMouseWheelVertical_4, false);
			get('withscript_v_4').onmousewheel = handleOnMouseWheelVertical_4;
	}	
	
	if (get("scroller_bar_v_5"))
	{
			vertical_5 = new VerticalScroll('scroller_v_5', 'scroller_bar_v_5', 'movemenu_v_5', 289);			
			vertical_5.prepare();
			
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			get('scroller_bar_v_5').onclick = handleOnClickBarVertical_5;			
			get('scroller_v_5').onmousedown = handleOnMouseDownVertical_5;
			get('scroller_v_5').onmouseup = handleOnMouseUp;
			get('scroller_v_5').onclick = handleOnClickVertical_5;   

			if (get('withscript_v_5').addEventListener)
				get('withscript_v_5').addEventListener('DOMMouseScroll', handleOnMouseWheelVertical_5, false);
			get('withscript_v_5').onmousewheel = handleOnMouseWheelVertical_5;
	}	
	
	
	if (get("scroller_bar_v_6"))
	{
			vertical_6 = new VerticalScroll('scroller_v_6', 'scroller_bar_v_6', 'movemenu_v_6', 133);			
			vertical_6.prepare();
			
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			get('scroller_bar_v_6').onclick = handleOnClickBarVertical_6;			
			get('scroller_v_6').onmousedown = handleOnMouseDownVertical_6;
			get('scroller_v_6').onmouseup = handleOnMouseUp;
			get('scroller_v_6').onclick = handleOnClickVertical_6;   

			if (get('withscript_v_6').addEventListener)
				get('withscript_v_6').addEventListener('DOMMouseScroll', handleOnMouseWheelVertical_6, false);
			get('withscript_v_6').onmousewheel = handleOnMouseWheelVertical_6;
	}	
	
	if (get("scroller_bar_v_7"))
	{
			vertical_7 = new VerticalScroll('scroller_v_7', 'scroller_bar_v_7', 'movemenu_v_7', 98);			
			vertical_7.prepare();
			
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			get('scroller_bar_v_7').onclick = handleOnClickBarVertical_7;			
			get('scroller_v_7').onmousedown = handleOnMouseDownVertical_7;
			get('scroller_v_7').onmouseup = handleOnMouseUp;
			get('scroller_v_7').onclick = handleOnClickVertical_7;   

			if (get('withscript_v_7').addEventListener)
				get('withscript_v_7').addEventListener('DOMMouseScroll', handleOnMouseWheelVertical_7, false);
			get('withscript_v_7').onmousewheel = handleOnMouseWheelVertical_7;
	}	

	if (get("scroller_bar_v_8_0"))
	{
			vertical_8 = new VerticalScroll('scroller_v_8_0', 'scroller_bar_v_8_0', 'movemenu_v_8_0', 98);			
			vertical_8.prepare();
			
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			get('scroller_bar_v_8_0').onclick = handleOnClickBarVertical_8;			
			get('scroller_v_8_0').onmousedown = handleOnMouseDownVertical_8;
			get('scroller_v_8_0').onmouseup = handleOnMouseUp;
			get('scroller_v_8_0').onclick = handleOnClickVertical_8;   

			if (get('withscript_v_8_0').addEventListener)
				get('withscript_v_8_0').addEventListener('DOMMouseScroll', handleOnMouseWheelVertical_8, false);
			get('withscript_v_8_0').onmousewheel = handleOnMouseWheelVertical_8;
	}	
		
	if (get("scroller_bar10"))
	{
			second10 = new Scroll('scroller10', 'scroller_bar10', 'movemenu10', 521);
			second10.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;			 
			 
			get('scroller_bar10').onclick = handleOnClickBarsecond10;    
			get('scroller10').onmousedown = handleOnMouseDownsecond10;
			get('scroller10').onmouseup = handleOnMouseUp;
			get('scroller10').onclick = handleOnClicksecond10; 
			
//			if (get('withscript10').addEventListener)
//				get('withscript10').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond10, false);
//			get('withscript10').onmousewheel = handleOnMouseWheelsecond10;
			
	}			
}
if (window.attachEvent) {window.attachEvent("onload", init);}

function gettrum(url,id) {
	url=url.replace("ThumbnailImage.aspx?","ThumbnailImageGetStr.aspx?idimg="+id+"&");
   	makeHttpRequest(url, 'displaytrum', 'text');
}
function displaytrum(text) { 
	eval(text);		
}
