            first = 1;
            last = 3;
            current = 1;
         

	    function setlastslide(number)
		{
		last = number - 0;
		}
 
	    function setOpacity(value)
		{
		object = document.getElementById('slide' + current);
		object.style.opacity = value/10;
		object.style.filter = 'alpha(opacity=' + value*10 + ')';
		}

 
            function rollPicture() {
                // Hide current picture
		clearTimeout(rt);
                object = document.getElementById('slide' + current);
                object.style.display = 'none';
                
                // Show next picture, if last, loop back to front
                if (current == last) { current = 1; }
                else { current++ }
                object = document.getElementById('slide' + current);
		setOpacity(0);
                object.style.display = 'block';
		for (var i=0; i<11; i++)
			setTimeout('setOpacity('+i+')',100*i);
		rt=setTimeout(rollPicture,20000);
            }

            function nextPicture() {
                // Hide current picture
                clearTimeout(rt);
		object = document.getElementById('slide' + current);
                object.style.display = 'none';
                
                // Show next picture, if last, loop back to front
                if (current == last) { current = 1; }
		else { current++; }
                object = document.getElementById('slide' + current);
		setOpacity(0);
                object.style.display = 'block';
		for (var i=0; i<11; i++)
			setTimeout('setOpacity('+i+')',100*i);
		rt=setTimeout(rollPicture,30000);
            }

            function previousPicture() {
                // Hide current picture
		clearTimeout(rt);
                object = document.getElementById('slide' + current);
                object.style.display = 'none';
                
                if (current == first) { current = last; }
		else { current--; }
                object = document.getElementById('slide' + current);
		setOpacity(0);
                object.style.display = 'block';
		for (var i=0; i<11; i++)
			setTimeout('setOpacity('+i+')',100*i);
		rt=setTimeout(rollPicture,30000);
            }

