	var banners=0;
	var banners2=0;
	var pos=0;/* 0=>left 1=>right*/
	var size_left;
	var size_right;
	var idx_left=1;
	var idx_right=2;
	var initPos=0;
	var margin;
	var id;
	
	$(document).ready(function(){
		banners=$(".image-left").length+$(".image-right").length;
		
		margin=parseInt($(".image-left").css("margin-right"));
		size_left=parseInt($(".image-left").css("width"));
		size_right=parseInt($(".image-right").css("width"));
		$(".images").css("width",(banners*(size_left+size_right+margin))+"px");
		pos=0;
		$("#logo-enter").show("slide",{direction:"up"},2000);
		
		id=setTimeout("next_banner(1)",10000);
	});

	/* { direction=1 => right ; direction=0 => left } */
	function next_banner(direction)
	{
		clearTimeout(id);
		if(direction==0)
		{
			if(idx_left>1)
			{
				if(pos==0)
				{
					move=size_right+margin;
					idx_left--;idx_right--;
					var curr=parseInt($(".images").css("left"));
					$(".images").animate({"left":curr+move},700);
					
				}
				else if(pos==1)
				{
					move=size_left+margin;
					idx_left--;idx_right--;
					var curr=parseInt($(".images").css("left"));
					$(".images").animate({"left":curr+move},700);
					
				}
				pos=(pos+1)%2;
				
			}
		}
		else
		{
			if(idx_right<banners)
			{
				
				if(pos==0)
				{
					move=-size_left-margin;
					idx_left++;idx_right++;
					var curr=parseInt($(".images").css("left"));
					$(".images").animate({"left":curr+move},700);
				}
				else if(pos==1)
				{
					move=-size_right-margin;
					idx_left++;idx_right++;
					var curr=parseInt($(".images").css("left"));
					$(".images").animate({"left":curr+move},700);
					
				}
				pos=(pos+1)%2;
			}
			else
			{
				pos=0;idx_right=2;idx_left=1;
				$(".images").animate({"left":initPos},1000);
					
			}
		}
		id=setTimeout("next_banner(1)",10000);
		return true;
	}
	
