AdminFeedbacksGridJsParams = "width=800,height=600";
AdminForumpostHeight = 16;

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

function AdminFeedbacksGridAction( n , action , params ) {
	if ($("#"+FNTHSuperGrid_ToolbarId( n , action )).hasClass( "dsb" )) return;
	switch (action) {
	case "new":
		window.open( 'edit.php?mode=new' , '_blank' , AdminFeedbacksGridJsParams );break;
	case "modify":
		AdminFeedbacksGridModify( $("#"+n).data( "selecteds" )[0] , AdminFeedbacksGridJsParams );
		break;
	case "delete":
		if (!window.confirm( aJSLangDefs.blueboardpage_confirm_Delete_feedback )) return;
		BGAction( n , action );
		break;
	case "filter":
		AdminAutocompleteBeforeSubmit( "poster_user" );
		AdminAutocompleteBeforeSubmit( "target_user" );
		$("#frm_AdminFeedbacksGrid").append( "<input type=\"hidden\" name=\"task\" value=\"filter\" />" );
		document.frm_AdminFeedbacksGrid.submit();
		break;
	case "moderate":
	case "unmoderate":
	case "proofread":
	case "unproofread":
		BGAction( n , action , params );
	}
}

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

function MouseOverPost( id ) {
	var o = $("#"+id );
	o.animate(
		{ height: o.data( "height" ) },
		500 , function() {} );
}

function MouseOutPost( id ) {
	var o = $("#"+id );
	o.animate(
		{ height: AdminForumpostHeight },
		500 , function() {} );
}

function InitForumpost( id ) {
	var o = $("#"+id);
	o.data( "height" , o.height() );
	o.css( "height" , AdminForumpostHeight );
	o.css( "overflow" , "hidden" );
	o.mouseover( function() { MouseOverPost( id ); } );
	o.mouseout( function() { MouseOutPost( id ); } );
}
