function imgPrev()
{
	if( currentIndex > 0 ){
		currentIndex--;
		imageSet( currentIndex );
	}
}

function imgNext()
{
	if( currentIndex < ( pics.length - 1 ) ){
		currentIndex++;
		imageSet( currentIndex );
	}
}

function imageSet( index )
{
	currentIndex = index;
	var img = pics[index];
	var img_html = '<img class="galleryBig" alt="' + img.s
		+ '" src="images/' + dir + '/' + img.s
		+ '" width="' + img.w + '" height="' + img.h
		+ '"/>';
	document.getElementById( 'imageWrite' ).innerHTML = img_html;
	return( false );
}
