var Flash = function(p_in_flash, p_in_width, p_in_height) {
	this.flash = p_in_flash;
	this.width = p_in_width;
	this.height = p_in_height;
	this.params = new Object();
}

var flash_object = Flash.prototype;

flash_object.addParam = function(name, value) { this.params[name] = value; }

flash_object.getParamTags = function() {
    var paramTags = "";
    for (var param in this.params) {
        paramTags += '<param name="' + param + '" value="' + this.params[param] + '" />';
    }
    return paramTags;
}

flash_object.getParamString = function() {
    var paramString = "";
    for (var param in this.params) {
        paramString += ' ' + param + '="' + this.params[param] + '"';
    }
    return paramString;
}

flash_object.generateHTML = function() {
    var embed = "";
    if (navigator.plugins && navigator.mimeTypes.length) {
        embed += '<embed pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" src="' + this.flash + '" width="' + this.width + '" height="' + this.height + '" ';
        embed += this.getParamString();
        embed += ' ></embed>';
    } else {
        embed += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + this.width + '" height="' + this.height + '">';
        embed += '<param name="movie" value="' + this.flash + '" />';
        embed += this.getParamTags();
        embed += '</object>';
    }
    return embed;	
}

flash_object.print = function() {
	document.write(this.generateHTML());	
}

function Movie()
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="200" height="80">\n');
    document.write('<param name="movie" value="banners/ban_bjmk.swf" />\n');
    document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
    document.write('<embed src="banners/ban_bjmk.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="80"></embed> \n');
    document.write('</object>\n');
}
