<!--

	var curr_img_index;
	function gallery_pics_init()
	{
		if(!document.getElementById("gallery")) { return false; }
		var gallery_container = document.getElementById("gallery");
		var imgs = gallery_container.getElementsByTagName("IMG");
		imgs[0].style.display ="block";
		curr_img_index = 0;
		
		if(!document.getElementById("previous")) { return false; }
		if(!document.getElementById("next")) { return false; }	
		var previous = document.getElementById("previous");
		previous.onclick = function () {
			imgs[curr_img_index].style.display = "none";
			curr_img_index = (curr_img_index - 1 < 0) ? curr_img_index : curr_img_index - 1;
			imgs[curr_img_index].style.display = "block";
			return false;
		}
		previous.onmousedown = function () {
			this.style.backgroundPosition = "0 -282px";
		}
		previous.onmouseup = function () {
			this.style.backgroundPosition = "0 0";
		}
		var next = document.getElementById("next");	
		next.onclick = function () {
			imgs[curr_img_index].style.display = "none";
			curr_img_index = (curr_img_index + 1 >= imgs.length) ? curr_img_index : curr_img_index + 1;
			imgs[curr_img_index].style.display = "block";
			return false;
		}
		next.onmousedown = function () {
			this.style.backgroundPosition = "0 -282px";
		}
		next.onmouseup = function () {
			this.style.backgroundPosition = "0 0";
		}
	}
		
	
	add_onload_function(gallery_pics_init);	
//-->
