var movieName = document.getElementById('flashy').innerHTML;
var movieWidth;
var movieLength;
var mapCoords;

if (movieName == "homePage") {
	movieWidth = 500;
	movieHeight = 150;
	mapCoords = "194,88,306,123";
}
else if (movieName == "prototype") {
	movieWidth = 340;
	movieHeight = 80;
	mapCoords = "219,24,331,59";	
}
else if (movieName == "case_video_3") {
	movieWidth = 340;
	movieHeight = 240;
	mapCoords = "114,136,226,171";	
}
else if (movieName == "team") {
	movieWidth = 150;
	movieHeight = 92;
	mapCoords = "19,46,131,81";	
}
else if (movieName == "chipshooter_3") {
	movieWidth = 340;
	movieHeight = 295;
	mapCoords = "114,164,226,199";	
}
else if (movieName == "holidays") {
	movieWidth = 800;
	movieHeight = 600;
	mapCoords = "114,164,226,199";	
}
else if (movieName == "holidays2") {
	movieWidth = 800;
	movieHeight = 600;
	mapCoords = "114,164,226,199";	
}

var MM_contentVersion = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>= 0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	document.write(' ID="'+movieName+'" WIDTH="'+movieWidth+'" HEIGHT="'+movieHeight+'" ALIGN="middle">');
	document.write(' <PARAM NAME="movie" VALUE="http://www.case-assembly.com/movies/'+movieName+'.swf"> <PARAM NAME="quality" VALUE="high>"'); 
	document.write(' <PARAM NAME="bgcolor" VALUE=#ffffff> <PARAM NAME="menu" VALUE="false">');
	document.write(' <EMBED src="http://www.case-assembly.com/movies/'+movieName+'.swf" quality="high" bgcolor=#ffffff menu="false"');
	document.write(' swLiveConnect=FALSE WIDTH="'+movieWidth+'" HEIGHT="'+movieHeight+'" NAME="'+movieName+'" ALIGN="middle"');
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write(' </EMBED>');
	document.write('</OBJECT>');
} else{
	document.write('<img name="'+movieName+'" src="case_images/'+movieName+'.jpg" width="'+movieWidth+'" height="'+movieHeight+'" border="0" id="'+movieName+'" usemap="#m_'+movieName+'" alt="" /><map name="m_'+movieName+'" id="m_'+movieName+'"><area shape="rect" coords="'+mapCoords+'" href="http://www.adobe.com/products/flashplayer/" target="_blank" title="Download the latest Flash Player" alt="Download the latest Flash Player" /></map>');
}
