function writeSWF(objSWF, intSWFWidth, intSWFHeight) {
	document.writeln('<object'); 
	document.writeln('classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	document.writeln('width="' + intSWFWidth + '"');
	document.writeln('height="' + intSWFHeight + '">');
	document.writeln('<param name="movie" value="' + objSWF + location.search + '">');
	document.writeln('<param name="menu" value="false">');
	document.writeln('<embed');
	document.writeln('pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"'); 
	document.writeln('width="' + intSWFWidth + '"');
	document.writeln('height="' + intSWFHeight + '"');
	document.writeln('menu="false"');
	document.writeln('src="' + objSWF + location.search + '"');
	document.writeln('</embed>');
	document.writeln('</object>');
}

// writeSWF function specifically for the searchresults.asp page as it needs to pass in an extra parameter
function writeSWFSearch(objSWF, intSWFWidth, intSWFHeight, searchRefresh) {
	document.writeln('<object'); 
	document.writeln('classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	document.writeln('width="' + intSWFWidth + '"');
	document.writeln('height="' + intSWFHeight + '">');
	document.writeln('<param name="movie" value="' + objSWF + location.search + '">');
	document.writeln('<param name="menu" value="false">');
	document.writeln('<param name="flashvars" value="isSearchResultPage=1&searchRefresh=' + searchRefresh + '">');
	document.writeln('<embed');
	document.writeln('pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"'); 
	document.writeln('width="' + intSWFWidth + '"');
	document.writeln('height="' + intSWFHeight + '"');
	document.writeln('menu="false"');
	document.writeln('flashvars="isSearchResultPage=1&searchRefresh=' + searchRefresh + '"');
	document.writeln('src="' + objSWF + location.search + '"');
	document.writeln('</embed>');
	document.writeln('</object>');
}