/*
* Скрипт реализующий горизонтальный скроллер бар
* обрататывает события перемещения скроллера мышью,
* клик по линнии скролла
* прокрутка колесом мыши.
* Автоподгон ширины скроллера
*/

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;
    this.menuTrackWidth;

    this.scrollerWidth;
    this.menuWidth = widthAll;

    this.touchpageXstart;
    this.touchpageYstart;
    this.touchpageXmove;
    this.touchpageYmove;

    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";
            }
        }
        if (isNaN(this.delta)) { this.delta = 0; }
        if (this.delta==Infinity) { 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.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;
        }
    }
	
    this.wheel2 = function(e) {
		if(e.touches.length == 1){ // Only deal with one finger
			var touch = e.touches[0]; // Get the information for finger #1
			var node = touch.target; // Find the node the drag started from
			this.touchpageXstart=touch.pageX;			
		}
    }

    this.wheel3 = function(e) {
		if(e.touches.length == 1){ // Only deal with one finger
			var touch = e.touches[0]; // Get the information for finger #1
			var node = touch.target; // Find the node the drag started from
			this.touchpageXmove=touch.pageX;
			
			delta=this.touchpageXmove-this.touchpageXstart;
			
			this.handle(delta, event);
            this.cancelWheelAction(event);
            this.fixForBrowsers(event);
            return false;		
		}
    }	

}

VerticalScroll = function (scroller, scroller_bar, menu)
{
    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 = 190;
    this.menuTrackWidth;

    this.scrollerWidth;
    this.menuWidth = 190;

    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()
    {
        //this.step = Math.round(this.scrollerWidth / 3 * 2);
        this.step = Math.round(this.menu.getElementsByTagName("td")['0'].offsetHeight * this.scrollerTrackWidth / this.menuTrackWidth);    
    }

    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 (first_1) first_1.drop(event);
    if (first_2) first_2.drop(event);
    if (first_3) first_3.drop(event);
    if (first_4) first_4.drop(event);
    if (second) second.drop(event);
    if (second22) second22.drop(event);
    if (second3) second3.drop(event);
    if (second4) second4.drop(event);
    if (second5) second5.drop(event);
    if (second6) second6.drop(event);
    if (second7) second7.drop(event);
    if (second8) second8.drop(event);	
    if (second10) second10.drop(event);	
    if (vertical) vertical.drop(event);	
}
function handleOnMouseMove(event)
{
    if (first) first.move(event);
    if (first_1) first_1.move(event);
    if (first_2) first_2.move(event);
    if (first_3) first_3.move(event);
    if (first_4) first_4.move(event);
    if (second) second.move(event);
    if (second22) second22.move(event);
    if (second3) second3.move(event);
    if (second4) second4.move(event);
    if (second5) second5.move(event);
    if (second6) second6.move(event);
    if (second7) second7.move(event);
    if (second8) second8.move(event);
    if (second10) second10.move(event);
    if (vertical) vertical.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);
}
function handleOnMousetouchstartFirst(event)
{
    if (first) first.wheel2(event);
}
function handleOnMousetouchmoveFirst(event)
{
    if (first) first.wheel3(event);
}
var first;

// first_1
function handleOnClickBarFirst_1(event) 
{
    if (first_1) first_1.movescroller(event);
}
function handleOnClickBarFirst_1_next(event) 
{
    first_1.movescroller_(event,1);
}
function handleOnClickBarFirst_1_prev(event) 
{
   if (first_1) first_1.movescroller_(event,-1);
}
function handleOnMouseDownFirst_1(event)
{
    if (first_1) first_1.drag(event);
}
function handleOnClickFirst_1(event) 
{
   if (first_1) first_1.scrollerClickHandler(event);
}
function handleOnMouseWheelFirst_1(event)
{
    if (first_1) first_1.wheel(event);
}
function handleOnMousetouchstartFirst_1(event)
{
    if (first_1) first_1.wheel2(event);
}
function handleOnMousetouchmoveFirst_1(event)
{
    if (first_1) first_1.wheel3(event);
}
var first_1;

// first_2
function handleOnClickBarFirst_2(event) 
{
    if (first_2) first_2.movescroller(event);
}
function handleOnClickBarFirst_2_next(event) 
{
    first_2.movescroller_(event,1);
}
function handleOnClickBarFirst_2_prev(event) 
{
   if (first_2) first_2.movescroller_(event,-1);
}
function handleOnMouseDownFirst_2(event)
{
    if (first_2) first_2.drag(event);
}
function handleOnClickFirst_2(event) 
{
   if (first_2) first_2.scrollerClickHandler(event);
}
function handleOnMouseWheelFirst_2(event)
{
    if (first_2) first_2.wheel(event);
}
function handleOnMousetouchstartFirst_2(event)
{
    if (first_2) first_2.wheel2(event);
}
function handleOnMousetouchmoveFirst_2(event)
{
    if (first_2) first_2.wheel3(event);
}
var first_2;

// first_3
function handleOnClickBarFirst_3(event) 
{
    if (first_3) first_3.movescroller(event);
}
function handleOnClickBarFirst_3_next(event) 
{
    first_3.movescroller_(event,1);
}
function handleOnClickBarFirst_3_prev(event) 
{
   if (first_3) first_3.movescroller_(event,-1);
}
function handleOnMouseDownFirst_3(event)
{
    if (first_3) first_3.drag(event);
}
function handleOnClickFirst_3(event) 
{
   if (first_3) first_3.scrollerClickHandler(event);
}
function handleOnMouseWheelFirst_3(event)
{
    if (first_3) first_3.wheel(event);
}
function handleOnMousetouchstartFirst_3(event)
{
    if (first_3) first_3.wheel2(event);
}
function handleOnMousetouchmoveFirst_3(event)
{
    if (first_3) first_3.wheel3(event);
}
var first_3;

// first_4
function handleOnClickBarFirst_4(event) 
{
    if (first_4) first_4.movescroller(event);
}
function handleOnClickBarFirst_4_next(event) 
{
    first_4.movescroller_(event,1);
}
function handleOnClickBarFirst_4_prev(event) 
{
   if (first_4) first_4.movescroller_(event,-1);
}
function handleOnMouseDownFirst_4(event)
{
    if (first_4) first_4.drag(event);
}
function handleOnClickFirst_4(event) 
{
   if (first_4) first_4.scrollerClickHandler(event);
}
function handleOnMouseWheelFirst_4(event)
{
    if (first_4) first_4.wheel(event);
}
function handleOnMousetouchstartFirst_4(event)
{
    if (first_4) first_4.wheel2(event);
}
function handleOnMousetouchmoveFirst_4(event)
{
    if (first_4) first_4.wheel3(event);
}
var first_4;


// 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);
}
function handleOnMousetouchstartsecond(event)
{
    if (second) second.wheel2(event);
}
function handleOnMousetouchmovesecond(event)
{
    if (second) second.wheel3(event);
}


var second;


// second
function handleOnClickBarsecond22(event) 
{
    if (second22) second22.movescroller(event);
}
function handleOnClickBarsecond22_next(event) 
{
    if (second22) second22.movescroller_(event,1);
}
function handleOnClickBarsecond22_prev(event) 
{
    if (second22) second22.movescroller_(event,-1);
}
function handleOnMouseDownsecond22(event)
{
    if (second22) second22.drag(event);
}
function handleOnClicksecond22(event) 
{
    if (second22) second22.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond22(event)
{
    if (second22) second22.wheel(event);
}
function handleOnMousetouchstartsecond22(event)
{
    if (second22) second22.wheel2(event);
}
function handleOnMousetouchmovesecond22(event)
{
    if (second22) second22.wheel3(event);
}


var second22;


// second3
function handleOnClickBarsecond3(event) 
{
    if (second3) second3.movescroller(event);
}
function handleOnClickBarsecond3_next(event) 
{
    if (second3) second3.movescroller_(event,1);
}
function handleOnClickBarsecond3_prev(event) 
{
    if (second3) second3.movescroller_(event,-1);
}
function handleOnMouseDownsecond3(event)
{
    if (second3) second3.drag(event);
}
function handleOnClicksecond3(event) 
{
    if (second3) second3.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond3(event)
{
    if (second3) second3.wheel(event);
}
function handleOnMousetouchstartsecond3(event)
{
    if (second3) second3.wheel2(event);
}
function handleOnMousetouchmovesecond3(event)
{
    if (second3) second3.wheel3(event);
}

var second3;

// second4
function handleOnClickBarsecond4(event) 
{
    if (second4) second4.movescroller(event);
}
function handleOnClickBarsecond4_next(event) 
{
    if (second4) second4.movescroller_(event,1);
}
function handleOnClickBarsecond4_prev(event) 
{
    if (second4) second4.movescroller_(event,-1);
}
function handleOnMouseDownsecond4(event)
{
    if (second4) second4.drag(event);
}
function handleOnClicksecond4(event) 
{
    if (second4) second4.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond4(event)
{
    if (second4) second4.wheel(event);
}
function handleOnMousetouchstartsecond4(event)
{
    if (second4) second4.wheel2(event);
}
function handleOnMousetouchmovesecond4(event)
{
    if (second4) second4.wheel3(event);
}

var second4;

// second5
function handleOnClickBarsecond5(event) 
{
    if (second5) second5.movescroller(event);
}
function handleOnClickBarsecond_next5(event) 
{
    if (second5) second5.movescroller_(event,1);
}
function handleOnClickBarsecond_prev5(event) 
{
    if (second5) second5.movescroller_(event,-1);
}
function handleOnMouseDownsecond5(event)
{
    if (second5) second5.drag(event);
}
function handleOnClicksecond5(event) 
{
    if (second5) second5.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond5(event)
{
    if (second5) second5.wheel(event);
}
function handleOnMousetouchstartsecond5(event)
{
    if (second5) second5.wheel2(event);
}
function handleOnMousetouchmovesecond5(event)
{
    if (second5) second5.wheel3(event);
}

var second5;

// second6
function handleOnClickBarsecond6(event) 
{
    if (second6) second6.movescroller(event);
}
function handleOnClickBarsecond_next6(event) 
{
    if (second6) second6.movescroller_(event,1);
}
function handleOnClickBarsecond_prev6(event) 
{
    if (second6) second6.movescroller_(event,-1);
}
function handleOnMouseDownsecond6(event)
{
    if (second6) second6.drag(event);
}
function handleOnClicksecond6(event) 
{
    if (second6) second6.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond6(event)
{
    if (second6) second6.wheel(event);
}
function handleOnMousetouchstartsecond6(event)
{
    if (second6) second6.wheel2(event);
}
function handleOnMousetouchmovesecond6(event)
{
    if (second6) second6.wheel3(event);
}

var second6;

// second
function handleOnClickBarsecond7(event) 
{
    if (second7) second7.movescroller(event);
}
function handleOnClickBarsecond_next7(event) 
{
    if (second7) second7.movescroller_(event,1);
}
function handleOnClickBarsecond_prev7(event) 
{
    if (second7) second7.movescroller_(event,-1);
}
function handleOnMouseDownsecond7(event)
{
    if (second7) second7.drag(event);
}
function handleOnClicksecond7(event) 
{
    if (second7) second7.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond7(event)
{
    if (second7) second7.wheel(event);
}
function handleOnMousetouchstartsecond7(event)
{
    if (second7) second7.wheel2(event);
}
function handleOnMousetouchmovesecond7(event)
{
    if (second7) second7.wheel3(event);
}

var second7;

// second8
function handleOnClickBarsecond8(event) 
{
    if (second8) second8.movescroller(event);
}
function handleOnClickBarsecond8_next(event) 
{
    if (second8) second8.movescroller_(event,1);
}
function handleOnClickBarsecond8_prev(event) 
{
    if (second8) second8.movescroller_(event,-1);
}
function handleOnMouseDownsecond8(event)
{
    if (second8) second8.drag(event);
}
function handleOnClicksecond8(event) 
{
    if (second8) second8.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond8(event)
{
    if (second8) second8.wheel(event);
}
function handleOnMousetouchstartsecond8(event)
{
    if (second8) second8.wheel2(event);
}
function handleOnMousetouchmovesecond8(event)
{
    if (second8) second8.wheel3(event);
}

var second8;

// 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);
}
function handleOnMousetouchstartsecond9(event)
{
    if (second9) second9.wheel2(event);
}
function handleOnMousetouchmovesecond9(event)
{
    if (second9) second9.wheel3(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);
}
function handleOnMousetouchstartsecond10(event)
{
    if (second10) second10.wheel2(event);
}
function handleOnMousetouchmovesecond10(event)
{
    if (second10) second10.wheel3(event);
}

var second10;

// second8
function handleOnClickBarsecond11(event) 
{
    if (second11) second11.movescroller(event);
}
function handleOnClickBarsecond11_next(event) 
{
    if (second11) second11.movescroller_(event,1);
}
function handleOnClickBarsecond11_prev(event) 
{
    if (second11) second11.movescroller_(event,-1);
}
function handleOnMouseDownsecond11(event)
{
    if (second11) second11.drag(event);
}
function handleOnClicksecond11(event) 
{
    if (second11) second11.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond11(event)
{
    if (second11) second11.wheel(event);
}
function handleOnMousetouchstartsecond11(event)
{
    if (second11) second11.wheel2(event);
}
function handleOnMousetouchmovesecond11(event)
{
    if (second11) second11.wheel3(event);
}

var second11;


function handleOnClickBarsecond111(event) 
{
    if (second111) second111.movescroller(event);
}
function handleOnClickBarsecond111_next(event) 
{
    if (second111) second111.movescroller_(event,1);
}
function handleOnClickBarsecond111_prev(event) 
{
    if (second111) second111.movescroller_(event,-1);
}
function handleOnMouseDownsecond111(event)
{
    if (second111) second111.drag(event);
}
function handleOnClicksecond111(event) 
{
    if (second111) second111.scrollerClickHandler(event);
}
function handleOnMouseWheelsecond111(event)
{
    if (second111) second111.wheel(event);
}
function handleOnMousetouchstartsecond111(event)
{
    if (second111) second111.wheel2(event);
}
function handleOnMousetouchmovesecond111(event)
{
    if (second111) second111.wheel3(event);
}

var second111;




// 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;

function handleOnClickBarsecond11_prevMY(event)
{
    new_show_prev();
	handleOnClickBarsecond11_prev(event);	
}
function handleOnClickBarsecond11_nextMY(event)
{
    new_show_next();
	handleOnClickBarsecond11_next(event);	
}
function handleOnClickBarsecond111_prevMY(event)
{
    new_show_prev_new();
	handleOnClickBarsecond111_prev(event);	
}
function handleOnClickBarsecond111_nextMY(event)
{
    new_show_next_new();
	handleOnClickBarsecond111_next(event);	
}



function init()
{
	if (get("scroller_bar"))
	{
			first = new Scroll('scroller', 'scroller_bar', 'movemenu', 620);
			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;
			
			get('withscript').ontouchmove = handleOnMousetouchmoveFirst;
			get('withscript').ontouchstart = handleOnMousetouchstartFirst;
			
	}
	
	if (get("scroller_bar_1"))
	{
			first_1 = new Scroll('scroller_1', 'scroller_bar_1', 'movemenu_1', 620);
			first_1.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			if (get('scroller_next_1')) get('scroller_next_1').onclick = handleOnClickBarFirst_1_next;    
			if (get('scroller_prev_1')) get('scroller_prev_1').onclick = handleOnClickBarFirst_1_prev;   
			 
			get('scroller_bar_1').onclick = handleOnClickBarFirst_1;    
			get('scroller_1').onmousedown = handleOnMouseDownFirst_1;
			get('scroller_1').onmouseup = handleOnMouseUp;
			get('scroller_1').onclick = handleOnClickFirst_1;    
		
			if (get('withscript_1').addEventListener)
				get('withscript_1').addEventListener('DOMMouseScroll', handleOnMouseWheelFirst_1, false);
			get('withscript_1').onmousewheel = handleOnMouseWheelFirst_1;
			
			get('withscript_1').ontouchmove = handleOnMousetouchmoveFirst_1;
			get('withscript_1').ontouchstart = handleOnMousetouchstartFirst_1;
			
	}
	
	if (get("scroller_bar_2"))
	{
			first_2 = new Scroll('scroller_2', 'scroller_bar_2', 'movemenu_2', 620);
			first_2.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			if (get('scroller_next_2')) get('scroller_next_2').onclick = handleOnClickBarFirst_2_next;    
			if (get('scroller_prev_2')) get('scroller_prev_2').onclick = handleOnClickBarFirst_2_prev;   
			 
			get('scroller_bar_2').onclick = handleOnClickBarFirst_2;    
			get('scroller_2').onmousedown = handleOnMouseDownFirst_2;
			get('scroller_2').onmouseup = handleOnMouseUp;
			get('scroller_2').onclick = handleOnClickFirst_2;    
		
			if (get('withscript_2').addEventListener)
				get('withscript_2').addEventListener('DOMMouseScroll', handleOnMouseWheelFirst_2, false);
			get('withscript_2').onmousewheel = handleOnMouseWheelFirst_2;
			
			get('withscript_2').ontouchmove = handleOnMousetouchmoveFirst_2;
			get('withscript_2').ontouchstart = handleOnMousetouchstartFirst_2;
			
	}
	
	if (get("scroller_bar_3"))
	{
			first_3 = new Scroll('scroller_3', 'scroller_bar_3', 'movemenu_3', 620);
			first_3.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			if (get('scroller_next_3')) get('scroller_next_3').onclick = handleOnClickBarFirst_3_next;    
			if (get('scroller_prev_3')) get('scroller_prev_3').onclick = handleOnClickBarFirst_3_prev;   
			 
			get('scroller_bar_3').onclick = handleOnClickBarFirst_3;    
			get('scroller_3').onmousedown = handleOnMouseDownFirst_3;
			get('scroller_3').onmouseup = handleOnMouseUp;
			get('scroller_3').onclick = handleOnClickFirst_3;    
		
			if (get('withscript_3').addEventListener)
				get('withscript_3').addEventListener('DOMMouseScroll', handleOnMouseWheelFirst_3, false);
			get('withscript_3').onmousewheel = handleOnMouseWheelFirst_3;
			
			get('withscript_3').ontouchmove = handleOnMousetouchmoveFirst_3;
			get('withscript_3').ontouchstart = handleOnMousetouchstartFirst_3;
			
	}
	
	if (get("scroller_bar_4"))
	{
			first_4 = new Scroll('scroller_4', 'scroller_bar_4', 'movemenu_4', 620);
			first_4.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			if (get('scroller_next_4')) get('scroller_next_4').onclick = handleOnClickBarFirst_4_next;    
			if (get('scroller_prev_4')) get('scroller_prev_4').onclick = handleOnClickBarFirst_4_prev;   
			 
			get('scroller_bar_4').onclick = handleOnClickBarFirst_4;    
			get('scroller_4').onmousedown = handleOnMouseDownFirst_4;
			get('scroller_4').onmouseup = handleOnMouseUp;
			get('scroller_4').onclick = handleOnClickFirst_4;    
		
			if (get('withscript_4').addEventListener)
				get('withscript_4').addEventListener('DOMMouseScroll', handleOnMouseWheelFirst_4, false);
			get('withscript_4').onmousewheel = handleOnMouseWheelFirst_4;
			
			get('withscript_4').ontouchmove = handleOnMousetouchmoveFirst_4;
			get('withscript_4').ontouchstart = handleOnMousetouchstartFirst_4;
			
	}
	
	if (get("scroller_bar2"))
	{
			second = new Scroll('scroller2', 'scroller_bar2', 'movemenu2', 300);
			second.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			 
			get('scroller_bar2').onclick = handleOnClickBarsecond;    
			get('scroller2').onmousedown = handleOnMouseDownsecond;
			get('scroller2').onmouseup = handleOnMouseUp;
			get('scroller2').onclick = handleOnClicksecond;    
		
			if (get('withscript2').addEventListener)
				get('withscript2').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond, false);
			get('withscript2').onmousewheel = handleOnMouseWheelsecond;
			
			get('withscript2').ontouchmove = handleOnMousetouchmovesecond;
			get('withscript2').ontouchstart = handleOnMousetouchstartsecond;
			
	}
	
	if (get("scroller_bar22"))
	{
			second22 = new Scroll('scroller22', 'scroller_bar22', 'movemenu22', 300);
			second22.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			 
			get('scroller_bar22').onclick = handleOnClickBarsecond22;    
			get('scroller22').onmousedown = handleOnMouseDownsecond22;
			get('scroller22').onmouseup = handleOnMouseUp;
			get('scroller22').onclick = handleOnClicksecond22;    
		
			if (get('withscript22').addEventListener)
				get('withscript22').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond22, false);
			get('withscript22').onmousewheel = handleOnMouseWheelsecond22;
			
			get('withscript22').ontouchmove = handleOnMousetouchmovesecond22;
			get('withscript22').ontouchstart = handleOnMousetouchstartsecond22;
			
	}	
		
	if (get("scroller_bar3"))
	{
			second3 = new Scroll('scroller3', 'scroller_bar3', 'movemenu3', 800);
			second3.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			if (get('scroller_next3')) get('scroller_next3').onclick = handleOnClickBarsecond3_next;    
			if (get('scroller_prev3')) get('scroller_prev3').onclick = handleOnClickBarsecond3_prev;   
			 
			 
			get('scroller_bar3').onclick = handleOnClickBarsecond3;    
			get('scroller3').onmousedown = handleOnMouseDownsecond3;
			get('scroller3').onmouseup = handleOnMouseUp;
			get('scroller3').onclick = handleOnClicksecond3;    
		
			get('withscript3').ontouchmove = handleOnMousetouchmovesecond3;
			get('withscript3').ontouchstart = handleOnMousetouchstartsecond3;
		
//			if (get('withscript3').addEventListener)
//				get('withscript3').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond3, false);
//			get('withscript3').onmousewheel = handleOnMouseWheelsecond3;
	}
	
	if (get("scroller_bar4"))
	{
			second4 = new Scroll('scroller4', 'scroller_bar4', 'movemenu4', 642);
			second4.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			if (get('scroller_next4')) get('scroller_next4').onclick = handleOnClickBarsecond4_next;    
			if (get('scroller_prev4')) get('scroller_prev4').onclick = handleOnClickBarsecond4_prev;   
			 
			 
			get('scroller_bar4').onclick = handleOnClickBarsecond4;    
			get('scroller4').onmousedown = handleOnMouseDownsecond4;
			get('scroller4').onmouseup = handleOnMouseUp;
			get('scroller4').onclick = handleOnClicksecond4;    
		
			get('withscript4').ontouchmove = handleOnMousetouchmovesecond4;
			get('withscript4').ontouchstart = handleOnMousetouchstartsecond4;
//			if (get('withscript4').addEventListener)
//				get('withscript4').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond4, false);
//			get('withscript4').onmousewheel = handleOnMouseWheelsecond4;
	}
	if (get("scroller_bar5"))
	{
			second5 = new Scroll('scroller5', 'scroller_bar5', 'movemenu5', 620);
			second5.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			 
			get('scroller_bar5').onclick = handleOnClickBarsecond5;    
			get('scroller5').onmousedown = handleOnMouseDownsecond5;
			get('scroller5').onmouseup = handleOnMouseUp;
			get('scroller5').onclick = handleOnClicksecond5;    
		
			if (get('withscript5').addEventListener)
				get('withscript5').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond5, false);
			get('withscript5').onmousewheel = handleOnMouseWheelsecond5;
			
			get('withscript5').ontouchmove = handleOnMousetouchmovesecond5;
			get('withscript5').ontouchstart = handleOnMousetouchstartsecond5;
			
	}		
	if (get("scroller_bar_v"))
	{
			vertical = new VerticalScroll('scroller_v', 'scroller_bar_v', 'movemenu_v');			
			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_bar6"))
	{
			second6 = new Scroll('scroller6', 'scroller_bar6', 'movemenu6', 460);
			second6.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			 
			get('scroller_bar6').onclick = handleOnClickBarsecond6;    
			get('scroller6').onmousedown = handleOnMouseDownsecond6;
			get('scroller6').onmouseup = handleOnMouseUp;
			get('scroller6').onclick = handleOnClicksecond6;    
		
			if (get('withscript6').addEventListener)
				get('withscript6').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond6, false);
			get('withscript6').onmousewheel = handleOnMouseWheelsecond6;
			
			get('withscript6').ontouchmove = handleOnMousetouchmovesecond6;
			get('withscript6').ontouchstart = handleOnMousetouchstartsecond6;
			
	}	
	
	if (get("scroller_bar7"))
	{
			second7 = new Scroll('scroller7', 'scroller_bar7', 'movemenu7', 300);
			second7.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;
			 
			get('scroller_bar7').onclick = handleOnClickBarsecond7;    
			get('scroller7').onmousedown = handleOnMouseDownsecond7;
			get('scroller7').onmouseup = handleOnMouseUp;
			get('scroller7').onclick = handleOnClicksecond7;    
		
			if (get('withscript7').addEventListener)
				get('withscript7').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond7, false);
			get('withscript7').onmousewheel = handleOnMouseWheelsecond7;
			
			get('withscript7').ontouchmove = handleOnMousetouchmovesecond7;
			get('withscript7').ontouchstart = handleOnMousetouchstartsecond7;
			
	}
	
	if (get("scroller_bar8"))
	{
			second8 = new Scroll('scroller8', 'scroller_bar8', 'movemenu8', 495);
			second8.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;			 
			 
			get('scroller_bar8').onclick = handleOnClickBarsecond8;    
			get('scroller8').onmousedown = handleOnMouseDownsecond8;
			get('scroller8').onmouseup = handleOnMouseUp;
			get('scroller8').onclick = handleOnClicksecond8; 
			
			if (get('withscript8').addEventListener)
				get('withscript8').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond8, false);
			get('withscript8').onmousewheel = handleOnMouseWheelsecond8;
			
			get('withscript8').ontouchmove = handleOnMousetouchmovesecond8;
			get('withscript8').ontouchstart = handleOnMousetouchstartsecond8;
			
	}	
	
	if (get("scroller_bar10"))
	{
			second10 = new Scroll('scroller10', 'scroller_bar10', 'movemenu10', 329);
			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; 
			
			get('withscript10').ontouchmove = handleOnMousetouchmovesecond10;
			get('withscript10').ontouchstart = handleOnMousetouchstartsecond10;
			
//			if (get('withscript10').addEventListener)
//				get('withscript10').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond10, false);
//			get('withscript10').onmousewheel = handleOnMouseWheelsecond10;
			
	}		

	if (get("scroller_bar11"))
	{
			second11 = new Scroll('scroller11', 'scroller_bar11', 'movemenu11', 180);
			second11.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			if (get('scroller_next11')) get('scroller_next11').onclick = handleOnClickBarsecond11_nextMY;    
			if (get('scroller_prev11')) get('scroller_prev11').onclick = handleOnClickBarsecond11_prevMY;   
			
			 
			get('scroller_bar11').onclick = handleOnClickBarsecond11;    
			get('scroller11').onmousedown = handleOnMouseDownsecond11;
			get('scroller11').onmouseup = handleOnMouseUp;
			get('scroller11').onclick = handleOnClicksecond11; 
			
			get('withscript11').ontouchmove = handleOnMousetouchmovesecond11;
			get('withscript11').ontouchstart = handleOnMousetouchstartsecond11;
			
//			if (get('withscript11').addEventListener)
//				get('withscript11').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond11, false);
//			get('withscript11').onmousewheel = handleOnMouseWheelsecond11;
			
	}		

	if (get("scroller_bar111"))
	{
			second111 = new Scroll('scroller111', 'scroller_bar111', 'movemenu111', 180);
			second111.prepare();
			document.onmousemove = handleOnMouseMove;
			window.onmouseup = handleOnMouseUp;		
			if (get('scroller_next111')) get('scroller_next111').onclick = handleOnClickBarsecond111_nextMY;    
			if (get('scroller_prev111')) get('scroller_prev111').onclick = handleOnClickBarsecond111_prevMY;   
			
			 
			get('scroller_bar111').onclick = handleOnClickBarsecond111;    
			get('scroller111').onmousedown = handleOnMouseDownsecond111;
			get('scroller111').onmouseup = handleOnMouseUp;
			get('scroller111').onclick = handleOnClicksecond111; 
			
			get('withscript111').ontouchmove = handleOnMousetouchmovesecond111;
			get('withscript111').ontouchstart = handleOnMousetouchstartsecond111;
			
//			if (get('withscript11').addEventListener)
//				get('withscript11').addEventListener('DOMMouseScroll', handleOnMouseWheelsecond11, false);
//			get('withscript11').onmousewheel = handleOnMouseWheelsecond11;
			
	}		


}
if (window.attachEvent) {window.attachEvent("onload", init);}


