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

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

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

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

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