function swfLoad(sUrl,sWidth,sHeight,sName,sAlign,sColor,sTrans) {
	document.write('<EMBED src="' + sUrl + '" quality=high' + ' bgcolor=' + sColor + ' wmode="'+ sTrans +'"  WIDTH="' + sWidth + '" HEIGHT="' + sHeight + '" NAME="' + sName + '" ALIGN="' + sAlign + '"');
	document.write(' TYPE="application/x-shockwave-flash"');
	document.write(' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write('</EMBED>');
}

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function openflash(width,height,src,id,str,wmode,ver){ 
   var html = '';
	var ver = (ver) ? ver : 8;
	if(isIE && isWin && !isOpera){
		var html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ver+',0,0,0" width="'+width+'" height="'+height+'" ';
		if(id) html += 'id="'+id+'" name="'+id+'" ';
		html += 'align="middle">';
		html += '<param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" />';
		html += '<param name="movie" value="'+src+'" /><param name="quality" value="high" />';
		if(str) html += '<param name="FlashVars" value="'+str+'" />';
		if(!wmode) html += '<param name="wmode" value="transparent" />';
		html += '</object>';
	} else {
		html += '<embed src="'+src+'" quality="high" ';
		if(str) html += 'FlashVars="'+str+'" ';
		if(id) html += 'name="'+id+'" ';
		if(!wmode) html += 'wmode="transparent" ';
		html += 'width="'+width+'" height="'+height+'" align="middle" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
  }
  return html;
} 

function writeflash(src){ 
    document.write(src); 
}

function writeFlashMovie(width,height,src,id,str,wmode,ver){	
	document.write(openflash(width,height,src,id,str,wmode,ver));
}
