/*
Create medea player object
Copyright (c) 2006 Ylab, http://www.ylab.nl
Author: Yohan Creemers
version 1.0
*/
function openVideo(urlVideo, w, h, objReplace, btn){
	var div = document.createElement("div");
	div.id  = 'videoplayer';
	div.style.visibility  = 'hidden';
	btn.style.visibility  = 'hidden';

  var myObject = document.createElement('object');
  div.appendChild(myObject);
  myObject.classid= "clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6";
  myObject.width = w;
  myObject.height = h;
  myObject.URL = urlVideo;
  myObject.rate = "1";
  myObject.currentPosition = "0";
  myObject.playCount = "1";
  myObject.autoStart = "-1";
  myObject.uiMode = "mini"; //other values are full and none
  myObject.stretchToFit = "-1";
  myObject.enableContextMenu = "0";
  myObject.windowlessVideo = "-1";

  objReplace = id2object(objReplace);
  objReplace.parentNode.replaceChild(div, objReplace);
	div.style.visibility  = 'visible';
}

