// =============================================================================
// == Filename.........:	javascript.js
// ==
// == Used for.........:	Simple collection of different javascript functions
// ==
// == Author...........:	The real Orakel aka Wolverin
// ==
// =============================================================================

function SlideShow( nDirection ) {
	var nPicture = 0;
	var nNextPicture = 0;
	var nPrevPicture = 0;
	var szPicture = "";

	if( nDirection == 1 )
		nPicture = document.getElementById('id_prev').value
	else
		nPicture = document.getElementById('id_next').value

	if( nPicture < 10 )
		szPicture = "0" + nPicture;
	else
		szPicture = nPicture;

	document.getElementById('id_gallery').src = szDirectory + szPicture + ".jpg";

	if( nPicture == nMaxPictures )
		nNextPicture = 1;
	else
		nNextPicture = nPicture + 1;

	if( nPicture == 1 )
		nPrevPicture = nMaxPictures;
	else
		nPrevPicture = nPicture - 1;

	document.getElementById('id_prev').value = nPrevPicture;
	document.getElementById('id_next').value = nNextPicture;
}

