		var SLIDESHOW = (function(){
			/*var rotator = $('list_rotator');
			var slideshow = FSite2.getElementsByClassName('slideshow');
			var active = FSite2.getElementsByClassName('num active',rotator);
			var num_count = parseInt(slideshow[0]._slideShow.getCount());
			var num = FSite2.getElementsByClassName('num',rotator);*/
			
			var rotator, slideshow, active, num_count, num,init_slideshow;
			
			function rot_next()
			{
				var active = FSite2.getElementsByClassName('num active',rotator);
				var id = active[0].getAttribute("id");
				id = id.split("_");
				id = parseInt(id[1]);
				
				var event = EventUtil.getEvent();
				event.preventDefault();
				
				num = id+1;
				if(num == num_count)
				{
					num = 0;
				}
				slideshow[0]._slideShow.stop();
				slideshow[0]._slideShow.play(num);
				init_slideshow = true;
			};
			
			function rot_prev()
			{
				var active = FSite2.getElementsByClassName('num active',rotator);
				var id = active[0].getAttribute("id");
				id = id.split("_");
				id = parseInt(id[1]);
				var event = EventUtil.getEvent();
				event.preventDefault();
				
				num = id-1;
				if(num == -1)
				{
					num = num_count-1;
				}
				slideshow[0]._slideShow.stop();
				slideshow[0]._slideShow.play(num);
				init_slideshow = true;
			};
			
			function rot_click()
			{
				var event = EventUtil.getEvent();
				rot = true;
				var id = event.target.getAttribute("id");
				id = id.split("_");
				id = parseInt(id[1]);
				slideshow[0]._slideShow.stop();
				slideshow[0]._slideShow.play(id);
				init_slideshow = true;
			}
			
			
			return {
				init:function()
				{
					rotator = $('list_rotator');
					slideshow = FSite2.getElementsByClassName('slideshow');
					active = FSite2.getElementsByClassName('num active',rotator);
					num_count = parseInt(slideshow[0]._slideShow.getCount());
					num = FSite2.getElementsByClassName('num',rotator);
					init_slideshow = false;
				
				
					var next = $('next');
					var prev = $('prev');
					
					EventUtil.addEventHandler(next,'click',rot_next);
					EventUtil.addEventHandler(prev,'click',rot_prev);
					
					for(var i=0; i<num.length;i++)
					{
						EventUtil.addEventHandler(num[i],'click',rot_click);
					}
					
					window.setTimeout(function(){
						if(!init_slideshow)
							slideshow[0]._slideShow.play();
					},5000);
					
				}
			};
			
		}());
