﻿function writeSwf(container, src, w, h, wmode, vars){
	if(vars){
		variables = "";
		indice = 0;
		for(mul in vars){
			concat = (indice > 0) ? "&" : (src.indexOf("?") >= 0) ? "&" : "?";
			variables += concat + "" + mul + "=" + vars[mul];
			indice ++;
		}
		src = src + variables;
	}
	inner = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'" id="'+container+'SWF"><param name="movie" value="'+src+'"><param name="QUALITY" value="high"><param name="wmode" value="'+wmode+'"><param name="LOOP" value="false"><embed src="'+src+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/" width="'+w+'" height="'+h+'" quality="high" loop="false" SWLIVECONNECT="true" name="'+container+'SWF" wmode="'+wmode+'"></embed></object>';
	document.getElementById(container).innerHTML = inner;
}
