<script> var curpage = <%=index%>;//今のページ var total = <%=pgCount%>;//ページ数 function Reload(index) { var nurl = 'ImageListByStore.aspx?pgidx='+index var url = window.location.href; var arr1 = url.split('?'); if(arr1.length > 1) { var arr2 = arr1[1].split('&'); for(var i = 1; i < arr2.length; i++) { nurl += '&'+arr2[i]; } } window.location.replace(nurl); } function PageBack() { if(document.getElementById('lblPage1').innerText > 5) { if(curpage!=0) { document.getElementById('lblPage'+(curpage%5==0?5:curpage%5)).style.fontWeight='normal'; document.getElementById('lblPage1'+(curpage%5==0?5:curpage%5)).style.fontWeight='normal'; } for(var i = 1; i < 6; i++) { document.getElementById('lblPage'+i).innerText -= 5; document.getElementById('lblPage'+i).style.visibility = 'visible'; document.getElementById('lblPage1'+i).innerText -= 5; document.getElementById('lblPage1'+i).style.visibility = 'visible'; if(document.getElementById('lblPage'+i).innerText == curpage) { document.getElementById('lblPage'+i).style.fontWeight = 'bolder'; document.getElementById('lblPage1'+i).style.fontWeight = 'bolder'; } } } } function ShowImgDetails(control) { var url = control.src.replace('Temp','Details'); var id = url.split('?')[1].split('=')[1]; ImageListByStore.UpdateReadNum(id); var height = 642; if(window.navigator.appVersion.substring(22,25) != 6.0) { height = 685; } window.open(url,'','height=' + height + ',width=598,top=20,left=200,toolbar=no,menubar=yes,location=no,resizable=no,status=no,scrollbars=no'); } function PageNext() { if(curpage!=0) { document.getElementById('lblPage'+(curpage%5==0?5:curpage%5)).style.fontWeight='normal'; document.getElementById('lblPage1'+(curpage%5==0?5:curpage%5)).style.fontWeight='normal'; } if((document.getElementById('lblPage1').innerText/5+1 <= total/5)) { for(var i = 1; i < 6; i++) { document.getElementById('lblPage'+i).innerText = +document.getElementById('lblPage'+i).innerText + 5; document.getElementById('lblPage1'+i).innerText = +document.getElementById('lblPage1'+i).innerText + 5; if(+document.getElementById('lblPage1').innerText+i > total+1) { document.getElementById('lblPage'+i).style.visibility = "hidden"; document.getElementById('lblPage1'+i).style.visibility = "hidden"; } } } for(var i = 1; i < 6; i++) { if(document.getElementById('lblPage'+i).innerText == curpage) { document.getElementById('lblPage'+i).style.fontWeight = 'bolder'; document.getElementById('lblPage1'+i).style.fontWeight = 'bolder'; } } } function PageTurn(column,op) { var arru = window.location.href.split('?'); var arrp = arru[1].split('&'); var stocd = document.getElementById('tbShow').rows[column-1].cells[0].childNodes[0].innerText; stocd = stocd==0?-1:stocd; var tb = document.getElementById('tbShow').rows[column].cells[0]; var txt = tb.childNodes[0].innerText; var arr = txt.split('件中'); var count = arr[0]; var base = arr[1].split('~')[0]; var lst; if((op == 0&&base - 5 > 0) ||(op == 1 && +base + 5 <= count)) { var start = 0; var end = 0; if(op == 1) { if(+base + 9 < count) { start = +base+5; end = +base + 9; } else if(+base + 9 >= count) { start = +base+5; end = count; } lst = ImageListByStore.GetInfoByStore(+base+5,unescape(arrp[5].split('=')[1]),stocd,arrp[3].split('=')[1],arrp[4].split('=')[1],arrp[1].split('=')[1],unescape(arrp[6].split('=')[1])).value; } else { if(base - 5 > 0) { start = base - 5; end = base - 1; } lst = ImageListByStore.GetInfoByStore(base-5,unescape(arrp[5].split('=')[1]),stocd,arrp[3].split('=')[1],arrp[4].split('=')[1],arrp[1].split('=')[1],unescape(arrp[6].split('=')[1])).value; } tb.childNodes[0].innerText = count + '件中' + start + '~' + end + '件'; var tbl = document.getElementById('tbShow').rows[column-1]; for(var i = 0; i < 5;i++) { if(i < lst.length/4) { for(var j = 0; j < tbl.cells[i+1].childNodes.length;j++) { if(tbl.cells[i+1].childNodes[j].style != null) { tbl.cells[i+1].childNodes[j].style.display = ''; } } tbl.cells[i+1].childNodes[0].value = start + i; tbl.cells[i+1].childNodes[2].childNodes[0].src = 'ImageTemp.aspx?imgid='+lst[4*i]; tbl.cells[i+1].childNodes[4].value = lst[4*i+1]; tbl.cells[i+1].childNodes[6].value = lst[4*i+2]; tbl.cells[i+1].childNodes[8].value = lst[4*i+3]; } else { for(var j = 0; j < tbl.cells[i+1].childNodes.length;j++) { if(tbl.cells[i+1].childNodes[j].style != null) { tbl.cells[i+1].childNodes[j].style.display = 'none'; } } } } } } function OnSelectedChange() { var rad = document.getElementsByName('radlType'); for(var i = 1; i < 4; i++) { if(rad[i].checked && i != 2) { var arr = new Array(); arr[0] = 'Time'; arr[1] = 'Store'; arr[2] = 'Item'; var ourl = window.location.href; var arru = ourl.split('?')[1].split('&'); var nurl = 'ImageListByTime.aspx?pgidx=1'; for(var j = 1; j < arru.length; j++) { nurl += '&' + arru[j]; } var url = nurl.replace('Time',arr[i-1]); window.location.replace(url); break; } } } </script>