function Sort(a){$("sortType").value=a;$("startID").value=0;$("indexStartID").vaue=0;$("startIDX").value="";$("indexStartIDX").value="";$("pageNo").value=1;$("startPageNo").value=1;if(a>=3&&a<=6){$("idListType").value=2}else{$("idListType").value=1}if(a==5||a==6){$("sortType2").value=$("sortType2").value=="0"?"1":"0"}else{if(a==3||a==4){$("sortType3").value=$("sortType3").value=="0"?"1":"0"}else{if(a==1||a==2){$("sortType4").value=$("sortType4").value=="0"?"1":"0"}}}$("PageForm").submit()}function ShowLinkBoardList(g,a){var c;var e;var d;var f;var b;i=1;while(i<=a){c="TR_LINK_BOARD_"+g+"_"+i;e="TR_LINK_BOARD_"+g+"_"+i+"_LINE";if(!$(c)){break}d=$(c);f=$(e);b=(d.style.display=="none");d.style.display=(b)?"":"none";f.style.display=(b)?"":"none";i++}ResizeIFrame()}function ViewBoardInChannel(e){var a={startID:$("startID").value,startIDX:$("startIDX").value,indexStartID:new String($("indexStartID").value),indexStartIDX:new String($("indexStartIDX").value),pageNo:$("pageNo").value,startPageNo:$("startPageNo").value,sortType:$("sortType").value,sortType2:$("sortType2").value,sortType3:$("sortType3").value,sortType4:$("sortType4").value,idListType:$("idListType").value,direction:$("direction").value,pageType:$("pageType").value};var b=sChannelListParameters+"_"+((a.startID.length>0)?a.startID:"0")+"_"+((a.startIDX.length>0)?a.startIDX:"0")+"_"+((a.indexStartID.length>0)?a.indexStartID:"0")+"_"+((a.indexStartIDX.length>0)?a.indexStartIDX:"0")+"_"+((a.pageNo.length>0)?a.pageNo:"1")+"_"+((a.startPageNo.length>0)?a.startPageNo:"1")+"_"+((a.pageType.length>0)?a.pageType:"0");setCookie("CHARG",b);sUrl="/index/index.do?action=index_main&boardID="+e;if($("view").value=="board"){sUrl+="&view=board&nChannelID="+nChannelId+"&pageIndex.rowsPerPage=10&pageIndex.startID="+a.startIDX+"&pageIndex.indexStartID="+a.indexStartIDX+"&pageIndex.pageNo="+a.pageNo+"&pageIndex.startPageNo="+a.startPageNo+"&pageIndex.sortType="+a.sortType+"&pageIndex.sortType2="+a.sortType2+"&pageIndex.sortType3="+a.sortType3+"&pageIndex.sortType4="+a.sortType4+"&pageIndex.idListType="+a.idListType+"&pageIndex.direction="+a.direction}if(parent.sView=="LAYER"){top.location.href="/board/board.do?action=view&view=LAYER&boardID="+e}else{if(parent.sView=="undefined"||parent.sView=="Popup"){parent.opener.ViewBoard(e)}else{var c=top.location.toString();var d="";if(c.indexOf("&parentID=")>-1){d=c.substring(c.indexOf("&parentID"))}else{d=""}top.location=sUrl+"&channelID="+nChannelId+d}}}function GoPrevPage(c,b,d,a){$("direction").value=2;GoPage(c,b,d,a)}function GoPage(d,c,e,a){if(typeof(parent)!="undefined"&&parent.$("BoardListInChannel")){parent.scrollTo(0,parent.$("BoardListInChannel").getPosition().y-25)}if(document.PageForm.view.value=="board"){var b=cBoardID;b+="|"+nChannelId;b+="|"+nRowsPerPage;b+="|"+a;b+="|"+a;b+="|"+e;b+="|"+e;b+="|"+c;b+="|"+d;b+="|"+$("sortType").value;b+="|"+$("sortType2").value;b+="|"+$("sortType3").value;b+="|"+$("sortType4").value;b+="|"+$("idListType").value;setCookie("FChannelBoardListPage",b)}var f=$("PageForm");$("startID").value=a;$("startIDX").value=a;$("indexStartID").value=e;$("indexStartIDX").value=e;$("pageNo").value=c;$("startPageNo").value=d;f.submit()};