var lnkPages; var Container; var CurrPage = 0; var arrPages = new Array(); function MoveNext() { if (CurrPage < arrPages.length - 1) { CurrPage++; Container.innerHTML = arrPages[CurrPage]; lnkPages.innerHTML = 'Page ' + (CurrPage + 1) + ' of ' + arrPages.length; } } function MovePrev() { if (CurrPage > 0) { CurrPage--; Container.innerHTML = arrPages[CurrPage]; lnkPages.innerHTML = 'Page ' + (CurrPage + 1) + ' of ' + arrPages.length; } } function MoveTo() { var txtPage; try { txtPage = document.getElementById('txtPage'); CurrPage = parseInt(txtPage.value) - 1; if (( CurrPage> -1 ) && ( CurrPage <= arrPages.length - 1 )) { Container.innerHTML = arrPages[CurrPage]; lnkPages.innerHTML = 'Page ' + (CurrPage + 1) + ' of ' + arrPages.length; } } catch(e){} } function SetButtonStyle(pObj, pWidth) { pObj.style.color = 'red'; pObj.style.paddingTop = '4px'; pObj.style.border = '1px solid #D5D5D5'; pObj.style.backgroundColor = '#F2F2F2'; pObj.style.fontFamily = 'Arial'; pObj.style.fontSize = '11px'; pObj.style.color = '#666666'; pObj.style.fontWeight = 'bold'; pObj.style.height = '15px'; pObj.style.width = pWidth; pObj.style.textAlign = 'center'; pObj.style.verticalAlign = 'middle'; pObj.style.textDecoration = 'none'; pObj.style.cursor = 'pointer'; } function StartProcess() { var lnk; var divPage; var tdMain; var CatCont; var td; var obj; var trPage; var mrg; document.body.style.overflow = 'auto'; document.body.style.margin = '0px'; document.body.style.padding = '0px'; CatCont = document.getElementById('scCatalog').parentNode; divPage = document.createElement('DIV'); divPage.innerHTML = '
'; CatCont.appendChild(divPage); trMain = document.getElementById('rowMain'); var tdMain = document.createElement('TD'); trMain.appendChild(tdMain); tdMain.innerHTML = ''; divPage.style.width = '756px'; tdMain.align = 'right'; tdMain.style.paddingRight = '10px'; trPage = document.getElementById('rowPage'); td = document.createElement('TD'); trPage.appendChild(td); lnk = document.createElement('DIV'); lnk.onclick = MovePrev; lnk.innerHTML = '< Prev'; SetButtonStyle(lnk,'48px'); td.appendChild(lnk); lnk.style.marginRight = '10px'; td = document.createElement('TD'); trPage.appendChild(td); lnkPages = document.createElement('DIV'); lnkPages.style.fontFamily = 'Arial'; lnkPages.style.fontSize = '11px'; lnkPages.style.color = '#666666'; lnkPages.style.marginRight = '10px'; lnkPages.style.noWrap = true; td.appendChild(lnkPages); td = document.createElement('TD'); lnk = document.createElement('DIV'); lnk.onclick = MoveNext; lnk.innerHTML = 'Next >'; lnk.style.marginRight = '10px'; SetButtonStyle(lnk,'48px'); td.appendChild(lnk); trPage.appendChild(td); td = document.createElement('TD'); td.innerHTML = 'Go to page :'; td.style.fontFamily = 'Arial'; td.style.fontSize = '11px'; td.style.color = '#666666'; td.style.width = '65px'; trPage.appendChild(td); td = document.createElement('TD'); td.style.width = '10px'; td.innerHTML = ' '; trPage.appendChild(td); td = document.createElement('TD'); obj = document.createElement('INPUT'); obj.setAttribute('type', 'text'); obj.setAttribute('id', 'txtPage'); obj.style.fontFamily = 'Arial'; obj.style.fontSize = '11px'; obj.style.color = '#666666'; obj.style.width = '40px'; td.appendChild(obj); trPage.appendChild(td); td = document.createElement('TD'); td.style.width = '10px'; td.innerHTML = ' '; trPage.appendChild(td); td = document.createElement('TD'); trPage.appendChild(td); lnk = document.createElement('DIV'); lnk.onclick = MoveTo; lnk.innerHTML = 'Go'; SetButtonStyle(lnk,'30px'); td.appendChild(lnk); Container = document.createElement('DIV'); CatCont.appendChild(Container); } StartProcess(); arrPages[0] = '';arrPages[1] = '';Container.innerHTML = arrPages[0];lnkPages.innerHTML = 'Page ' + (CurrPage + 1) + ' of ' + arrPages.length;