function DeleteComment ( CommentID, PageNum, Type ) { Type = typeof ( Type ) != 'undefined' ? Type : 'profile'; if ( confirm ( 'Da li zaista želite izbrisati komentar?' ) == true ) { MvPost ( 'delete_comment.php', { commentID: CommentID, type: Type }, function () { var numOfComments = $('#CommentsCountHolder').html () * 1; $('#CommentsCountHolder').html ( numOfComments - 1); GetComments ( PageNum ); } ); } } function AddComment ( ParentComment, PageNum ) { var content = $('#CommentArea_' + ParentComment).val (); if ( jQuery.trim ( content ) == '' ) return; $('#AddCommentButton_' + ParentComment).val ( 'Dodajem ...' ).attr ( 'disabled', true ); $('#CommentArea_' + ParentComment).attr ( 'disabled', true ); MvPost ( 'add_comment.php', { c_ommentID: ParentComment, co_ntent: content, typ_e: commentType, reco_rdID: commentRecordID }, function () { var numOfComments = $('#CommentsCountHolder').html () * 1; $('#CommentsCountHolder').html ( numOfComments + 1); if ( ParentComment == 0 ) GetComments ( 1 ); else GetComments ( PageNum ); } ); } function GetComments ( PageNum ) { $('#CommentsLoading').fadeIn ( 'fast' ); $.scrollTo ( '#CommentsScroll', 800, {offset:-10} ); MvGet ( 'get_comments.php', { page: PageNum, type: commentType, recordID: commentRecordID }, function ( CommentsHTML ) { $('#CommentsLoading').hide (); $('#CommentsContainer').html ( CommentsHTML ); } ) }