if (typeof com == "undefined") var com = new Object();

com.xSWF = function(swf, flashvars, id){
	this.attributes = new Array();
	this.params = new Object();
	this.variables = new Object();

        //if (swf) this.setAttribute('swf', 'http://www.taikn.de' + swf);
        if (swf) this.setAttribute('swf', swf);
	if (flashvars) this.setAttribute('flashvars', flashvars);
	if (id) this.setAttribute('id', id);

	this.setAttribute('width', '200');
	this.setAttribute('height', '200');
	this.setAttribute('version', '6,0,0');
}

com.xSWF.prototype.setAttribute = function(name, value) {this.attributes[name] = value;}
com.xSWF.prototype.getAttribute = function(name) {return this.attributes[name];}
com.xSWF.prototype.getAttributes = function() {return this.attributes;}
com.xSWF.prototype.addParam = function(name, value) {this.params[name] = value;}
com.xSWF.prototype.getParam = function(name) {return this.params[name];}
com.xSWF.prototype.getParams = function() {return this.params;}
com.xSWF.prototype.addVariable = function(name, value) {this.variables[name] = value;}
com.xSWF.prototype.getVariable = function(name) {return this.variables[name];}
com.xSWF.prototype.getVariables = function() {return this.variables;}

com.xSWF.prototype.getHTML = function() {
	var flashHTML = "";
	flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + this.getAttribute('width') + '" height="' + this.getAttribute('height') + '" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + this.getAttribute('version') + '" id="' + this.getAttribute('id') + '">';
	flashHTML += '<param name="movie" value="' + this.getAttribute('swf') + '" />';
	flashHTML += '<param name="loop" value="false" />';
	flashHTML += '<param name="menu" value="false" />';
	flashHTML += '<param name="quality" value="low" />';
        flashHTML += '<param name="bgcolor" value="#eeeeee"; />';
        flashHTML += '<embed src="' + this.getAttribute('swf') + '" loop="false" menu="false" quality="low" bgcolor="#eeeeee"  width="' + this.getAttribute('width') + '" height="' + this.getAttribute('height') + '" name="' + this.getAttribute('id') + '" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed>';
	flashHTML += '</object>';
	return flashHTML;
}

com.xSWF.prototype.write = function(elementId) {
	document.getElementById(elementId).innerHTML = this.getHTML();
}

if (Array.prototype.push == null) { Array.prototype.push = function(item) {this[this.length] = item; return this.length;}}