var flashMovie;
function openFlashLightBox(parFileName){ // onClick 'thumb'
 	resizeFadeDiv();
	y = document.body.scrollTop;
	document.body.scrollTop = 0;
	document.getElementById("flvFlashPlayer").innerHTML = getLightboxObject("/cmdata/videos/flv_player.swf?fileName="+parFileName, 360, 240, 9);
	document.getElementById("flashPopup").style.visibility  = "visible";
	document.getElementById("divFadeBody").style.visibility = "visible";
}
function closeFlashLightBox() { // onClick 'x' and outside
	document.getElementById("divFadeBody").style.visibility = "hidden";
	document.getElementById("flashPopup").style.visibility  = "hidden";
	document.body.scrollTop = y;
	document.getElementById("flvFlashPlayer").innerHTML = "";
}
function getLightboxObject(parName, parWidth, parHeight, parVersion) {
	var x
	if ( parHeight==0 ) {
		parHeight = parWidth*3/4+30;
	}
	if ( parWidth==0 ) {
		parWidth = parHeight*4/3;
	}
	x = '<object id="myFlashMovie" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+parVersion+',0,0,0" width="'+parWidth+'" height="'+parHeight+'" align="middle">';
	x += '<param name="allowScriptAccess" value="sameDomain"/>';
	x += '<param name="movie" value="'+parName+'" />';
	x += '<param name="quality" value="high" />';
	x += '<param name="wmode" value="transparent" />';
	x += '<param name="swliveconnect" value="true" />';
	x += '<embed swliveconnect="true" wmode="transparent" name="myFlashMovie" src="'+parName+'" quality="high" width="'+parWidth+'" height="'+parHeight+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"  play="true" wmode="transparent"/>';
	x += '</object>';
	return x;
}
function resizeFlashBox(parWidth, parHeight) {
	if (parHeight == undefined) {
		parHeight = 576;
	}
	if (parWidth == undefined) {
		parHeight = 1024;
	}
	document.getElementById("myFlashMovie").width = parWidth;
	document.getElementById("myFlashMovie").height = parHeight;
}
