function FlashSlideShow(s, c, width, height) {

	container = c;

	swfobject.embedSWF(s, container, width, height, "8", false, {init_function: "init"}, {wmode: "transparent"});

	init = function() {

		var show = swfobject.getObjectById(this.container);

		var debug = false;
		if ('ss_debug' in window) debug = window.ss_debug;

		// define images selector if not overriden
		// by default, the li child elements of a ul with id=slideshow-images
		if (!('ss_selector' in window)) {
			if (debug) alert('setting ss_selector');
			window.ss_selector = 'ul#slideshow-images > li';
		}

		// define element extraction function if not overriden
		// by default, the text content of the elements of the images selector result
		if (!('ss_extract' in window)) {
			if (debug) alert('setting ss_extract');
			window.ss_extract = function(i) { return i.text(); };
		}

		// evaluate the images selector
		// if it returns more than 0 elements, override the list of images
		if ($(window.ss_selector).size() > 0) {
			if (debug) alert('selector returned more than 0 results');
			window.ss_images = [];
			$(window.ss_selector).each(function() {
				window.ss_images.push(window.ss_extract($(this)));
			});
		}

		// by default, load 0 images
		if (!('ss_images' in window)) {
			window.ss_images = [];
			if (debug) alert('setting images list to 0 elements by default');
		}

		// by default, show the first image of the list immediately
		if (!('ss_show_first' in window)) {
			window.ss_show_first = true;
		}

		// by default, start slideshow if images list has more than 1 item
		if (!('ss_do_slideshow' in window)) {
			window.ss_do_slideshow = window.ss_images.length > 1;
		}

		// by default, set transition time to 1 second
		if (!('ss_trans_time' in window)) {
			window.ss_trans_time = 1000;
		}

		// by default, set waiting time between transitions to 2 seconds
		if (!('ss_wait_time' in window)) {
			window.ss_wait_time = 2000;
		}

		// now load the images into the flash...
		show.setShowFirst(window.ss_show_first);
		show.setDoSlideShow(window.ss_do_slideshow);
		show.setTransTime(window.ss_trans_time);
		show.setWaitTime(window.ss_wait_time);
		show.loadImages(window.ss_images);

		// ... and save a reference to the slideshow object for later
		window.ss = show;

		if (debug) alert('loaded ' + window.ss_images.length + ' images');

	};

}