function FlashPlayer(div) { this.div = div; } FlashPlayer.prototype = { init:function() { var flvLocation = this.div.getAttribute("nuonflash:flv"); var autostart = this.div.getAttribute("nuonflash:autostart"); var contextPath = ""; if (context) { contextPath = context } var so = new SWFObject(contextPath+"/static/swf/main.swf", "mainswf", "411", "346", "9", "#FFFFFF", true); so.addParam("base", "/"); so.addParam("quality", "high"); so.addParam("scale", "noscale"); so.addParam("SeamlessTabbing", "false"); so.addParam("wmode", "transparent"); so.addVariable("extvar_flv",flvLocation); if (autostart == 'true') { so.addVariable("extvar_autostart",1); } so.write(this.div.id); this.div.style.display = "block"; }} EventListener.addEvent(window, "load", function(e){ if (document.getElementById("flashplayer")) { var flashPlayer = new FlashPlayer(document.getElementById("flashplayer")); flashPlayer.init(); } });