function flash(swf, w, h, wmode) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">');
	document.write('<param name="movie" value="'+swf+'"><param name="wmode" value="'+wmode+'"><param name="quality" value="high"><embed src="'+swf+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>');
}

//header slideshow
window.addEvent('domready',function() {
	if($('headerFoto')){
		/* settings */
		var showDuration = 6000;
		var container = $('headerFoto');
		var superads = container.getElements('span');
		if(superads.length > 1){
			var currentIndex = 0;
			var interval;
			/* opacity and fade */
			superads.each(function(img,i){ 
				if(i > 0) {
					img.set('opacity',0);
				}
			});
			/* worker */
			var show = function() {
				superads[currentIndex].fade('out');
				superads[currentIndex = currentIndex < superads.length - 1 ? currentIndex+1 : 0].fade('in');
			};
			/* start once the page is finished loading */
			interval = show.periodical(showDuration);
		}
	}
});

