// Video Loader
// Dynamic

function writeVideo(wmvfile, container) {

   var htmlTest;

  mediaIsVideo = 1;
  
    if(wmvfile.toLowerCase().lastIndexOf(".mov")>0)
    {
     htmlTest ='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="285">' + "\n"
          + '<param name="src" value="'+wmvfile+'" />' + "\n"
          + '<param name="controller" value="true" />' + "\n"
          + '<param name="autoplay" value="true" />' + "\n"
          + '<!--[if !IE]>-->' + "\n"
          + '<object type="video/quicktime" data="'+wmvfile+'" width="320" height="285">' + "\n"
          + '<param name="autoplay" value="true" />' + "\n"
          + '<param name="controller" value="true" />' + "\n"
          + '</object>' + "\n"
          + '<!--<![endif]-->' + "\n"
          + '</object>' + "\n"
       
     }
     else
     {      
        htmlTest = '<object id="videoobject" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject">' + "\n"
           + '<param name="URL" value="' + wmvfile + '" />' + "\n"
           + '<param name="autostart" value="1" />' + "\n"
           + '<param name="autorewind" value="1" />' + "\n"
           + '<param name="showcontrols" value="1" />' + "\n"
           + '<param name="showstatusbar" value="0" />' + "\n"
           + '<param name="showdisplay" value="0" />' + "\n"
           + '<embed name="videoobject" type="application/x-mplayer2" src="' + wmvfile + '" autorewind="1" width="320" height="285" showcontrols="1" showstatusbar="0" showdisplay="0" autostart="1"></embed>' + "\n"
           + '</object>' + "\n";
      }

  document.getElementById(container).innerHTML = htmlTest;

} // ! writeVideo

