// Flash printing functions

function WriteMidwayFlash() {
	var flashURL = "Flash/CoatMidway.swf";
	var width = 530;
	var height = 135;
	
	printFlash(flashURL, width, height);
}

function WriteImageGallery(xmlpath) {
	var flashURL = "Flash/ImageGallery.swf";
	if(xmlpath.length > 0) flashURL += "?xmlpath=/xml/xml.php?item="+xmlpath;
	var width = 325;
	var height = 375;
	
	printFlash(flashURL, width, height);
}
    
function printFlash(flashURL, width, height) {

	var bgcolor = "#FFFFFF";
	var allowScriptAccess = "always"; //"sameDomain";
	var quality = "high";
	var align = "middle";
	var name = "flash";
	var autoplay = "true";

	document.writeln("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\""+width+"\" height=\""+height+"\" id=\""+name+"\" align=\""+align+"\">");
	document.writeln("<param name=\"allowScriptAccess\" value=\""+allowScriptAccess+"\" />");
	document.writeln("<param name=\"movie\" value=\""+flashURL+"\" />");
	document.writeln("<param name=\"quality\" value=\""+quality+"\" />");
	document.writeln("<param name=\"bgcolor\" value=\""+bgcolor+"\" />");
	document.writeln("<param name=\"play\" value=\""+autoplay+"\" />");
	document.writeln("<embed src=\""+flashURL+"\" quality=\""+quality+"\" bgcolor=\""+bgcolor+"\" width=\""+width+"\" height=\""+height+"\" name=\""+name+"\" align=\""+align+"\" allowScriptAccess=\""+allowScriptAccess+"\"");
	document.writeln("play=\""+autoplay+"\" ");
	document.writeln("type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
	document.writeln("</object>");
}

