﻿windowsMediaPlayer = function(fileName, divId){
	
	this.fileName = fileName;
	this.divId = divId;
	
	this.write = function(){
	document.getElementById(divId).innerHTML = "<object id='mediaPlayer' width='100%' height='100%' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>"
      +"<param name='fileName' value='"+this.fileName+"' />"
      +"<param name='animationatStart' value='true' />"
      +"<param name='stretchToFit' value='false' />"
      +"<param name='transparentatStart' value='true' />"
      +"<param name='autoStart' value='true' />"
      +"<param name='showControls' value='true' />"
      +"<param name='ShowStatusBar' value='true' />"
      +"<param name='loop' value='false' />"
      +"<param name='displaysize' value='0' />"
      +"<embed type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='0' showcontrols='1' showtracker='1' showdisplay='0' ShowStatusBar='1' stretchToFit='0' videoborder3d='0' width='100%' height='100%' src='"+this.fileName+"' autostart='true' designtimesp='5311' loop='false'>"
      +"</embed>"
      +"</object>";
	}

}




openWindow = function(url, width, height){

	var popWin = window.open(url, 'video', 'width='+width+', height='+height+'');
	if(popWin == null || popWin ==  undefined){
	return false;
	}
	popWin.focus();
	return true;
}