AdminArticlesGridJsParams = "width=800,height=700,scrollbars=yes";

function AdminArticlesGridModify( uid ) {
	window.open( 'edit.php?mode=modify&uid='+uid , '_blank' , AdminArticlesGridJsParams );
}

function AdminArticlesGridAction( n , action ) {
	if ($("#"+FNTHSuperGrid_ToolbarId( n , action )).hasClass( "dsb" )) return;
	switch (action) {
	case "new":
		window.open( 'edit.php?mode=new' , '_blank' , AdminArticlesGridJsParams );break;
	case "modify":
		AdminArticlesGridModify( $("#"+n).data( "selecteds" )[0] , AdminArticlesGridJsParams );
		break;
	case "delete":
		if (!window.confirm( aJSLangDefs.articles_confirm_Delete_article )) return;
		BGAction( n , action );
		break;
	case "filter":
		$("#frm_AdminArticlesGrid").append( "<input type=\"hidden\" name=\"task\" value=\"filter\" />" );
		document.frm_AdminArticlesGrid.submit();
		break;
	}
}

function AdminArticlesGridSelectionChanged( tblid , chk , id ) {
	BGSelectionChanged( tblid , chk , id );
	BGSelectionChangedDefaultAMD( tblid , chk , id );
}

function AdminArticlesSelect( article_url , funcnum ) {
	window.opener.CKEDITOR.tools.callFunction( funcnum , article_url );
	window.close();
}
