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('');
document.write(' |
');
document.write('