function imgSwap(img, ref)
{
	if(document.images){
		document.images[img].src = ref;
	}
}

function stripFileSuffix(theFile)
{
	var theSplitString = theFile.split(".");
	return theSplitString[0];
}

function placeObject(swfFile, swfWidth, swfHeight)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
	document.write('codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
	document.write('width="' + swfWidth + '" height="' + swfHeight + '" id="' + stripFileSuffix(swfFile) + '" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="' + swfFile + '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="bgcolor" value="#000000" />');
	document.write('<embed src="' + swfFile + '" quality="high" bgcolor="#000000" width="' + swfWidth + '" height="' + swfHeight + '" ');
	document.write(' wmode="transparent"');
	document.write('name="' + stripFileSuffix(swfFile) + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" ');
	document.write('pluginspage="https://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
/*
function insertMovie(theMovie, mediaHeight)
{
	var plusController = mediaHeight + 16;
	document.write('<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="550" height="' + plusController + '" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">\n');
	document.write('<param name="src" value="' + theMovie +'">\n');
	document.write('<param name="autoplay" value="true">\n');
	document.write('<param name="loop" value="false">\n');
	document.write('<param name="wmode" value="transparent">\n');
	document.write('<param name="controller" value="true">\n');
	document.write('<embed src="' + theMovie + '" width="550" height="' + plusController + '" autoplay="true" loop="false" controller="true" wmode="transparent" pluginspage="http://www.apple.com/quicktime/"></embed>\n');
	document.write('</object>\n');
}
*/
function insertMovie(theMovie, mediaWidth, mediaHeight)
{
	var plusController = mediaHeight + 16;
	document.write('<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="' + mediaWidth + '" height="' + plusController + '" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">\n');
	document.write('<param name="src" value="' + theMovie +'">\n');
	document.write('<param name="autoplay" value="true">\n');
	document.write('<param name="loop" value="false">\n');
	document.write('<param name="wmode" value="transparent">\n');
	document.write('<param name="controller" value="true">\n');
	document.write('<embed src="' + theMovie + '" width="' + mediaWidth + '" height="' + plusController + '" autoplay="true" loop="false" controller="true" wmode="transparent" pluginspage="http://www.apple.com/quicktime/"></embed>\n');
	document.write('</object>\n');
}