

var swfObjectAssetsPath = "/player/swfobject_2_2/"; //base path to the player assets
var playerAssetsPath = "/player/flash-video-player/"; //base path to the player assets
var ifFirstVideoLoad= 0;
var flashvars = {};



function playVideoMovieFn(mvPath,MvWidth,MvHeight,MvStaticPath){

if(ifFirstVideoLoad ==0){
swfObjectAssetsPath = MvStaticPath + swfObjectAssetsPath;
playerAssetsPath = MvStaticPath + playerAssetsPath;
}
		flashvars.skinName = playerAssetsPath+"Clear_Skin_1";
		flashvars.streamName = "";
		
	playNewFlashMovie(mvPath, MvWidth, MvHeight); // Intiate Play movie function.
	 ifFirstVideoLoad = 1; 
}
				var params = {};
	params.quality = "best";
	params.scale = "noscale";
	params.wmode = "transparent";
var attributes = {};

var flashMovieWidth = '0';
var flashMovieHeight = '0';

function runEmbedSwf() {
	swfobject.embedSWF(
					playerAssetsPath+"FLVPlayer_Progressive.swf", 
					"myAlternativeContent", 
					flashMovieWidth, 
					flashMovieHeight, 
					"9.0.0", 
					swfObjectAssetsPath+"expressInstall.swf", 
					flashvars, 
					params, 
					attributes
					);
 }
// playNewFlashMovie('filename.flv', 'width', 'height');
function playNewFlashMovie(movieFileName, movieFileWidth, movieFileHeight) {
	flashMovieWidth = movieFileWidth;
	flashMovieHeight = movieFileHeight;
	document.getElementById('myFlashMovieHolder').removeChild(document.getElementById('myAlternativeContent'));
	flashvars.streamName = movieFileName;
	var newFlashMovie = document.createElement('div');
	newFlashMovie.setAttribute('id', 'myAlternativeContent');
	document.getElementById('myFlashMovieHolder').appendChild(newFlashMovie);
	runEmbedSwf();
	
	$('#myFlashMovieHolder').jOverlay({css : {marginTop:'-180px',border:'4px solid #B9B9B9'}, color:'#000000', opacity : 0.75,bgClickToClose : false
 });
 }

function closeVideo(){
	document.getElementById('myFlashMovieHolder').style.display = "none";
}
