function EmbedFlash(path, height, width, flashvars, id) {
    id = id || "id" + new Date().getTime();
    var obj = "<object id=\"obj-" + id + "\" quality=\"high\" ";
    if (height.length > 0)
        obj += "height=\"" + height + "\" ";

    if (width.length > 0)
        obj += "width=\"" + width + "\" ";

    obj += "classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
    obj += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,1,53,64\">\r\n";

    document.write(obj)
    document.write("<param name=\"flashvars\" value=\"" + flashvars + "\" />\r\n");
    document.write("<param name=\"movie\" value=\"" + path + "\" />\r\n");
    document.write("<param name=\"src\" value=\"" + path + "\" />\r\n");
    document.write("<param name=\"quality\" value=\"high\" />\r\n");
    document.write("<param name=\"wmode\" value=\"transparent\" />\r\n");
    document.write("<embed id=\"emb-" + id + "\" wmode=\"transparent\" src=\"" + path + "\" quality=\"high\" flashvars=\"" + flashvars + "\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" menu=\"false\" height=\"" + height + "\" width=\"" + width + "\" />\r\n");
    document.write("</object>\r\n");
}
