function writeFlash(i, d, w, h, ai, at)
{    
    var s = '<object id="' + i + '" data="' + d + '" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" >';
    s += '<param name="movie" value="' + d + '" />';
    if (ai && ai.length > 0)
    {
        s += '<img src="' + ai + '" width="' + w + '" height="' + h + '" alt="' + at + '" />';
    }
    s += "</object>";
    document.write(s);
}