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

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

function AdminForumpostsGridAction( n , action , params ) {
	if ($("#"+FNTHSuperGrid_ToolbarId( n , action )).hasClass( "dsb" )) return;
	switch (action) {
	case "new":
		window.open( 'edit.php?mode=new' , '_blank' , AdminForumpostsGridJsParams );break;
	case "modify":
		AdminForumpostsGridModify( $("#"+n).data( "selecteds" )[0] , AdminForumpostsGridJsParams );
		break;
	case "delete":
		if (!window.confirm( 'hello world' )) return;
		BGAction( n , action );
		break;
	case "filter":
		$("#frm_AdminForumpostsGrid").append( "<input type=\"hidden\" name=\"task\" value=\"filter\" />" );
		document.frm_AdminForumpostsGrid.submit();
		break;
	case "moderate":
	case "unmoderate":
		BGAction( n , action , params );
	}
}

function AdminForumpostsGridSelectionChanged( 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 ); } );
}
