document.write(unescape('%3Cstyle type="text/css"%3Ediv#ISelements { overflow: hidden }%3C/style%3E'));

var IS_scroll_timer;
var IS_scroll_increment = 10;
var IS_scroll_interval = 10;

function IS_moveElements(direction) {
	var this_x = this.getScroll().x;
	if(direction=='left') {
		this_x -= IS_scroll_increment;
	} else {
		this_x += IS_scroll_increment;
	}
	var move = new Fx.Scroll(this, { 
		duration: IS_scroll_interval/2,
		onComplete: function () {
			this_x = $('ISelements').getScroll().x;
			if(this_x==0) {
				$('ISscrollerLeft').style.display = 'none';
				if($('ISelements').getElement('ul').getSize().x > $('ISelements').getSize().x) {
					$('ISscrollerRight').style.display = 'block';
				}
				clearInterval(IS_scroll_timer);
			} else if(this_x==($('ISelements').getElement('ul').getSize().x-$('ISelements').getSize().x)) {
				$('ISscrollerRight').style.display = 'none';
				clearInterval(IS_scroll_timer);
			} else {
				$('ISscrollerLeft').style.display = 'block';
				$('ISscrollerRight').style.display = 'block';
			}
		}
	}).start(this_x, 0);
}

function init_IconSlideshow() {
	var IS = $('IconSlideshow');
	var ISe = $('ISelements');

	var scrollerLeft = new Element('div', {
		'id': 'ISscrollerLeft',
		'styles' : {
			'display' : 'none',
			'position' : 'absolute',
			'left' : '0',
			'top' : ISe.getPosition(IS).y
		},
		'events': {
			'mouseover' : function () {
				IS_scroll_timer = IS_moveElements.periodical(IS_scroll_interval, ISe, 'left');
			},
			'mouseout' : function () {
				clearInterval(IS_scroll_timer);
			}
		}
	});
	
	var scrollerRight = new Element('div', {
		'id': 'ISscrollerRight',
		'styles' : {
			'display' : ISe.getElement('ul').getSize().x > ISe.getSize().x ? 'block' : 'none',
			'position' : 'absolute',
			'right' : '0',
			'top' : ISe.getPosition(IS).y
		},
		'events': {
			'mouseover' : function () {
				IS_scroll_timer = IS_moveElements.periodical(IS_scroll_interval, ISe, 'right');
			},
			'mouseout' : function () {
				clearInterval(IS_scroll_timer);
			}
		}
	});

	IS.grab(scrollerLeft);
	IS.grab(scrollerRight);

	
}

