// requires prototype
function pg_slideshow( i, up ) {
	if( up ) {
    window.slides[i].appear( {duration: 2.0} );
  	if( i==window.slideNumber ) {up=false;} else {i=i+1;}
	}else{
  	window.slides[i].fade( {duration: 2.0} );    
  	if( i==1 ) {
    	up=true;
    } else {
    	i=i-1;
		}
	}
	setTimeout('pg_slideshow('+ i +','+ up +')', 3000);
}
function initSlideshow( id ) {
	window.slides = $(id).select('img[class="slide"]');
	window.slideNumber = slides.length-1;
	pg_slideshow(window.slideNumber,false);   
}

