var locationUrl=window.location.href; pageName = locationUrl.split("?"); pageName = pageName[0].split("/"); var parentPage = pageName[pageName.length -2]; pageName = pageName[pageName.length -1]; function checkPageNo(){ var pageForm=document.getElementById("pageForm"); var curPageNo = pageForm.pageNo.value; var lastPageNo = pageForm.lastPageNo.value; if(!isNumber(curPageNo)){ alert("您输入不是数字!"); return false; } if(curPageNo.indexOf(".")!=-1){ alert("您输入的值不是整数!"); return false; } if(parseInt(curPageNo) <= 0){ alert("您输入的页数小于或等于0!"); return false; } if(parseInt(curPageNo) > parseInt(lastPageNo)){ alert("您输入的页数大于总页数!"); return false; } if(curPageNo >= lastPageNo){ next_id.src="/site/images/subpage/btn1-1.gif"; alert("lastpage"); } return true; } function isNumber(oNum){ if(!oNum) return false; var strP=/^\d+(\.\d+)?$/; if(!strP.test(oNum)) return false; try{ if(parseFloat(oNum)!=oNum) return false; }catch(ex){ return false; } return true; } function turnPage(action){ var pageForm=document.getElementById("pageForm"); var curPageNo = pageForm.pageNo.value; var lastPageNo = pageForm.lastPageNo.value; var next_id=document.getElementById("next"); var pre_id=document.getElementById("pre"); var nextun_id=document.getElementById("next_un"); var preun_id=document.getElementById("pre_un"); if (action == 'go'){ if(parseInt(curPageNo) > parseInt(lastPageNo)){ alert("您输入的页数大于总页数!"); return; } pageForm.pageNo.value = parseInt(curPageNo); pageForm.submit(); } if (action == 'previous'){ if(curPageNo != 1){ curPageNo--; pageForm.pageNo.value = parseInt(curPageNo); pageForm.submit(); } } else if (action == 'next' ){ if(curPageNo != lastPageNo){ curPageNo++; pageForm.pageNo.value = parseInt(curPageNo); pageForm.submit(); } } else if(action == 'first'){ curPageNo = 1; } else if(action == 'last'){ curPageNo = lastPageNo; } // pageForm.pageNo.value = parseInt(curPageNo); // pageForm.submit(); } function showDocument(documentPath,aqPagePath,docLayoutPath){ var viewDoc=document.getElementById("viewDoc"); viewDoc.documentPath.value = documentPath; viewDoc.aqPagePath.value = aqPagePath; viewDoc.templatePath.value = docLayoutPath; viewDoc.submit(); } function showDocument(documentPath,aqPagePath,docLayoutPath,channel){ var viewDoc=document.getElementById("viewDoc"); viewDoc.documentPath.value = documentPath; viewDoc.aqPagePath.value = aqPagePath; viewDoc.templatePath.value = docLayoutPath; viewDoc.channel.value = channel; viewDoc.submit(); } function doSearch(){ search.submit(); } function doVote(){ if(voteForm[0].checked==true) voteForm.voteType.value ='1'; else if(voteForm[1].checked==true) voteForm.voteType.value ='2'; else if(voteForm[2].checked==true) voteForm.voteType.value ='3'; else if(voteForm[3].checked==true) voteForm.voteType.value ='4'; voteForm.submit(); window.open("/style/mainPage/voteResultPage","","width=600,height=270"); } function viewVote(){ window.open("/style/mainPage/voteResultPage","","width=600,height=270"); } function openLinkMore(){ window.open("/style/mainPage/friendLinkMore","","width=600,height=270"); } function openLinkMore2(){ window.open("/style/mainPage/LinkMore","","width=500,height=180"); }