		function startSlideshow(){
			showNext();
			if (total_pics != 1){
				slideInter = window.setInterval('showNext()', 3000);
				slideshow = true;
				$("#slide_button").html("stop slideshow");
			}
		}

		function toggleSlideShow(){
			if (slideshow){
				stopSlideshow();
			}else{
				startSlideshow();
			}
		}

		function showNext(){
			
			currentImage ++;	
			if (currentImage >= total_pics){
				currentImage = 0;
			}			
			
			$(".slide_img").css("z-index",1);
			$("#slide_img_"+(currentImage-1)).css("z-index",2);
			$("#slide_img_"+currentImage).hide();
			$("#slide_img_"+currentImage).css("z-index",3);
			$("#slide_img_"+currentImage).fadeIn(1000);
			myDesc = $("#slide_img_"+currentImage).attr("title");
			$("#image_description").html(myDesc);
			
			$(".slide_image").removeClass("active");
			$("#slide_btn_"+currentImage).addClass("active");
		}

		function showImage(num){
			
			currentImage = num;		
			stopSlideshow();

			$(".slide_img").css("z-index",1);
			$("#slide_img_"+(currentImage-1)).css("z-index",2);
			$("#slide_img_"+currentImage).show();
			$("#slide_img_"+currentImage).css("z-index",3);
			$(".slide_image").removeClass("active");
			$("#slide_btn_"+currentImage).addClass("active");

			myDesc = $("#slide_img_"+currentImage).attr("title");
			$("#image_description").html(myDesc);
		}

		function stopSlideshow(){
			if (slideshow == true){
				window.clearInterval(slideInter);
				$("#slide_button").html("start slideshow");
				slideshow = false;
			}
		}