// Major version of Flash ideally
var requiredMajorVersion = 8;
var requiredMinorVersion = 0;
var requiredRevision = 24;
// Major version of Flash required
var requiredMajorVersion2 = 4;
var requiredMinorVersion2 = 0;
var requiredRevision2 = 0;
function writehomemovie(){
	if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		if(hasRightVersion) {  // if we've detected an acceptable version
			// embed the flash movie
			//alert('hi');
			AC_FL_RunContent(
				'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0',
				'width', '687',
				'height', '372',
				'src', 'home-crystal8',
				'quality', 'high',
				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
				'align', 'middle',
				'play', 'true',
				'loop', 'false',
				'scale', 'showall',
				'wmode', 'window',
				'devicefont', 'false',
				'id', 'home-crystal8',
				'bgcolor', '#d8d8d8',
				'name', 'home-crystal8',
				'menu', 'true',
				'allowScriptAccess','sameDomain',
				'allowFullScreen','false',
				'movie', 'home-crystal8',
				'salign', ''
				); //end AC code
		} else {  // flash is not as new as we ideally want
			var hasRightVersion = DetectFlashVer(requiredMajorVersion2, requiredMinorVersion2, requiredRevision2);
			if(hasRightVersion) {  // if we've detected an acceptable version less than 8
			// embed the flash movie
			AC_FL_RunContent(
				'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0',
				'width', '687',
				'height', '372',
				'src', 'home-crystal5',
				'quality', 'high',
				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
				'align', 'middle',
				'play', 'true',
				'loop', 'false',
				'scale', 'showall',
				'wmode', 'window',
				'devicefont', 'false',
				'id', 'home-crystal5',
				'bgcolor', '#d8d8d8',
				'name', 'home-crystal5',
				'menu', 'true',
				'allowFullScreen', 'false',
				'allowScriptAccess','sameDomain',
				'movie', 'home-crystal5',
				'salign', ''
				); //end AC code
			} else {  // flash is too old or we can't detect the plugin
			var alternateContent = '<span style="color:#fff;">This page is best viewed with Adobe Flash Player.</span>'
				+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a><br>'
				+ '<a href="track8.htm"><img src="big-pic.jpg" width="687" height="372" border="0"></a>';
			document.write(alternateContent);  // insert non-flash content
		}
		}
	}
}