swfVersion = 9;
swfId = "flashplayer_object";
swfBgColor = "#f5f5f5";
swfNoflashCode = "";

function writeSWFObject(swfWidth, swfHeight, swf, destination) {
	var htmlOut='';
	
	if(versionIndex >= swfVersion && versionIndex!=false){
		
		htmlOut += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+swfVersion+',0,0,0" width="'+swfWidth+'" height="'+swfHeight+'" id="'+swfId+'" align="middle">';
		htmlOut += '<param name="allowScriptAccess" value="sameDomain">';
		htmlOut += '<param name="movie" value="'+swf+'">';
		htmlOut += '<param name="quality" value="high">';
		htmlOut += '<param name="bgcolor" value="'+swfBgColor+'">';
		htmlOut += '<param name="wmode" value="transparent"> ';
		htmlOut += '<embed src="'+swf+'" ';
		htmlOut += 'wmode="transparent" ';
		htmlOut += 'quality="high" ';
		htmlOut += 'bgcolor="'+swfBgColor+'" ';
		htmlOut += 'width="'+swfWidth+'" ';
		htmlOut += 'height="'+swfHeight+'" ';
		htmlOut += 'name="'+swfId+'" ';
		htmlOut += 'align="middle" ';
		htmlOut += 'allowScriptAccess="sameDomain" ';
		htmlOut += 'type="application/x-shockwave-flash" ';
		htmlOut += 'pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
		htmlOut += '</object>';
		
		
//	} else {
//		var htmlOut=swfNoflashCode;
	}
	
	if (typeof(destination) != 'undefined')
		document.getElementById(destination).innerHTML = htmlOut;
	else
		document.write(htmlOut);
}
