/** * Generates a browser-specific Flash tag. Create a new instance, set whatever * properties you need, then call either toString() to get the tag as a string, or * call write() to write the tag out. */ /** * Creates a new instance of the FlashTag. * src: The path to the SWF file. * width: The width of your Flash content. * height: the height of your Flash content. */ function FlashTag(src, width, height) { this.src = src; this.width = width; this.height = height; this.version = '7,0,14,0'; this.id = null; this.bgcolor = 'ffffff'; this.flashVars = null; } /** * Sets the Flash version used in the Flash tag. */ FlashTag.prototype.setVersion = function(v) { this.version = v; } /** * Sets the ID used in the Flash tag. */ FlashTag.prototype.setId = function(id) { this.id = id; } /** * Sets the background color used in the Flash tag. */ FlashTag.prototype.setBgcolor = function(bgc) { this.bgcolor = bgc; } /** * Sets any variables to be passed into the Flash content. */ FlashTag.prototype.setFlashvars = function(fv) { this.flashVars = fv; } /** * Get the Flash tag as a string. */ FlashTag.prototype.toString = function() { var ie = (navigator.appName.indexOf ("Microsoft") != -1) ? 1 : 0; var flashTag = new String(); if (ie) { flashTag += ''; flashTag += ''; flashTag += ''; flashTag += ''; if (this.flashVars != null) { flashTag += ''; } flashTag += ''; } else { flashTag += '