
function init_slideshow() {
		setTimeout('slide_show_next()', slide_show_delay);
		fix_pngs();
}




function slide_show_next() {
	if (current_image == image_count - 1) {
		current_image = 0;
	} else {
		current_image++;
	}
	change_image();
	setTimeout('slide_show_next()', slide_show_delay);
}

function change_image() {
//	alert('changing image to image number ' + current_image + ', src ' + images[current_image]);
//	var front = document.getElementById('image');
//	front.src = '/i/expertise/' + images[current_image];
//	return;

	var behind = document.getElementById('image_behind');
	behind.src =  '/i/' + image_folder + '/' + images[current_image];
	jQuery('#image').fadeOut("slow", function() {setup_front_image();});

}

function setup_front_image() {
	var front_image = document.getElementById('image');
	front_image.src = '/i/' + image_folder + '/' + images[current_image];
	jQuery('#image').fadeIn("fast");
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
