// JavaScript Document


function swf(src, w, h, vars, bg, idObj, id) {
	
	var html;
	var cssclass = "";
	
	if (!bg) {
		bg = '';	
	}
	
	if (idObj == "" && !document.getElementById('flashObj')) {
		idObj = "flashObj";	
	}
	
	html = '';
	
	html += '<OBJECT class='+ cssclass +' codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 \n';
	html +='height='+ h +' width='+ w +' align=middle \n';
	html +='name='+ idObj +' id='+ idObj +' align=middle \n';
	html +='classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000> \n';
	html +='<PARAM NAME="_cx" VALUE="18627"> \n';
	html +='<PARAM NAME="_cy" VALUE="1640"> \n';
	html +='<PARAM NAME="FlashVars" VALUE="' + vars + '"> \n'
	
	html +='<PARAM NAME="Movie" VALUE="' + src +  '"> \n';
	html +='<PARAM NAME="Src" VALUE="' + src +  '"> \n';
	
	html +='<PARAM NAME="Play" VALUE="-1"> \n';
	html +='<PARAM NAME="Loop" VALUE="-1"> \n';
	html +='<PARAM NAME="Quality" VALUE="High"> \n';
	html +='<PARAM NAME="SAlign" VALUE=""> \n';
	html +='<PARAM NAME="Menu" VALUE="-1"> \n';
	html +='<PARAM NAME="Base" VALUE=""> \n';
	html +='<PARAM NAME="AllowScriptAccess" VALUE="sameDomain"> \n';
	html +='<PARAM NAME="DeviceFont" VALUE="0"> \n';
	html +='<PARAM NAME="EmbedMovie" VALUE="0"> \n';
	html +='<PARAM NAME="BGColor" VALUE="'+ bg +'"> \n';
	html +='<PARAM NAME="SWRemote" VALUE=""> \n';
	html +='<PARAM NAME="MovieData" VALUE=""> \n';
	html +='<PARAM NAME="SeamlessTabbing" VALUE="false"> \n';
	
	html +=' <embed \n';
	html +=' name="_' + idObj  + '"\n';
	html +=' id="_' + idObj + '"\n';
	html +=' src="' + src  + '"\n';
	html +=' FlashVars="' + vars + '"  \n';
	html +=' quality="high" bgcolor="#'+ bg +'" width="'+ w +'" height="'+ h +'" \n';
	html +=' name="swf_'+ id +'" align="middle" allowScriptAccess="sameDomain" SeamlessTabbing="false" \n';
	html +=' pluginspage="http://www.macromedia.com/go/getflashplayer" /> \n';
	html +='</OBJECT> \n';
	
	a = new String();
	a = " " + id;
	a = a.replace(" ", "");
	
	if ((a.length > 3) && (id)) {
		document.getElementById(a).innerHTML = html;
	} else {
		document.write(html);	
	}
}

function swfVersao() {
	var versao, tipo, axo, versao_exigida, pagina;
	
	versao_exigida = 8;
	pagina = "./no_swf.html";
	
	if (navigator.plugins && navigator.mimeTypes.length) {
		var x = navigator.plugins["Shockwave Flash"];
		if (x && x.description) {
			versao = x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".");
			versao = versao[0];
		}
	} else {
		try	{
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch (e) { }
			
			for (var i = 3; axo != null; i++) {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				versao = i;
			}
		} catch (e) { }
		
		try {
			versao = axo.GetVariable("$version").split(" ")[1].split(",").split(",");
			versao = versao[0];
		} catch (e) { }
	}
	
	if (parseInt(versao) < versao_exigida) {
		document.location = pagina;	
	}
}
swfVersao();