var DmdNTWSettings_b24ec0d61218473990f21c1bab4827d1 = { pageItems : [[{"DiamdNo":"FEB251084","StockNo":"STL361161","Title":"ARCHIE \u0026 FRIENDS LEVEL UP ONESHOT CVR A LOVALLO \u0026 PARENT","Publisher":"ARCHIE COMIC PUBLICATIONS","IsAllowed":true,"IsCustom":false,"Category":"1 "},{"DiamdNo":"NOV241692","StockNo":"STL349671","Title":"NIGHT OF THE SLASHERS #4","Publisher":"MAGMA COMIX","IsAllowed":true,"IsCustom":false,"Category":"1 "},{"DiamdNo":"JAN251240","StockNo":"STL357610","Title":"STAR TREK: LORE WAR #1","Publisher":"IDW-PRH","IsAllowed":true,"IsCustom":false,"Category":"1 "}],[]], dates : ["Wednesday, April 2, 2025","Wednesday, March 26, 2025"], numOfColumns : 5, primaryColor : '#1F68A5', secondaryColor : '#1FA548', bgColor : '#fffefe', itemWidthPer : 100 / 5, numPrevWeeks : 1, nextWeeksDate : '', curWeekDate : 'Wednesday, April 2, 2025', rowsPerPage: 1, curPage: 0, currentIndex: 0 }; function DmdNTW_b24ec0d61218473990f21c1bab4827d1() { var settings = DmdNTWSettings_b24ec0d61218473990f21c1bab4827d1; document.write('
'); for (var i = 0; i < settings.dates.length; i++) { if (settings.dates[i] == settings.curWeekDate) { DmdNTW_ChangeDate_b24ec0d61218473990f21c1bab4827d1(i); settings.currentIndex = i; } } } function DmdNTW_ChangeDate_b24ec0d61218473990f21c1bab4827d1(index) { var settings = DmdNTWSettings_b24ec0d61218473990f21c1bab4827d1; settings.currentIndex = index; settings.curPage = 0; document.getElementById("dmdNewReleasesWidget_b24ec0d61218473990f21c1bab4827d1").innerHTML = DmdNTW_SetDisplayMarkup_b24ec0d61218473990f21c1bab4827d1(settings.pageItems[index], settings.dates[index]); } function DmdNTW_NextPage_b24ec0d61218473990f21c1bab4827d1() { var settings = DmdNTWSettings_b24ec0d61218473990f21c1bab4827d1; settings.curPage += 1; document.getElementById("dmdNewReleasesWidget_b24ec0d61218473990f21c1bab4827d1").innerHTML = DmdNTW_SetDisplayMarkup_b24ec0d61218473990f21c1bab4827d1(settings.pageItems[settings.currentIndex], settings.dates[settings.currentIndex]); } function DmdNTW_PrevPage_b24ec0d61218473990f21c1bab4827d1() { var settings = DmdNTWSettings_b24ec0d61218473990f21c1bab4827d1; settings.curPage -= 1; document.getElementById("dmdNewReleasesWidget_b24ec0d61218473990f21c1bab4827d1").innerHTML = DmdNTW_SetDisplayMarkup_b24ec0d61218473990f21c1bab4827d1(settings.pageItems[settings.currentIndex], settings.dates[settings.currentIndex]); } function DmdNTW_SetDisplayMarkup_b24ec0d61218473990f21c1bab4827d1(collection, displayDate) { var settings = DmdNTWSettings_b24ec0d61218473990f21c1bab4827d1; 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_b24ec0d61218473990f21c1bab4827d1();