javaScript in innerHTML

Hi all,
I’m working on an if else function and in the if part I have an javascript and html that I want to use in case but the innerHTML is not working can anyone help?

here is part of the code i’m using…


function(){
      var myHTML = ' ';
if (my_condition){
        myHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="720" height="480" id="_mp4" align="middle">';
        myHTML = '    <object type="application/x-shockwave-flash" data="_mp4.swf" width="720" height="480">';
        myHTML = '        <param name="movie" value="_mp4.swf" />';
        myHTML = '        <param name="quality" value="high" />';
        myHTML = '        <param name="allowScriptAccess" value="sameDomain" />';
        myHTML = '    </object>';
        myHTML = '</object>';
        } else {
// the rest of my code!
}
window.onload = (document.getElementById("my_div").innerHTML = myHTML);
})();

tks a lot in advance!