//tmpCount = Number(document.forms[0].Count.value); tmpCount = 20; tmpStart = Number(document.forms[0].Start.value); tmpLast = tmpStart+tmpCount; tmpType = document.forms[0].PageType.value; tmpElements = searchOnixResults.length; searchElements = searchOnixResults.length-1; //reorder search results if (args['SearchOrder'] && args['SearchOrder']==3) { searchOnixResults.sort(compareDate); var blankArray = new Array(''); searchOnixResults = blankArray.concat(searchOnixResults); } if ( tmpLast > (tmpStart + tmpElements) ) { tmpLast = tmpStart + tmpElements; } function compareDate(aValue1, aValue2) { if (typeof(aValue1)== 'undefined') { return 1 } if (typeof(aValue2)== 'undefined') { return -1 } var d1 = unescape(aValue1.viewCol5).split("/"); var d2 = unescape(aValue2.viewCol5).split("/"); var tmpDate1 = new Date(); var tmpDate2 = new Date(); var tmpMonth1 = d1[1]; var tmpMonth2 = d2[1]; if (d1[1].substring(0,1) == "0") tmpMonth1 = tmpMonth1.substring(1,2); if (d2[1].substring(0,1) == "0") tmpMonth2 = tmpMonth2.substring(1,2); tmpDate1.setMonth(Number(tmpMonth1)-1); tmpDate1.setFullYear(d1[2].substring(0,4)) tmpDate2.setMonth(Number(tmpMonth2)-1); tmpDate2.setFullYear(d2[2].substring(0,4)) if(tmpDate1 > tmpDate2) { return -1; } if(tmpDate1 < tmpDate2) { return 1; } return 0; } // shopping cart document.write('
'); // cart summary document.write('

'); document.write('
Number of items in cart:
'); document.write('
Current total:
'); document.write('

'); document.write('
'); document.write('
'); document.write('
  
'); document.write('
'); if (searchElements > 0 ) { document.write('
'); // blurb //Result pages: 1 - 10 | 11 - 20 | 21 - 30 var currentCount = tmpCount+tmpStart-1; if (currentCount > searchElements) { var currentCount = searchElements; } document.write('

Showing ',tmpStart,' - ',currentCount,' of ',searchElements,' results for "',args['query'],'" within our full catalogue.
'); document.write('



'); //index var currentBIC = ""; // check cookie if (getCookie('Palgrave') && getCookie('Palgrave')!="") { var thisCookie = getCookie('Palgrave'); var thisCookieSplit = thisCookie.split(';'); var thisArrayCookie = splitCookie('Palgrave'); // split as an array } for (var j = tmpStart; j < tmpLast; j++) { if (typeof(searchOnixResults[j]) != 'undefined') { if(searchOnixResults[j].viewCol6 != "") { var priceAvailability = new PriceAvailability(unescape(searchOnixResults[j].viewCol6)); } var thisISBN = unescape(searchOnixResults[j].viewCol6); var thisTitle = unescape(searchOnixResults[j].viewCol2).replace(/\'/ig,""); if(priceAvailability && priceAvailability.price) { var thisPrice = priceAvailability.price; } else { var thisPrice = unescape(searchOnixResults[j].viewCol7).replace(/\,/,""); } if(priceAvailability && priceAvailability.available) { var availability = '|A'; } else { // var availability = '|NA'; var availability = '|A'; } var passValues = thisISBN + "|" + thisTitle + "|" + thisPrice; var passBuy = thisISBN + "|" + thisTitle + "|" + thisPrice + "|B" + availability; var passInspect = thisISBN + "|" + thisTitle + "|" + thisPrice + "|I" + availability; var addtoValue = "Num_" + unescape(searchOnixResults[j].viewCol6); ISBN13 = searchOnixResults[j].viewCol6; ISBN10 = convISBN13toISBN10(preEditISBN(ISBN13)); document.write(''); document.write(''); var thisVal = ""; var innerID = "buyid" + j; document.write('
',unescape(searchOnixResults[j].viewCol2),'
'); document.write('',unescape(searchOnixResults[j].viewCol4),'  |  ISBN13: ',ISBN13,'
'); /* if (searchOnixResults[j].viewCol7 != ""&&searchOnixResults[j].viewCol7 != "$0.00") { // only display RRP if exists document.write('RRP: ',searchOnixResults[j].viewCol7,'  '); } */ document.write('RRP: ',thisPrice,'  '); if (searchOnixResults[j].viewCol9 != "") { document.write(unescape(searchOnixResults[j].viewCol9),'  '); } //document.write('Publication date: ',unescape(searchOnixResults[j].viewCol5).substr(3).split(' ')[0],'  ',unescape(searchOnixResults[j].viewCol8),'

'); var tmpPubDate = unescape(searchOnixResults[j].viewCol5).split("/") document.write('Publication date: ',tmpPubDate[2].substring(0,4) + "/" + tmpPubDate[1],'  ',unescape(searchOnixResults[j].viewCol8),'

'); document.write(unescape(searchOnixResults[j].viewCol10),'
'); document.write('
'); if(thisCookie && thisCookie.indexOf(thisISBN)!=-1) { for(var i=0;i'); document.write(' ',thisArrayCookie[i][5]); } else { document.write(''); } } } document.write('

'); } else { document.write('
Units: '); // inspect if (searchOnixResults[j].viewCol17=="1") // inspection copies only allowed if col17 = 1 { //document.write('

'); document.write('

'); } } if(priceAvailability && (!priceAvailability.available)) { //document.write('

Not in stock

'); document.write('

',priceAvailability.getShipDateString(),'

'); } document.write('


'); } } document.write('

'); // next previous 20 articles tmpNextStart = tmpStart + 20; tmpPrevStart = tmpStart - 20; if (searchElements%20 == 0) { tmpNumPages = (searchElements/20); } else { tmpNumPages = (searchElements-(searchElements%20))/20+1; } tmpCurrentPage = (tmpStart + tmpCount-1)/20; if ((searchElements > 0) && (tmpStart < searchElements)) { if (tmpPrevStart > 0) { var tmpLoc = document.location.href.replace(/&start=\d*/,"&start="+(tmpStart-20)); document.write('

'); } else { document.write('

'); } document.write('| Page ',tmpCurrentPage,' of ',tmpNumPages,' | '); if (tmpNextStart < searchElements) { var tmpLoc = document.location.href.replace(/&start=\d*/,"&start="+(tmpStart+20)); document.write('

'); } else { document.write('

'); } } } else { // no results document.write('

There were no results for "',args['query'],'" within our full catalogue.
'); document.write('



'); }