var slideshowIndexes = new Array();

function slideshow(id) {
	var children = new Array();
	var childNodes = document.getElementById(id).childNodes;
	var i = 0;
	for (i = 0; i < childNodes.length; i++) {
		if (childNodes[i].nodeType == 1) {
			children[children.length] = childNodes[i];
		}
	}
	if (children.length > 1) {
		var index = slideshowIndexes[id];
		var duration = 1;
		if (navigator.userAgent.toLowerCase().indexOf("iphone") != -1 || navigator.userAgent.toLowerCase().indexOf("msie") != -1) {
			duration = 0;
		}
		Effect.Fade(children[index], {duration:duration, from:1.0, to:0.0});
		index++;
		if (index == children.length) {
			index = 0;
		}
		Effect.Appear(children[index], {duration:duration, from:0.0, to:1.0});
		slideshowIndexes[id] = index;
	}
}
