SWFObject = function(swf, id, w, h) {
	this.swf = swf;
	this.id = id;
	this.width = w;
	this.height = h;
	this.altTxt = "This content requires the Flash Plugin.";
	this.params = new Object();
}

SWFObject.prototype.addParam = function(name, value) {
	this.params[name] = value;
}

SWFObject.prototype.getParam = function(name) {
	return this.params[name];
}

SWFObject.prototype.getParams = function() {
	return this.params;
}

SWFObject.prototype.getParamTags = function() {
	var paramTags = '';
	for (var param in this.getParams()) {
		paramTags += '<param name="' + param + '" value="' + this.getParam(param) + '" \/>';
	}
	if (paramTags == '') {
		paramTags = null;
	}

	return paramTags;
}

SWFObject.prototype.getHTML = function() {
	var swfHTML = '';
	swfHTML += '<object type="application\/x-shockwave-flash" ';
	swfHTML += 'id="' + this.id + '" data="' + this.swf + '" ';
	swfHTML += 'width="' + this.width + '" height="' + this.height + '">';
	var paramTags = this.getParamTags()
	if (paramTags != null) {
		swfHTML += paramTags;
	}
	//swfHTML += '<p>' + this.altTxt + '<\/p>';
	swfHTML += '<\/object>';

	return swfHTML;
}

SWFObject.prototype.write = function(elementId) {
	if (isSWFInstalled()) {
		if (elementId) {
			document.getElementById(elementId).innerHTML = this.getHTML();
		} else {
			document.write(this.getHTML());
		}
	}// else {
	//	if (elementId) {
	//		document.getElementById(elementId).innerHTML = this.altTxt;
	//	} else {
	//		document.write(this.altTxt);
	//	}
	//}
}

function isSWFInstalled() {
	return true;
}