
NSCommentUser={};NSCommentUser.openCommentInput=function(uid){j$('#'+uid+' .reply a').toggleClass('plus');j$('#'+uid+' .reply a').toggleClass('minus');j$('#'+uid+' .inputbox').toggle('blind',null,null,function(){j$('#'+uid+' .inputbox:visible textarea').focus();_NS_F.resize();});};NSCommentUser.openCommentInput=function(uid){try{var
oReplyLI=j$('#'+uid),oReplyBtn=oReplyLI.find('.reply a'),nIdx=parseInt(j$('ol > li').index(oReplyLI))+1,oUploaderArea=j$('.find').eq(nIdx),oTextArea=oReplyLI.find('textarea');oReplyBtn.toggleClass('plus').toggleClass('minus',(function(){if(oUploaderArea.find('#box-message').length>0)
oUploaderArea.find('div[id^="box"]').remove();oTextArea.unbind('keydown.lengthchk');})());oReplyLI.find('.inputbox').toggle('blind',null,null,function(){j$(this).find(':visible textarea').focus();_NS_F.resize();});oTextArea.bind('keydown.lengthchk',function(){oReplyLI.find('.text-len').text(j$(this).val().length);});if(j$('dl .nick').length<=0){oUploaderArea.prepend('<div id="box-message"></div><div id="box" style="display:block;"><div class="btn-img"><span id="btnUp'+nIdx+'"></span></div><div id="save'+nIdx+'"></div></div>');SWFU.load({'holder':'btnUp'+nIdx,'inst':'pprf','rt':nIdx,'button':'','progressCont':oUploaderArea.find('div[id=box-message]')});}}catch(e){}};NSCommentUser.addCallback=function(){NSCommentUser.initPaging();};NSCommentUser.removeCallback=function(data,uid){if(j$('#'+uid).find('ul').length){j$('#'+uid).children('.cm_area').children('p').text('[삭제된 댓글입니다.]');j$('#'+uid).children('.cm_area').children('a').remove();return;};j$('#'+uid).fadeOut('slow');_NS_F.resize();};NSCommentUser._inputVals={'Name':'닉네임','Email':'이메일','URL':'홈페이지'};NSCommentUser.clearInput=function(e){if(j$(e).val()==NSCommentUser._inputVals[j$(e).attr('name')])j$(e).val('');}
NSCommentUser.clearInputs=function(e){try{j$(e).find("input[type='text']").each(function(i,v){NSCommentUser.clearInput(v);});}catch(e){alert(e);}}
NSCommentUser.resetInput=function(e){if(j$(e).val()=='')j$(e).val(NSCommentUser._inputVals[j$(e).attr('name')]);}