function InitiateSpecials(){
		new Ajax.Request(
			'specials.php',
			{
				method: "get",
				onSuccess: parseAjaxResponse,
				onComplete: startScroller
			}
		);
}

path = new Array();
afbeeldingen = new Array();

function parseAjaxResponse(transport){
	response=transport.responseXML;
	docRoot=response.getElementsByTagName('slideshow')[0];
	path[0]=docRoot.attributes.getNamedItem("path").value;
	afbeeldingen[0] = docRoot.getElementsByTagName("images")[0].getElementsByTagName("image");
}

function startScroller() {
	b=0;
	$('special_inner').appear({duration:1.0});
	new PeriodicalExecuter(function() { if(b==0){ i=0; } b++; scrollPeriodic() }, 4);
}

function scrollPeriodic() {
	noAfb = afbeeldingen[0].length - 1;
	if(i < noAfb) {
		i++;
	} else {
		i=0;
	}

	$('special_inner').fade({afterFinish:function() { next(i) }});

}

function next(i) {
	
	$('special_inner').innerHTML = '<img src="' + path[0] + afbeeldingen[0][i].attributes.getNamedItem("src").value + '" alt="asd" />';
	$('special_inner').appear();
	i++;

}
