var newWindVideo;
var VideoFileName;
var VideoFilePath;
function vViewVideo(name, path) {
	var config_ = 'status,menubar,resizable,height=350,width=300';
	var pref = Math.floor(Math.random() * 10000);
	newWindVideo = window.open('', 'video_'+pref, config_);
	VideoFileName = name;
	VideoFilePath = path;
	window.setTimeout("writeViewVideo()", 50);
}
function writeViewVideo() {
	var name = VideoFileName;
	var out;
	out = '<html><head></head><body>';
	out += '<embed src="' + VideoFilePath + name + '" height=300 width=280 autoplay=true controller=true type="'+getMimeType()+'" ></embed>';
	out += '</body></html>';
	newWindVideo.document.write(out);
	newWindVideo.document.close();
}
function getMimeType() {
	var mimeType = "application/x-mplayer2"
	var agt=navigator.userAgent.toLowerCase()
	if (navigator.mimeTypes && agt.indexOf("windows")==-1) {
		var plugin=navigator.mimeTypes["audio/mpeg"].enabledPlugin
		if (plugin) mimeType="audio/mpeg"
	}
	return mimeType
}