function loadFlash(file, w, h, base, flashVars, transp) {
	document.writeln(getFlashOutput(file, w, h, base, flashVars, transp));
}
function loadFlashSEO(tag, file, w, h, base, flashVars, transp) {	
	e = document.getElementsByTagName(tag);
	//for(var i in e)
	for(var i =0; i < e.length; i++)
		e[i].innerHTML = getFlashOutput(file, w, h, base, flashVars + "&text=" + e[i].innerHTML, transp);
}
function reloadFlash(id, file, w, h, base, flashVars, transp) {
	document.getElementById(id).innerHTML = getFlashOutput(file, w, h, base, flashVars, transp);
}
function getFlashOutput(file, w, h, base, flashVars, transp) {
	var wmode = (transp == undefined || transp == true) ? "transparent" : "opaque";
	var output = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""+
		"	width=\""+w+"\""+
		"	height=\""+h+"\""+
		"	name=\"flashFile\""+
		"	id=\"flashFile\">"+
		"	<param name=\"movie\" value=\""+file+"\">"+
		"	<param name=\"base\" value=\""+base+"\">"+
		"	<param name=\"flashVars\" value=\""+flashVars+"\">"+
		"	<param name=\"quality\" value=\"high\">"+
		"	<param name=\"menu\" value=\"false\">"+
		"	<param name=\"wmode\" value=\""+wmode+"\">"+
		"	<embed"+
		"		src=\""+file+"\""+
		"		base=\""+base+"\""+
		"		width=\""+w+"\""+
		"		height=\""+h+"\""+
		"		flashVars=\""+flashVars+"\""+
		"		quality=\"high\""+
		"		type=\"application/x-shockwave-flash\""+
		"		menu=\"false\""+
		"		wmode=\""+wmode+"\""+
		"		swLiveConnect=\"true\""+
		"		name=\"flashFile\">"+
		"	</embed>"+
		"</object>";
	return output;
}
var __T = this;
// make outerHTML work in Firefox
if (navigator.userAgent.indexOf("Firefox") != -1) {
	var _emptyTags = { "IMG":true, "BR":true, "INPUT":true, "META":true, "LINK":true, "PARAM":true, "HR":true };
	HTMLElement.prototype.__defineGetter__("outerHTML", function () {
	   var attrs = this.attributes;
	   var str = "<" + this.tagName;
	   for (var i = 0; i < attrs.length; i++) str += " " + attrs[i].name + "=\"" + attrs[i].value + "\"";	
	   if (_emptyTags[this.tagName]) return str + ">";	
	   return str + ">" + this.innerHTML + "</" + this.tagName + ">";
	});
	HTMLElement.prototype.__defineSetter__("outerHTML", function (sHTML) {
	   var r = this.ownerDocument.createRange();
	   r.setStartBefore(this);
	   var df = r.createContextualFragment(sHTML);
	   this.parentNode.replaceChild(df, this);
	});
}


