var DmdNTWSettings_e060b064087e4f05926cfb0b17677d3c = { pageItems : [[{"DiamdNo":"AUG241273","StockNo":"STL335702","Title":"TEENAGE MUTANT NINJA TURTLES X NARUTO #1","Publisher":"IDW-PRH","IsAllowed":true,"IsCustom":false,"Category":"1 "}],[],[]], dates : ["Wednesday, November 20, 2024","Wednesday, November 13, 2024","Wednesday, November 6, 2024"], numOfColumns : 3, primaryColor : '#1F68A5', secondaryColor : '#1FA548', bgColor : '#FFFFFF', itemWidthPer : 100 / 3, numPrevWeeks : 2, nextWeeksDate : '', curWeekDate : 'Wednesday, November 20, 2024', rowsPerPage: 5, curPage: 0, currentIndex: 0 }; function DmdNTW_e060b064087e4f05926cfb0b17677d3c() { var settings = DmdNTWSettings_e060b064087e4f05926cfb0b17677d3c; document.write('
'); for (var i = 0; i < settings.dates.length; i++) { if (settings.dates[i] == settings.curWeekDate) { DmdNTW_ChangeDate_e060b064087e4f05926cfb0b17677d3c(i); settings.currentIndex = i; } } } function DmdNTW_ChangeDate_e060b064087e4f05926cfb0b17677d3c(index) { var settings = DmdNTWSettings_e060b064087e4f05926cfb0b17677d3c; settings.currentIndex = index; settings.curPage = 0; document.getElementById("dmdNewReleasesWidget_e060b064087e4f05926cfb0b17677d3c").innerHTML = DmdNTW_SetDisplayMarkup_e060b064087e4f05926cfb0b17677d3c(settings.pageItems[index], settings.dates[index]); } function DmdNTW_NextPage_e060b064087e4f05926cfb0b17677d3c() { var settings = DmdNTWSettings_e060b064087e4f05926cfb0b17677d3c; settings.curPage += 1; document.getElementById("dmdNewReleasesWidget_e060b064087e4f05926cfb0b17677d3c").innerHTML = DmdNTW_SetDisplayMarkup_e060b064087e4f05926cfb0b17677d3c(settings.pageItems[settings.currentIndex], settings.dates[settings.currentIndex]); } function DmdNTW_PrevPage_e060b064087e4f05926cfb0b17677d3c() { var settings = DmdNTWSettings_e060b064087e4f05926cfb0b17677d3c; settings.curPage -= 1; document.getElementById("dmdNewReleasesWidget_e060b064087e4f05926cfb0b17677d3c").innerHTML = DmdNTW_SetDisplayMarkup_e060b064087e4f05926cfb0b17677d3c(settings.pageItems[settings.currentIndex], settings.dates[settings.currentIndex]); } function DmdNTW_SetDisplayMarkup_e060b064087e4f05926cfb0b17677d3c(collection, displayDate) { var settings = DmdNTWSettings_e060b064087e4f05926cfb0b17677d3c; var markup = ''; markup += '

New Releases - ' + displayDate + '

'; markup += '
'; var curWeekIndex = 0; markup += '
'; markup += 'Upcoming Releases'; if (settings.dates.length > 1) { markup += ' - '; for(var j = 0; j < settings.dates.length; j++) { var dateText = '' if (settings.dates[j] == settings.curWeekDate) { dateText = "This Week"; curWeekIndex = j; } else if (settings.dates[j] == settings.nextWeeksDate) { dateText = "Next Week"; } else { if (j - curWeekIndex == 1) { dateText = "Last Week"; } else { dateText = (j - curWeekIndex) + " Weeks Previous"; } } markup += '' + dateText + ''; if (j != settings.dates.length -1) { markup += ' - '; } } } markup += '
'; var startingIndex = settings.curPage * (settings.rowsPerPage) * settings.numOfColumns; var endingIndex = (settings.curPage + 1) * (settings.rowsPerPage) * settings.numOfColumns; var hasMore = true; var isFirstPage = settings.curPage == 0; if (endingIndex >= collection.length || settings.rowsPerPage == 0) { endingIndex = collection.length; hasMore = false; } if (settings.rowsPerPage != 0) { markup += '
'; if (!isFirstPage) { markup += '<< PREV PAGE'; } if (!isFirstPage && hasMore) { markup += ' '; } if (hasMore) { markup += 'NEXT PAGE >>'; } markup += '
'; } for(var i = startingIndex; i < endingIndex; i++) { markup += '
'; markup += ''; markup += '
' + collection[i].Title + '
'; markup += '
' + collection[i].Publisher + '
'; markup += '
'; } if (settings.rowsPerPage != 0) { markup += '
'; markup += '
'; if (!isFirstPage) { markup += '<< PREV PAGE'; } if (!isFirstPage && hasMore) { markup += ' '; } if (hasMore) { markup += 'NEXT PAGE >>'; } markup += '
'; } markup += '
'; return markup; } DmdNTW_e060b064087e4f05926cfb0b17677d3c();