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

function AdminArticleConnectedsGridModify( uid ) {
	window.open( 'connected_edit.php?mode=modify&uid='+uid , '_blank' , AdminArticleConnectedsGridJsParams );
}

function AdminArticleConnectedsGridAction( n , action , params ) {
	if ($("#"+FNTHSuperGrid_ToolbarId( n , action )).hasClass( "dsb" )) return;
	switch (action) {
	case "new":
		window.open( 'connected_edit.php?mode=new&source_article_id=' + params.source_article_id , '_blank' , AdminArticleConnectedsGridJsParams );break;
	case "modify":
		AdminArticleConnectedsGridModify( $("#"+n).data( "selecteds" )[0] , AdminArticleConnectedsGridJsParams );
		break;
	case "delete":
		if (!window.confirm( aJSLangDefs.ac_confirm_Delete_article_connection )) return;
		BGAction( n , action );
		break;
	case "filter":
		$("#frm_AdminArticleConnectedsGrid").append( "<input type=\"hidden\" name=\"task\" value=\"filter\" />" );
		document.frm_AdminArticleConnectedsGrid.submit();
		break;
	}
}

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

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