new PeriodicalExecuter(all,7);
function all()
{
	divChanger();
	scrollBestPicture();
}

//new PeriodicalExecuter(divChanger,10);
function divChanger()
{
	if($('bestmen').style.display == 'none')
	{
		new Effect.SlideUp('bestwomen');
		new Effect.SlideDown('bestmen');
	}
	else
	{
		new Effect.SlideUp('bestmen');
		new Effect.SlideDown('bestwomen');
	}
}


var actualPicId = 2;
//new PeriodicalExecuter(scrollBestPicture,7);
function scrollBestPicture()
{
		if(actualPicId>=10)
		{
			actualPicId = 2;
			new Effect.BlindUp('picid_9');
			new Effect.BlindUp('picid_10');
			$('picplaceholder_10').style.display = 'none';
			$('picplaceholder_9').style.display = 'none';
			$('picplaceholder_1').style.display = 'block';
			$('picplaceholder_2').style.display = 'block';
			new Effect.BlindDown('picid_1', {duration: .9, afterFinish: 
				function () 
				{
					new Effect.Pulsate('rank_1', { pulses: 8, duration: 2.5 });
				}
			});
	
			new Effect.BlindDown('picid_2', {duration: .9, afterFinish: 
				function () 
				{
					new Effect.Pulsate('rank_2', { pulses: 8, duration: 2.5 });
				}
			});	
		}
		else
		{
		//alert('picid_'+(this.actualPicId-1));
		new Effect.Puff('picid_'+(actualPicId-1), {duration:.5, afterFinish: 
			function () 
			{
				new Effect.Appear('picid_'+(actualPicId), {duration: .9, afterFinish: 
					function () 
					{
						new Effect.Pulsate('rank_'+(actualPicId), { pulses: 8, duration: 2.5 });
					}
				});	
			}
		});
	
		$('picplaceholder_'+(actualPicId-1)).style.display = 'none';
		$('picplaceholder_'+(actualPicId+1)).style.display = 'block';
	
		new Effect.Appear('picid_'+(actualPicId+1), {duration:.9, afterFinish: 
			function () 
			{
				//new Effect.Pulsate('rank_'+(actualPicId+1), { pulses: 8, duration: 2.5 });	
			}
		});
						
							



				new Effect.Parallel(
				[
					//new Effect.Appear('picid_'+(actualPicId+1)),
					//new Effect.Appear('picid_'+(actualPicId))
				],
				{
					duration:1.0,
					fps:40
				}
				);
			
	

		actualPicId++;	
		}
}

