doMainBestItemList = true; try { mainBestItemList = array_shuffle(mainBestItemList); } catch(e) { doMainBestItemList = false; } // ÆäÀÌÁö´ç Ç¥½ÃÇÒ »óǰ °¹¼ö var mainBestItemListPerPage = 6; // ½ÃÀÛ ÆäÀÌÁö ¹øÈ£ var currentMainBestItemListPage = 0; function showMainBestItemList() { var totalPage = mainBestItemList.length / mainBestItemListPerPage; if(currentMainBestItemListPage < 0) currentMainBestItemListPage = totalPage - 1; if(currentMainBestItemListPage > totalPage - 1) currentMainBestItemListPage = 0; // ½ÃÀÛ ¹øÈ£ var startItem = currentMainBestItemListPage * mainBestItemListPerPage; for(var i=startItem, j=0; i" + "
\""" + "
" + "
" + "
" + mainBestItemList[i]['itemTitle'] + "
" + "
" + "" + mainBestItemList[i]['amount'] + "¿ø"; } } if(doMainBestItemList) { showMainBestItemList(); } function gotoPrevMainBestItemList() { currentMainBestItemListPage--; showMainBestItemList(); } function gotoNextMainBestItemList() { currentMainBestItemListPage++; showMainBestItemList(); } /* for(i=nan, j=0; i<6+nan; i++, j++) { if(i>mainBestItemList.length - 1) { k = i - mainBestItemList.length; } else { k = i; } dest = document.getElementById("mainBestItemElement" + j); dest.innerHTML = "" + ""; } */