var Flash=Class.create({initialize:function(element,source,options){if(typeof element==='undefined'||typeof source==='undefined'){return false;}this.element=$(element);this.source=source;this.options=Object.extend({width:this.element.getWidth(),height:this.element.getHeight(),version:'9.0.0',parameters:{}},options||{});this.create();return this;},load:function(){if(typeof swfobject!=='undefined'&&!this.source.blank()&&typeof this.element!=='undefined'){swfobject.embedSWF(this.source,this.element.identify(),this.options.width,this.options.height,this.options.version,false,{},this.options.parameters,{});}return this;},create:function(){var swf_script=new Element('script',{src:'http://swfobject.googlecode.com/svn/trunk/swfobject/swfobject.js',type:'text/javascript',charset:'utf-8'});var swf_exists=$$('script[src]').pluck('src').inject(false,function(accumulator,src){if(/swfobject\.js/.test(src)){return true;}return accumulator;});if(!swf_exists){$(swf_script).observe('load',this.load.bindAsEventListener(this));$$('head').first().insert(swf_script);}else{this.load();}return this;}});