function gotoPageNumber(c,d,b,a){var e=parseInt($(a).value);if(!isNaN(e)){if(e<1){e=1}else{if(e>b){e=b}}displayPage(c,d,e)}else{alert("Please Enter a number.")}}function displayPage(b,c,f){var a=new Hash();var e=getSelectedItems();a["pagingCriteria.resultSet"]=b;a["pagingCriteria.page"]=f;a["pagingCriteria.total"]=c;a["pagingCriteria.recordsPerPage"]=$("searchResultsCount").value;a.listName=$("listName").value;a.sortOrder=$("sortBy").value;a.totalSelected=e;var g=Form.Methods.serialize(document.forms.publicationForm);g=uniqueParams(g);var d;if(isDatabaseWos()){d="WosPaging.action"}else{d="WokPaging.action"}document.getElementById("topUploadProgressSection").style.display="block";document.getElementById("bottomUploadProgressSection").style.display="block";if(e>0){new Ajax.Updater("pubListCount","AddPublication.action",{onComplete:function(){new Ajax.Updater("resultContainer",d,{onSuccess:function(h){var k=h.responseText;k=k.replace("utsAsStringID","utsAsStringIDNEW");document.getElementById("dummy").style.display="none";document.getElementById("dummy").innerHTML=k;var j=new Hash();j.listName=$("listName").value;j.mode="wok";j.utsAsString=document.getElementById("utsAsStringIDNEW").value;document.getElementById("dummy").innerHTML="";new Ajax.Updater("wokRecordStatus","GetWokRecordsStatusPagination.action",{onComplete:function(){document.getElementById("topUploadProgressSection").style.display="none";document.getElementById("bottomUploadProgressSection").style.display="none";if(e>0){var m=getPublicationsAdded();var l=e-m;var t="";if(m>0){t+=m+" item(s) added to your "+$("displayName").value}if(l>0){if(m>0){t+="
"}t+=l+" item(s) were not added to your "+$("displayName").value+".
This may be due to a system error or perhaps the item(s) are already in your "+$("displayName").value+"."}t+="";var q=document.getElementById("count");var p=document.getElementById("bottomCount");q.innerHTML=t;p.innerHTML=t}var o=document.getElementById("wokStatusAsString").value;var s=new Array();s=o.split("@");var n=s.length;for(i=0;i0){document.getElementById(r).style.display="block"}}},parameters:j.toQueryString()})},parameters:a.toQueryString()})},parameters:g})}else{new Ajax.Updater("resultContainer",d,{onSuccess:function(h){var k=h.responseText;k=k.replace("utsAsStringID","utsAsStringIDNEW");document.getElementById("dummy").style.display="none";document.getElementById("dummy").innerHTML=k;var j=new Hash();j.listName=$("listName").value;j.mode="wok";j.utsAsString=document.getElementById("utsAsStringIDNEW").value;new Ajax.Updater("wokRecordStatus","GetWokRecordsStatusPagination.action",{onComplete:function(){var n=document.getElementById("wokStatusAsString").value;var m=new Array();m=n.split("@");var o=m.length;for(i=0;i0){document.getElementById(l).style.display="block"}}},parameters:j.toQueryString()});document.getElementById("topUploadProgressSection").style.display="none";document.getElementById("bottomUploadProgressSection").style.display="none"},parameters:a.toQueryString()})}}function isDatabaseWos(){return document.getElementById("database").value=="WOS"}function displayBySelectedOption(e,c){document.getElementById("topUploadProgressSection").style.display="block";document.getElementById("bottomUploadProgressSection").style.display="block";var a=new Hash();if(c=="sort"){var b=e.options[e.options.selectedIndex].value;a.sortOrder=b;a["pagingCriteria.recordsPerPage"]=$("searchResultsCount").value}else{var b=e.value;a["pagingCriteria.recordsPerPage"]=e.value;a["pagingCriteria.pageSizeUpdated"]=true;a.sortOrder=$("sortBy").value}a["pagingCriteria.resultSet"]=$("resultSetValue").value;a["pagingCriteria.page"]=1;a["pagingCriteria.total"]=$("totalCount").value;a.listName=$("listName").value;var d;if(isDatabaseWos()){d="WosPaging.action"}else{d="WokPaging.action"}new Ajax.Updater("resultContainer",d,{onSuccess:function(f){var h=f.responseText;h=h.replace("utsAsStringID","utsAsStringIDNEW");document.getElementById("dummy").style.display="none";document.getElementById("dummy").innerHTML=h;var g=new Hash();g.listName=$("listName").value;g.mode="wok";g.utsAsString=document.getElementById("utsAsStringIDNEW").value;new Ajax.Updater("wokRecordStatus","GetWokRecordsStatusPagination.action",{onComplete:function(){var l=document.getElementById("wokStatusAsString").value;var k=new Array();k=l.split("@");var m=k.length;for(i=0;i0){document.getElementById(j).style.display="block"}}},parameters:g.toQueryString()});document.getElementById("topUploadProgressSection").style.display="none";document.getElementById("bottomUploadProgressSection").style.display="none"},parameters:a.toQueryString()})}function submitWOKSearchForm(){document.getElementById("wokSearchUploadProgressSection").style.display="block";var c="GetPubCountWosSearch.action";var a="wok";if(isDatabaseWos()){a="wos"}var b=new Hash();b.listName=$("listName").value;b["criteria.database"]=$("database").value;b.searchType=a;b.publicationCount=$("publicationCount").value;b["criteria.lastName"]=$("criteria.lastName").value;b["criteria.firstInitial"]=$("criteria.firstInitial").value;b["criteria.topic"]=$("criteria.topic").value;b["criteria.title"]=$("criteria.title").value;b["criteria.pubYear"]=$("criteria.pubYear").value;b["criteria.address"]=$("criteria.address").value;new Ajax.Updater("resultContainer",c,{onSuccess:function(d){var f=d.responseText;if(f.match("errorDiv")){document.getElementById("resultContainer").style.display="none";document.getElementById("wokErrorDiv").style.display="block";document.getElementById("wokErrorDiv").innerHTML=f;document.getElementById("wokSearchUploadProgressSection").style.display="none";f="";return}document.getElementById("resultContainer").style.display="block";document.getElementById("wokErrorDiv").style.display="none";f=f.replace("utsAsStringID","utsAsStringIDNEW");document.getElementById("dummy").style.display="none";document.getElementById("dummy").innerHTML=f;var e=new Hash();e.listName=$("listName").value;e.mode="wok";e.utsAsString=document.getElementById("utsAsStringIDNEW").value;new Ajax.Updater("wokRecordStatus","GetWokRecordsStatus.action",{onComplete:function(){var j=document.getElementById("wokStatusAsString").value;var h=new Array();h=j.split("@");var k=h.length;for(i=0;i0){document.getElementById(g).style.display="block"}}},parameters:e.toQueryString()});document.getElementById("wokSearchUploadProgressSection").style.display="none"},parameters:b.toQueryString()})};