function ContentAreaHeight() {
  var viewportwidth;
  var viewportheight;
  // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
  if (typeof window.innerWidth != 'undefined') {
     viewportwidth = window.innerWidth,
     viewportheight = window.innerHeight
  }
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
  else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) {
     viewportwidth = document.documentElement.clientWidth,
     viewportheight = document.documentElement.clientHeight
  }
 // older versions of IE
  else {
     viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
     viewportheight = document.getElementsByTagName('body')[0].clientHeight
  }
  viewportheight = viewportheight-(12+12+1+1+200+32); // viewportheight-(topmargin+bottommargin+topborder+bottomborder+header+menubar)
  document.getElementById("ContentArea").style.height=(viewportheight+"px");
}

function EmbedMedia(file) {
  document.write('<object id="Player" height="480"  width="640" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">');
  document.write('<param name="FileName" value="'+file+'">');
  document.write('<param name="autoStart" value="true">');
  document.write('<param name="autoSize" value="true">');
  document.write('<param name="showControls" value="true">');
  document.write('<param name="showStatusBar" value="false">');
  document.write('<param name="showDisplay" value="false">');
  document.write('<embed type="application/x-mplayer2" height="480" pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/" src="'+file+'" name="MediaPlayer" autostart=true>');
  document.write('<noembed> Your browser does not support embedded files. </noembed> </embed>');
  document.write('</object>');
  return true;
}
