﻿// JScript File
function ConfirmDel(){
	if(confirm('Bạn thật sự muốn thực hiện xóa dữ liệu \nvà các thành phần liên quan ?') == false)
	{
		window.event.returnValue = false;
		return false;
	}
}

function CancelPostBack(){
	window.event.returnValue = false;
	return false;
}

function GoPage(psPage,psPara,iPage){
	var lsReq = '';
	if(psPage && psPara && iPage){
		pgArticleList.action = psPage + "?" + psPara + "=" + iPage;;
		pgArticleList.submit();
	}
}

//------------------- File & Media --------------------------//
function OpenTextFile(psUrlFile){
	var lsDiv, lWidth, lHeight,lsContent;
	try{
		lHeight = screen.availHeight / 2;
		lWidth = screen.availWidth / 2;
		var handlename;
		handlename = window.open(psUrlFile);
		handlename.focus();
	}catch(ex){}
}

function PlayArticleMedia(psID){
	var lsDiv, lWidth, lHeight,lsContent;
	try{
		lHeight = screen.availHeight / 2;
		lWidth = screen.availWidth / 2;
		var handlename;
		handlename = window.open('../Play/ArticlePlayer.aspx?id='+ psID,'player','scrollbars=yes,menubar=0,status=yes,height=' + lHeight + ',width=' + lWidth + ',left=' + lWidth/2 + ',top=' + lHeight/2);
		handlename.focus();
	}catch(ex){}
}

function PlayMedia(psType,psCheck,psID){
	var lsDiv, lWidth, lHeight,lsContent;
	try{
		lHeight = screen.availHeight / 2;
		lWidth = screen.availWidth / 2;
		var handlename;
		handlename = window.open('../Play/MediaPlayer.aspx?type=' + psType + '&check=' + psCheck + '&id=' + psID,'player','scrollbars=yes,menubar=0,status=yes,height=' + lHeight + ',width=' + lWidth + ',left=' + lWidth/2 + ',top=' + lHeight/2);
		handlename.focus();
	}catch(ex){}
}