var bPostSortByBoardID=true;var bPostSortByAgree=false;var POST_SORT_BY_BOARDID_DESC=1;var POST_SORT_BY_BOARDID_ASC=2;var POST_SORT_BY_AGREE_DESC=3;var POST_SORT_BY_AGREE_ASC=4;var FIELD_BOARDID=2;var FIELD_AGREE=3;var UP_ICON="http://img.pann.com/images/board/icon_tri_brown_up.gif";var DOWN_ICON="http://img.pann.com/images/board/icon_tri_brown.gif";function PostSort(b){nSortType=POST_SORT_BY_BOARDID_DESC;var a=$("FPostList");if(b==FIELD_BOARDID){if(bPostSortByBoardID){nSortType=POST_SORT_BY_BOARDID_DESC}else{nSortType=POST_SORT_BY_BOARDID_ASC}bPostSortByBoardID=!bPostSortByBoardID;$("IconPostSortBoardID").src=bPostSortByBoardID?DOWN_ICON:UP_ICON}else{if(b==FIELD_AGREE){if(bPostSortByAgree){nSortType=POST_SORT_BY_AGREE_DESC}else{nSortType=POST_SORT_BY_AGREE_ASC}bPostSortByAgree=!bPostSortByAgree;$("IconPostSortAgree").src=bPostSortByAgree?DOWN_ICON:UP_ICON}}a.src="/post/post.do?action=list&boardID="+nBoardId+"&pageIndex.sortType="+nSortType}function ShowAllLinkBoard(a,b){for(i=a+1;i<=b;i++){$("LiLinkBoard_"+i).style.display=($("LiLinkBoard_"+i).style.display=="none")?"":"none"}}function writeForm(b){var a=$("FPostList");a.src="/post/post.do?action=form&boardID="+b;a.style.width="680px";a.style.height="500px";ResizeIFrame()}function ShowInputPassword(b,a){sURL="/board/password.vm?boardID="+b+"&mode="+a;window.open(sURL,"InputPassword","width=330px,height=180px,address=no,scrolling=no")}function CheckDeleteBoard(b,a){if(a){ShowInputPassword(b,"DeleteBoard")}else{DeleteBoard(b,false,"")}}function DeleteBoard(d,c,a){var b="";if(sView&&sView.length>0){b="&view="+sView}if(c){document.location.href="/board/board.do?action=delete"+b+"&boardID="+d+"&password="+a}else{if(confirm("보드를 삭제하면 하위의 게시물도 모두 삭제 됩니다. 삭제하시겠습니까?")){document.location.href="board.do?action=delete"+b+"&boardID="+d}}}function CheckModifyBoard(b,a){if(a){ShowInputPassword(b,"ModifyBoard")}else{ModifyBoard(b,false,"")}}function ModifyBoard(d,c,a){var b="";if(sView&&sView.length>0){b="&view="+sView}if(c){if(document.location.href.indexOf("&view=FLYBOARD_POP")!=-1){document.location.href="/board/board.do?action=form"+b+"&boardID="+d+"&password="+a}else{document.location.href="/index/index.do?action=index_main&body=board_form"+b+"&boardID="+d+"&password="+a}}else{if(document.location.href.indexOf("&view=FLYBOARD_POP")!=-1){document.location.href="/board/board.do?action=form"+b+"&boardID="+d}else{document.location.href="/index/index.do?action=index_main&body=board_form"+b+"&boardID="+d}}}function ChangeFlyboardView(d,b){var a=new Date();var c=a.getTime();c+=5000;a.setTime(c);setCookie("FPopup",d,a,"/","");top.location.href=b}function SortBoardList(b,c,a){$(b).src="/board/board.do?action=list_inchannel&channelID="+c+"&pageIndex.sortType="+a}function CloseLayer(){if(bPopupView){window.close()}else{parent.document.getElementById("FFlyBoardView").style.display="none"}}function LayerGoChannel(b){try{if(bPopupView){opener.ViewChannel(b)}else{top.location.href="/c"+b}}catch(a){}}function LayerViewBoard(b){try{if(bPopupView){opener.ViewBoard(b)}else{top.location.href="/b"+b}}catch(a){}};