AdminLanguagesGridJsParams = "width=800,height=600";

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

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

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

function AdminLanguagesGridSort( language_id ) {
	document.location.href='sort.php?language_id=' + language_id;
}
