function CreateSlideShow_v2(settingsFolderName, showUrl, adRules, autoStart, endBehavior, oWidth, oHeight, siteRoot)
{
	if(siteRoot == null || siteRoot == undefined) siteRoot = "http://www.maxpreps.com/fanpages";

	// the object to get the flash
	document.write('<object ');
	
	// insert parameters just for internet explorer
	if(navigator.appName.indexOf("Microsoft") != -1) {
		document.write('classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
		document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
	}

	document.write('data="' + siteRoot + '/flash/slideshow_v2/slideshow_v2.swf"');
	document.write('type="application/x-shockwave-flash" ');
	document.write('width="' + oWidth + '" ');
	document.write('height="' + oHeight + '" ');
	document.write('id="slideShow" ');	
	document.write('align="middle" ');
	document.write('allowScriptAccess="always" ');

	document.write('>\n');

	// parameters for the movie.
	document.write('<param name="movie" value="' + siteRoot + '/flash/slideshow_v2/slideshow_v2.swf" /> \n');
	document.write('<param name="scale" value="noscale" /> \n');
	document.write('<param name="salign" value="lt" /> \n');
	document.write('<param name="wmode" value="opaque"/> \n');
	document.write('<param name="quality" value="high" /> \n');
	document.write('<param name="allowScriptAccess" value="always" /> \n');

	document.write('<param name="FlashVars" value="settingsFolderName=' + settingsFolderName + '&showUrl=' + showUrl + '&adRules=' + adRules + '&autoStart=' + autoStart + '&endBehavior=' + endBehavior + '&oWidth=' + oWidth + '&oHeight=' + oHeight + '&siteRoot=' + siteRoot + '" /> \n');

	document.write('</object>');  // closes the object tag
	document.write('</div>'); // closes the Div tag that tracks mouse position
}
