
function showGalleryImage(f_index, f_count, f_src)
{
	document.getElementById('slideshow_preview').src = f_src;
}



var GALLERY_SLIDER_TIMER = null;
var GALLERY_SLIDER_IS = 0;
var GALLERY_SLIDER_GO = 0;
var GALLERY_SLIDER_JUMP = 5;

function startSlide(f_index, f_count)
{
	if(GALLERY_SLIDER_TIMER)
	{
		stopSlide();
	}

	var iGo = 0;

	if(f_index < 2)
	{
		iGo = 0;
	}
	else
	{
		iGo = (((f_index - 2) * 101) + 8)
	}

	GALLERY_SLIDER_GO = 0 - iGo;
	GALLERY_SLIDER_TIMER = setTimeout('doSlide()', 50);
}

function doSlide()
{
	if(GALLERY_SLIDER_IS < GALLERY_SLIDER_GO)
	{
		GALLERY_SLIDER_IS += GALLERY_SLIDER_JUMP;
		document.getElementById('slideshow_thumbs').style.left = (GALLERY_SLIDER_IS) + 'px';

		if(GALLERY_SLIDER_IS < GALLERY_SLIDER_GO)
		{
			GALLERY_SLIDER_TIMER = setTimeout('doSlide()', 50);
		}
	}
	else if(GALLERY_SLIDER_IS > GALLERY_SLIDER_GO)
	{
		GALLERY_SLIDER_IS -= GALLERY_SLIDER_JUMP;
		document.getElementById('slideshow_thumbs').style.left = (GALLERY_SLIDER_IS) + 'px';

		if(GALLERY_SLIDER_IS > GALLERY_SLIDER_GO)
		{
			GALLERY_SLIDER_TIMER = setTimeout('doSlide()', 50);
		}
	}
	else
	{
		stopSlide();
	}
}

function stopSlide()
{
	if(GALLERY_SLIDER_TIMER)
	{
		clearTimeout(GALLERY_SLIDER_TIMER);
	}
}