function moveIt ( direction, move_x, move_y )
{
		var div = document.getElementById('partners_icons_content');
		if ( direction == 'left' ) {
			new Effect.Move(div,{x: move_x, y: move_y, duration: 20, mode:'relative'})
			setTimeout('moveIt("right", '+move_x+', '+move_y+')', 20000);
		}
		else {
			new Effect.Move(div,{x: -move_x, y: move_y, duration: 20, mode:'relative'})
			setTimeout('moveIt("left", '+move_x+', '+move_y+')', 20000);
		}
}
function init_moveIt() {
	var move_y = 0;
	var div = document.getElementById('partners_icons_content');
	var images = div.getElementsByTagName('img');
	var images_count = images.length;
	var cumulated_width = 0;
	for( var i=0; i<images_count; i++) {
		cumulated_width = cumulated_width + images[i].clientWidth + 15; //15 - margines
	}
	//alert(cumulated_width);
	//var moves_count = Math.round((cumulated_width/move_x));
	if( cumulated_width > 880 ) {
		var move_x = cumulated_width-880;//-900;
		moveIt( '', move_x, move_y);
	}
}

// ---------------------------------
// div.slider v.0.2
// Aleksander Tittenbrun, 2010
// http://dobrydesign.net
// feel free to use it anywhere
// please do not delete this credits

//settings
var interval = 8; // how long do you want to show div (sec)
var pause = 15; // how long do you want to hold clicked div (sec)
//vars
var t;
interval = interval*1000;
pause = pause*1000;
function setVisibility(id)
{
	for(var l=1; l<=divs;l++)
	{
		var rotator_button_img = document.getElementById('rotator_button_img_'+l);
		var rotator_txt = document.getElementById('rotator_txt_'+l);
		var rotator_img = document.getElementById('rotator_img_'+l);
		if(l == id)
		{
			rotator_txt.className = 'show';
			rotator_button_img.className = 'hide';
			rotator_img.className = 'show';
		}
		else
		{
			rotator_txt.className = 'hide';
			rotator_button_img.className = 'show';
			rotator_img.className = 'hide';
		}
	}
}
function divSlider(i, status)
{
	//shows current div
	setVisibility(i);
	//checks if last
	if(i==divs)
		var k=1;
	else
		var k=i+1;
	//checks show status
	if(status == 0) //normal
		t=setTimeout('divSlider('+k+',0);', interval);
	else if(status == 1) { //click = pause
		clearTimeout(t);
		t=setTimeout('divSlider('+k+',2);', pause);
	}
	else { //clear from pause to normal
		clearTimeout(t);
		t=setTimeout('divSlider('+k+',0);', interval);
	}
}
function runDivSlider() 
{
	divSlider(1,0);
}
