/**
 * Copyright 2000 by Macromedia, Inc.,
 * All rights reserved.
 */  
function embedflash(movie, width, height, version, bgcolor, params){
	 flashPlugin('',version, '','',width,height,'middle','',movie+"?"+params,'','','high','',bgcolor,"true",'');
 }
 
 
function flashPlugin(schema, version, base, id, width, height, align, scroll, movie, flashvars, menu, quality, wmode, bgcolor, swlive, script){
	var schema = 'http';
    var classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
    var codebase = schema + "://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + version;

    var output = (
        "<object" 
        + (id ? attribute("id", id) + attribute("name", id) : "")
        + attribute("classid", classid)
        + attribute("codebase", codebase)
        + attribute("width", width)
        + attribute("height", height)
        + attribute("align", align)
        + (scroll ? attribute("scroll", scroll) : "")
        + ">"
        + param("movie", movie)
        + (flashvars ? param("flashvars", flashvars) : "")
        + param("quality", quality)
        + (base ? param("base", base) : "")
        + (menu ? param("menu", menu) : "")
        + (wmode ? param("wmode", wmode) : "")
        + (bgcolor ? param("bgcolor", bgcolor) : "")
        + "<embed"
        + attribute("src", movie)
        + (id ? attribute("name", id) : "")
        + (flashvars ? attribute("flashvars", flashvars) : "")
        + attribute("quality", quality)
        + attribute("width", width)
        + attribute("height", height)
        + attribute("align", align)
        + attribute("type", "application/x-shockwave-flash")
        + attribute("plugninspace", schema + "://www.macromedia.com/go/getflashplayer")
        + (base ? attribute("base", base) : "")
        + (menu ? attribute("menu", menu) : "")
        + (wmode ? attribute("wmode", wmode) : "")
        + (bgcolor ? attribute("bgcolor", bgcolor) : "")
        + (swlive ? attribute("swliveconnect", swlive) : "")
        + (script ? attribute("mayscript", script) : "")
        + "</embed>"
        + "</object>"
    );
	document.write(output);
}

function attribute(name, value){
    return " " + name + '="' + value + '"';
}

function param(name, value){
    return "<PARAM " + attribute("name", name) + attribute("VALUE", value) + ">";
}
