if ((document.forms[0].PageType.value == "library") && (document.forms[0].Label.value == "onix")) { function checkNewSeries(date) { // checks to see if a book is less than 6 months old if (date!="") { var thisPageDateSplit = date.split('/'); thisDay = thisPageDateSplit[0]; thisMonth = thisPageDateSplit[1] - 1; thisYear = thisPageDateSplit[2]; var bookDate = new Date(); bookDate.setFullYear(thisYear, thisMonth, thisDay); } else { var bookDate = new Date(); bookDate.setMonth(bookDate.getMonth()-6); } oldDate = new Date(); // 6 months before today's date oldDate.setMonth(oldDate.getMonth()-6); if (oldDate < bookDate) { document.write('  '); } } // headline // document.write('
',args['cat'],'
'); tmpCount = Number(document.forms[0].Count.value); tmpStart = Number(document.forms[0].Start.value); tmpLast = tmpStart+tmpCount; tmpType = document.forms[0].PageType.value; tmpElements = viewResults.length - 1; //alert(tmpElements); if ( tmpLast > (tmpStart + tmpElements) ) { tmpLast = tmpStart + tmpElements; } //start views if (indexElements > 0 ) { // blurb //Result pages: 1 - 10 | 11 - 20 | 21 - 30 var currentCount = tmpCount+tmpStart-1; if (currentCount > indexElements) { var currentCount = indexElements; } if (args['type'] == "cat") { document.write('
Showing ',tmpStart,' - ',currentCount,' of ',indexElements,' within our full catalogue in ',args['cat'],'

'); } else if (args['type'] == "key") { document.write('
Showing ',tmpStart,' - ',currentCount,' of ',indexElements,' within key text titles in ',args['cat'],'

'); } else if (args['type'] == "new") { document.write('
Showing ',tmpStart,' - ',currentCount,' of ',indexElements,' within new titles in ',args['cat'],'

'); } else {} document.write('
'); document.write('

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

'); document.write('
'); document.write('
'); document.write('

'); document.write('
Information about orderingSecure Site Information
'); document.write('

'); document.write('
'); if (getCookie('Macmillan') && getCookie('Macmillan')!="") { var thisCookie = getCookie('Macmillan'); var thisCookieSplit = thisCookie.split(';'); var thisArrayCookie = splitCookie('Macmillan'); // split as an array } var currentArea = ""; //index //alert(viewResults[7].viewCol16); for (var j = tmpStart; j < tmpLast; j++) { if (typeof(viewResults[j]) != 'undefined') { var thisISBN = unescape(viewResults[j].viewCol6); var thisTitle = unescape(viewResults[j].viewCol2); var thisPrice = getDiscount(unescape(viewResults[j].viewCol7),viewResults[j].viewCol15); var passValues = thisISBN + "|" + thisTitle + "|" + thisPrice; var passBuy = thisISBN + "|" + thisTitle + "|" + thisPrice + "|B"; var passInspect = thisISBN + "|" + thisTitle + "|" + thisPrice + "|I"; var addtoValue = "Num_" + unescape(viewResults[j].viewCol6); if (currentArea != viewResults[j].viewCol15) { document.write('




'); document.write('

',unescape(viewResults[j].viewCol15)); //checkNewSeries(unescape(viewResults[j].viewCol5)) document.write('

'); document.write('
',unescape(seriesAudienceArray[j]),'

'); document.write('
',unescape(viewResults[j].viewCol4),'

'); document.write('
',unescape(seriesDescriptionArray[j]),'

'); currentArea = viewResults[j].viewCol15; } document.write(''); //create different link for feature site titles tmpSeries = viewResults[j].viewCol15; if ((tmpSeries == "NSW%20Geography") || (tmpSeries == "Macquarie%20Revision%20Guides") || (tmpSeries == "NSW%207-10%20History") || (tmpSeries == "Macquarie%20Study%20Guides") || (tmpSeries == "Mathscape")) { document.write('
',unescape(viewResults[j].viewCol2),' 
'); } else{ document.write('
',unescape(viewResults[j].viewCol2),''); checkNewSeries(unescape(viewResults[j].viewCol5)); document.write('
'); } if (viewResults[j].viewCol4 != "") { // document.write('',unescape(viewResults[j].viewCol4),''); } if (viewResults[j].viewCol7 != ""&&viewResults[j].viewCol7 != "$0.00") { // only display RRP if exists document.write(thisPrice,''); } if (viewResults[j].viewCol6 != "") { document.write('  |  ',unescape(viewResults[j].viewCol6),''); } if (viewResults[j].viewCol5 != "") { //document.write('  |  ',unescape(viewResults[j].viewCol5),''); } var isAvail = checkIsAvailable(unescape(viewResults[j].viewCol5)); if (!isAvail) { document.write('  |  Coming ',unescape(viewResults[j].viewCol5),''); } document.write('
'); if (thisCookie && thisCookie.indexOf(thisISBN)!=-1) { for (var i=0;i'); document.write(' ',thisArrayCookie[i][4]); } else { document.write(''); } } } document.write('

'); } else { var thisVal = ""; var innerID = "buyid" + j; //var innerID = thisISBN; document.write('
'); document.write('  # Units '); // inspect if (viewResults[j].viewCol17=="1") { // inspection copies only allowed if col17 = 1 document.write('
'); } } document.write('
'); document.write('
'); document.write('

'); } } document.write('
'); tmpNextStart = tmpStart + 20; tmpPrevStart = tmpStart - 20; if (indexElements%20 == 0){ tmpNumPages = (indexElements/20); } else { tmpNumPages = (indexElements-(indexElements%20))/20+1; } tmpCurrentPage = (tmpStart + tmpCount-1)/20; if ((indexElements > 0) && (tmpStart <= indexElements)) { if (tmpPrevStart > 0) { document.write('

'); } else { document.write('

'); } document.write('| Page ',tmpCurrentPage,' of ',tmpNumPages,' | '); if (tmpNextStart <= indexElements) { document.write('

'); } else { document.write('

'); } } } else { document.write('

There are no items available.

'); } } else{} if (currentPageType == "onixSearchResults") { document.write('
Advanced Search
'); } else {}