function ShowMaNhungFLV(linkFLV)
{
    showeditform(linkFLV);
}
function ShowMaNhungMP3(linkMp3,width1,height1)
{
    showeditformMp3(linkMp3,width1,height1);
}

function showeditform(linkFLV)
{
	showPopup('divMaNhung');
	//var editform = document.getElementById('divMaNhung');
	
	document.getElementById("txtMaNhungObject").value="<object width='425' height='300'><param name='movie' value='"+linkFLV+"' /><param name='quality' value='high' /><param name='allowFullScreen' value='true' /><param name='allowScriptAccess' value='always' /><embed src='http://kenh14.vn/Scripts/FLV/flvplayer.swf?file="+linkFLV+"' type='application/x-shockwave-flash' width='425' height='300'></embed></object>";
	
	document.getElementById("bgFilter").style.display = 'block';
	document.getElementById("bgFilter").style.zIndex = '5';
    document.getElementById("bgFilter").style.height = document.getElementById('mainDivKenh14').offsetHeight + 'px';
}
function showeditformMp3(linkMp3,width1,height1)
{
	showPopup('divMaNhung');
	//var editform = document.getElementById('divMaNhung');
	
	document.getElementById("txtMaNhungObject").value="<embed wmode=\"transparent\" src=\"http://kenh14.vn/Scripts/Mp3Player/mp3Player.swf?url=http://kenh14.vn/"+linkMp3+"\" quality=\"high\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"400\" height=\"40\"></embed>";
	
	document.getElementById("bgFilter").style.display = 'block';
	document.getElementById("bgFilter").style.zIndex = '5';
    document.getElementById("bgFilter").style.height = document.getElementById('mainDivKenh14').offsetHeight + 'px';
}
function hideeditform()
{
	document.getElementById('divMaNhung').style.display = 'none';
	document.getElementById("bgFilter").style.display = 'none';
	
	
}

function showPopup(controlID)
{
	var control = document.getElementById(controlID);
	if (control)
	{
		control.style.display = 'block';
		control.style.zIndex = '100';
		var top = (window.screen.availHeight - control.offsetHeight)/2 - 100;
        var left = (document.documentElement.offsetWidth - control.offsetWidth)/2;
        left += (document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;
        top += (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;

		control.style.left= left + 'px';
		control.style.top=  top + 'px';
		
		return true;
	}
	return false;
}