function loadFlash(htmlAnchor, fileName, width, height, bgColor, bgVisible, variablePairs){
	var html = "";
	if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length){
		html += '<embed ';
		html += ' name="' + htmlAnchor + '"';
		html += ' id="' + htmlAnchor + '"';
		html += ' src="' + fileName + '"';
		html += ' width="' + width + '" height="' + height + '"';
		html += ' bgcolor="' + bgColor + '"';
		if (bgVisible && typeof(bgVisible) == 'string') html += ' flashvars=' + variablePairs + '';
		if (bgVisible && typeof(bgVisible) == 'boolean') IEVersion += ' wmode="transparent"';
		html += ' scale="noscale"';
		html += ' align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	} else {
		html += '<object id="' + htmlAnchor + '"  width="' + width + '" height="' + height + '"';
		html += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">';
		html += '	<param name="movie" value="' + fileName + '" />';
		html += '	<param name="bgcolor" value="' + bgColor + '" />';
		if (bgVisible && typeof(bgVisible) == 'string') html += '	<param name="flashvars" value="' + variablePairs + '" />';
		if (bgVisible && typeof(bgVisible) == 'boolean') IEVersion += '	<param name="wmode" value="transparent" />';
		html += '	<param name="quality" value="high" />';
		html += '	<param name="scale" value="noscale" />';
		html += '</object>';
	}
	
	var node = document.getElementById(htmlAnchor);
	node.innerHTML = html;
}

