//  embed_intro.js
//
//  This bit of JavaScript code embeds the background audio track properly
//  based on which browser is in use.
//
//  (c) 2009, Christopher Petersen, Crystallized Software
//
//------------------------------------------------------------------------------
//
//  Grab a handle to the <TD ID="navbar_main"> as our parent node
//
var  myParent  = document.getElementById ("intro");


//
//  Do different things for IE versus everyone else (as usual)
//
if (navigator.appName.indexOf ("Microsoft") != -1)
{
    var newSOUND = document.createElement ("BGSOUND");

    newSOUND.setAttribute ("src", "/sounds/intro-edit.mp3");
    newSOUND.setAttribute ("loop", "1");
}
else
{
    var newSOUND = document.createElement ("OBJECT");

    newSOUND.setAttribute ("data", "/sounds/intro-edit.mp3");
    newSOUND.setAttribute ("type", "audio/mpeg");
}

//
//  Finally, add the new sound object to the parent <P>
//
myParent.appendChild (newSOUND);
