function moveThumbnails(direction, count) {
	
/*
	obj = $('thumbs');
	new Effect.Move(obj,{x:0, y:95, mode: 'relative'});
*/	
	
	$('arrowTop').disabled="disabled";
	$('arrowBottom').disabled="disabled";
	if (direction == 'top') {
		obj = $('thumbs');
		if (parseInt($('currentImage').value) > 0) {
			new Effect.Move(obj,{x:0, y:83, mode: 'relative'});
			$('currentImage').value = parseInt($('currentImage').value) - 1;
		}
	} else {
		obj = $('thumbs');
		if (parseInt($('currentImage').value) < parseInt($('imagesCount').value)  - count) {
			new Effect.Move(obj,{x:0, y:-83, mode: 'relative'});
			$('currentImage').value = parseInt($('currentImage').value) + 1;
		}
	}
	$('arrowTop').disabled="";
	$('arrowBottom').disabled="";
}

function showImage(imageURL) {
	$('mainImage').hide();
	$('mainImage').setAttribute('src','/images/loading.gif');
	$('mainImage').show();
	StartPreload(imageURL);		
}

function StartPreload(filename)
{
   var szImages = new Array(filename);

   // Execute Image Preloader
   var oPreload = new ImagePreload( szImages, function(){}, 
	   function() {
		   $('mainImage').hide();
		   $('mainImage').setAttribute('src',filename);
		   $('mainImage').show();
	   }
 );
}
