  	var id='slideshowimage';
	var id_caption='slideshowcaption';
	var n=ss_image.length;
	var index=0;
	var phase=0;
	// phase is used as follows:
	// phase 0 starting point, image at full intensity 
	// phase 1 fade out current image
	// phase 2 switch image, start transparent
	// phase 3 fade in image
	// phase 4 hold current image and then start over at phase 0
  	next_image();
	function next_image()
	{
		if(phase==0)
		{
			changeOpac(100, id);
			setTimeout("next_image()",3000);
			phase++;		
		}
		else if(phase==1)
		{
			shiftOpacity(id,500);
			setTimeout("next_image()",750);
			phase++;
		}
		else if(phase==2)
		{
			if(index<n-1)
			{
				index++;
			}
			else
			{
				index=0;
			}
    		change_image(id,ss_image[index]);
    		change_caption(id_caption,caption[index]);
 			setTimeout("next_image()",10);
			phase++
		}
		else if(phase==3)
		{
			shiftOpacity(id,500);
			setTimeout("next_image()",750);
			phase++;
		}
		else if(phase==4)
		{
			setTimeout("next_image()",10);
			phase=0;
		}
	}

