function loadFlash(name, width, height) {
  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" style="z-index: -1;" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'" id="wplusr" align="middle" style="margin: 0; padding: 0;">');
  document.write('<param name="allowScriptAccess" value="sameDomain" />');
  document.write('<param name="movie" value="'+name+'" />');
  document.write('<param name="menu" value="false" />');
  document.write('<param name="quality" value="best" />');
  document.write('<param name="wmode" value="transparent" />');
  document.write('<param name="bgcolor" value="#ffffff" />');
  document.write('<embed src="'+name+'" menu="false" wmode="transparent" style="z-index: -1;" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="clearscreen" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="margin: 0; padding: 0;" />');
  document.write('</object>');
}

var i = 0;
var wait = 5000;

function SlideShow() {
	Effect.Fade(slides[i], { duration:1, from:1.0, to:0.0 });
	i++;
	if (i == slides.length)
	    i = 0;
	Effect.Appear(slides[i], { duration:1, from:0.0, to:1.0 });
}

function switchMedia(elem) {

	if (elem == "images") {
		$('switch-images').className = 'active';
		$('switch-video').className = '';
		$('images').style.display = 'block';
		$('video').style.display = 'none';
	}

	else if (elem == "video") {
		$('switch-video').className = 'active';
		$('switch-images').className = '';
		$('video').style.display = 'block';
		$('images').style.display = 'none';

	}

}