﻿/*
* xSWF v2.0 build 1905: http://www.its-hofmann.com - All rights reserved.
*
* xSWF Copyright (C) 2003-2005 by Karl Hofmann, Am Wimhof 73, D-94034 Passau, Germany (DE)
*
* This program is copyright software; you should have received a copy
* of the General License along with this program; if not, write to
* Karl Hofmann, Am Wimhof 73, D-94034 Passau, Germany (DE)
*
* You are welcome to use or redistribute it under certain conditions;
* for the use of the software within a website the author note must be
* invariably taken over, please contact, for use going beyond that,
* Karl Hofmann for further details.
*
*/
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.klinik-lindenegg.ch/swf/' + swf);
	if (flashvars) this.setAttribute('flashvars', flashvars);
	if (id) this.setAttribute('id', id);
	this.setAttribute('width', '850px');
	this.setAttribute('height', '650px');
	this.setAttribute('version', '6,0,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 type="application/x-shockwave-flash" "data="' + this.getAttribute('swf') + '" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="'+this.getAttribute('version') +'" width="' + this.getAttribute('width') + '" height="' + this.getAttribute('height') + '">';
	flashHTML += '<param name="allowScriptAccess" value="sameDomain">';
	flashHTML += '<param name="movie" value="' + this.getAttribute('swf') + '">';
	flashHTML += '<param name="flashvars" value="' + this.getAttribute('flashvars') + '">';
	flashHTML += '<param name="quality" value="best">';
	flashHTML += '<param name="play" value="true">';
	flashHTML += '<a href="http://www.macromedia.com/go/getflash/"><img src="/image/get_flash_player.gif" alt="Macromedia Flash Player" style="border:0;"/></a>';
	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;}
}
