function SwfElements() {
	this.parameters = new Object();
	this.parameters["movie"] = "";
	this.parameters["menu"] = "false";
	this.parameters["bgcolor"] = "#FFFFFF";
	this.parameters["quality"] = "best";
	this.parameters["scale"] = "noscale";
	this.parameters["allowScriptAccess"] = "sameDomain";

	this.attributes = new Object();
	this.attributes["width"] = "100%";
	this.attributes["height"] = "100%";
	this.attributes["protocol"] = "http:";
	this.attributes["playerVersion"] = "6";

	this.parameterset = "";
	this.attributeset = "";

	this.objectElementOpen = "";
	this.embedElement = "";
	this.altContent = "";
}



SwfElements.prototype.setObjectLocation = function() {
	this.parameters["movie"] = ( typeof( arguments[0] ) != "undefined" )? arguments[0] : "" ;
}
SwfElements.prototype.setObjectMenu = function() {
	this.parameters["menu"] = ( typeof( arguments[0] ) != "undefined" )? arguments[0] : "false" ;}
SwfElements.prototype.setObjectBgcolor = function() {
	this.parameters["bgcolor"]  = ( typeof( arguments[0] ) != "undefined" )? arguments[0] : "#FFFFFF" ;
}
SwfElements.prototype.setObjectQuality = function() {
	this.parameters["quality"]  = ( typeof( arguments[0] ) != "undefined" )? arguments[0] : "high" ;
}
SwfElements.prototype.setObjectScale = function() {
	this.parameters["scale"]  = ( typeof( arguments[0] ) != "undefined" )? arguments[0] : "noscale" ;
}
SwfElements.prototype.setObjectSecurity = function() {
	this.parameters["allowScriptAccess"]  = ( typeof( arguments[0] ) != "undefined" )? arguments[0] : "sameDomain" ;
}



SwfElements.prototype.setObjectWidth = function(){
	this.attributes["width"]  = ( !!arguments[0] )? arguments[0] : "100%" ;
}
SwfElements.prototype.setObjectHeight = function() {
	this.attributes["height"]  = ( !!arguments[0] )? arguments[0] : "100%" ;
}
SwfElements.prototype.setProtocol = function() {
	this.attributes["protocol"]  = ( typeof( arguments[0] ) != "undefined" )? "https" : location.protocol ;
}
SwfElements.prototype.setPlayerVersion = function() {
	this.attributes["playerVersion"]  = ( typeof( arguments[0] ) != "undefined" )? arguments[0] : "6" ;
}



SwfElements.prototype.setAltContent = function() {
	this.altContent  = ( typeof( arguments[0] ) != "undefined" )? arguments[0] : "" ;
}
SwfElements.prototype.setAltElements = function() {
	if (!!this.altContent) document.write(this.altContent);
}



SwfElements.prototype.getValues = function() {
	for( var item in this.parameters ) {
		this.parameterset = ( this.parameters[item] != "" )? this.parameterset + '<param name="'+ item +'" value="'+ this.parameters[item] +'" />' : this.parameterset ;
	}

	this.attributeset = ( !!this.attributes["width"] )?  this.attributeset + ' width="'  + this.attributes["width"]  +'"' : this.attributeset ;
 	this.attributeset = ( !!this.attributes["height"] )? this.attributeset + ' height="' + this.attributes["height"] +'"' : this.attributeset ;
	this.objectElementOpen = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+ this.attributes["protocol"] +'//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ this.attributes["playerVersion"] +',0,0,0"'+ this.attributeset +'>'

	this.embedElement = "<embed";
	this.embedElement = ( this.parameters["movie"] != "" )?   this.embedElement + ' src="'+     this.parameters["movie"]   +'"' : this.embedElement ;
	this.embedElement = ( this.parameters["menu"] != "" )?    this.embedElement + ' menu="'+    this.parameters["menu"]    +'"' : this.embedElement ;
	this.embedElement = ( this.parameters["bgcolor"] != "" )? this.embedElement + ' bgcolor="'+ this.parameters["bgcolor"] +'"' : this.embedElement ;
	this.embedElement = ( this.parameters["quality"] != "" )? this.embedElement + ' quality="'+ this.parameters["quality"] +'"' : this.embedElement ;
	this.embedElement = ( this.parameters["scale"] != "" )?   this.embedElement + ' scale="'+   this.parameters["scale"]   +'"' : this.embedElement ;

	this.embedElement = ( !!this.attributes["width"] )?   this.embedElement + ' width="' + this.attributes["width"]  +'"' : this.embedElement ;
	this.embedElement = ( !!this.attributes["height"] )?  this.embedElement + ' height="'+ this.attributes["height"] +'"' : this.embedElement ;
	this.embedElement = ( this.parameters["allowScriptAccess"] != "" )? this.embedElement + ' allowScriptAccess="'+ this.parameters["allowScriptAccess"] +'"' : this.embedElement ;
	this.embedElement = this.embedElement + ' type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
}


SwfElements.prototype.setElements = function() {
	this.getValues();

	if (document.getElementById || document.layers || (navigator.userAgent.indexOf("Win") != -1) ) {
		document.write( this.objectElementOpen );
		document.write( this.parameterset );
	}
	document.write( this.embedElement );
	if (document.getElementById || document.layers || (navigator.userAgent.indexOf("Win") != -1) ) {
		document.write('</object>');
	}
}
