var currPostId=0;nProtestTargetType=1;function AgreePost(a){currPostId=a;new Ajax("/post/post.do?action=agree",{postBody:"postID="+a,onComplete:onAgreeResponse}).request()}function WriteThread(d,c,e,a){var b="";strFrameId="FThreadPost"+d;if(window.ie){frame=$(strFrameId)}else{frame=document.getElementsByName(strFrameId)[0]}if(frame.style.height<="0px"){b="/post/post.do?action=form&boardID="+nBoardID+"&post.parentID="+d+"&post.threadID="+c+"&post.level="+e+"&post.threadCode="+a;frame.src=b;if(document.location.href.indexOf("&view=FLYBOARD_POP")!=-1){frame.src=b+"&view=FLYBOARD_POP"}frame.style.display="block";frame.style.width="550px";frame.style.height="220px"}else{frame.src="about:blank";frame.style.width="550px";frame.style.height="0px";frame.style.display="none"}ResizeIFrame()}function moveScrollByPost(a){var b=a;document.location.href="#"+b;window.top.scrollBy(0,-400)}function closeFrame(c,a,b){if(c==0){c=a}if(b==""){b=1}if(b==2){strFrameId="FChildPost"+a}else{strFrameId="FThreadPost"+c}$(strFrameId).src="about:blank";$(strFrameId).style.width="628px";$(strFrameId).style.height="0px";$(strFrameId).style.display="none";ResizeIFrame()}function passView(a,c){var b=window.open("/post/post.do?action=passForm&postID="+a+"&loc="+c,"passConfirm","width=335, height=175");b.focus()}function replyModify(a,c,b){var d=$("password").value;new Ajax("/post/post.do?action=modifyConfirm",{postBody:"postID="+a+"&password="+d+"&loc="+c+"&userInfoID="+b,onComplete:onModifyResponse}).request()}function onModifyResponse(f,h){try{var d=h.getElementsByTagName("code").item(0).firstChild.nodeValue;var c=h.getElementsByTagName("code").item(1).firstChild.nodeValue;var b=h.getElementsByTagName("code").item(2).firstChild.nodeValue;var a=h.getElementsByTagName("code").item(3).firstChild.nodeValue;var i=h.getElementsByTagName("code").item(4).firstChild.nodeValue}catch(g){alert(g)}if(d=="success"){if(b==1){strFrameName="FThreadPost"}else{strFrameName="FChildPost"}strFrameId=strFrameName+c;if(window.ie){frame=$(strFrameId)}else{frame=document.getElementsByName(strFrameId)[0]}frame.src="about:blank";frame.src="post.do?action=readUpdate&postID="+c+"&loc="+b+"&password="+a+"&userInfoID="+i;frame.style.width="550px";frame.style.height="220px";frame.style.display="block";ResizeIFrame()}else{if(d=="wrong_password"){alert("비밀번호가 틀렸습니다. 다시 확인하시기 바랍니다.")}else{if(d=="need_login"){alert("로그인 해야 합니다.");PopupLogin("/post/post.do?action=modifyConfirm&postID="+c+"&loc="+b+"&password="+a+"&userInfoID="+i)}else{if(d=="wrong_userid"){alert("작성자만 수정 가능합니다.")}}}}}function EditThread(a){strFrameId="FThreadPost"+a;if(bIE){frame=$(strFrameId)}else{frame=document.getElementsByName(strFrameId)[0]}frame.src="/post/post.do?action=form&boardID="+nBoardID+"&post.threadID="+a;frame.style.width="628px";frame.style.height="510px";ResizeIFrame()}function AddThreadPost(c,b){var a=$("NewThread"+c);a.innerHTML=b.innerHTML+" --- "+a.innerHTML;parent.ResizeFrame(self.name)}function Sort(a){$("sortType").value=a;$("startID").value=0;$("indexStartID").vaue=0;$("startIDX").value="0,0";$("indexStartIDX").value="0,0";$("pageNo").value=1;$("startPageNo").value=1;if(a==1||a==2){$("sortType2").value=$("sortType2").value=="0"?"1":"0"}if(a==3||a==4){$("sortType3").value=$("sortType3").value=="0"?"1":"0"}$("PageForm").submit()}function onAgreeResponse(b,d){try{var a=d.getElementsByTagName("code").item(0).firstChild.nodeValue}catch(c){alert(c)}if(a=="1"){if(currPostId!=0){oCount=$("AgreeCount"+currPostId);oCount.innerHTML=parseInt(oCount.innerHTML)+1}alert("동감하였습니다.")}else{alert("동감은 한 리플에 한번씩만 가능합니다.")}}function showContent(d,b,c,a){$("content_title"+d).innerHTML="<b>"+b+"</b>&nbsp;<span class='black_snum'>(IP:"+c+")&nbsp;&nbsp;"+a+"</span>";$("content_more"+d).style.display="none";$("content_div"+d).style.display="";$("content_menu"+d).style.display="";ResizeIFrame()}function editReload(a){if(nBoardID==2097964){window.top.document.location.href="/jsp/event/everland2th/evt_eventTwo.jsp"}else{parent.$("FPostList").src="/post/post.do?action=list&boardID="+nBoardID+"&pageIndex.sortType=0&pageIndex.rowsPerPage=15"}}function pg_init(){try{for(var a=0;a<document.images.length;a++){pann.resizeImage(document.images[a]);$(document.images[a]).removeAttribute("align")}pann.resizeEmbedObject()}catch(b){}}function GoPrevPage(c,b,d,a,e){$("direction").value=2;GoPage(c,b,d,a,e)}function GoPage(c,b,e,a,f){var d=nBoardID;d+="|"+nBoardID;d+="|"+nRowsPerPage;d+="|"+a;d+="|"+a;d+="|"+e;d+="|"+e;d+="|"+b;d+="|"+c;d+="|"+$("sortType").value;d+="|"+$("sortType2").value;d+="|"+$("sortType3").value;setCookie("FPostListPage",d,"","/");var g=$("PageForm");$("startID").value=a;$("startIDX").value=a;$("indexStartID").value=e;$("indexStartIDX").value=e;$("pageNo").value=b;$("startPageNo").value=c;if(typeof(f)=="undefined"){f=""}$("nextStartID").value=f;$("nextStartIDX").value=f;g.submit()}function replyWrite(a){if($("TopPostWrite").style.height=="0px"){if($("TopPostWrite").src==""){$("TopPostWrite").src="/post/post.do?action=form&boardID="+a}$("TopPostWrite").style.display="";$("TopPostWrite").style.height="218px"}else{$("TopPostWrite").style.display="none";$("TopPostWrite").style.height="0px"}moveScrollByPost("TopPostWrite");ResizeIFrame()}function replyPostWrite(a){if($("TopPostWrite").style.height=="0px"){$("TopPostWrite").src="/post/post.do?action=form&boardID="+a;$("TopPostWrite").style.display="";$("TopPostWrite").style.height="218px"}else{$("TopPostWrite").style.display="none";$("TopPostWrite").style.height="0px"}moveScrollByPost("TopPostWrite");ResizeIFrame()}function showHiddenPost(a){$(a).style.display=$(a).style.display=="block"?"none":"block";pann.resizeIFrame()};