var DmdNTWSettings_722ab84abcf2484881abb32045b52042 = { pageItems : [[{"DiamdNo":"JAN180561","StockNo":"STL070981","Title":"A STRANGE \u0026 BEAUTIFUL SOUND HC","Publisher":"IDW PUBLISHING","IsAllowed":true,"IsCustom":false,"Category":"3 "},{"DiamdNo":"JAN180380","StockNo":"STL075486","Title":"DARK NIGHTS: METAL?THE NIGHTMARE BATMEN HC","Publisher":"DC COMICS","IsAllowed":true,"IsCustom":false,"Category":"3 "},{"DiamdNo":"NOV170397","StockNo":"STL055667","Title":"DC ARTISTS ALLEY BATMAN BY CHRIS UMINGA VINYL FIG","Publisher":"DC COMICS","IsAllowed":true,"IsCustom":false,"Category":"10 "},{"DiamdNo":"DEC170068","StockNo":"STL070352","Title":"LEGEND OF ZELDA ENCYCLOPEDIA HC","Publisher":"DARK HORSE COMICS","IsAllowed":true,"IsCustom":false,"Category":"4 "},{"DiamdNo":"FEB181073","StockNo":"STL077083","Title":"STARGATE UNIVERSE #5","Publisher":"AMERICAN MYTHOLOGY PRODUCTIONS","IsAllowed":true,"IsCustom":false,"Category":"1 "},{"DiamdNo":"FEB180056","StockNo":"STL077548","Title":"STEPHEN MCCRANIES SPACE BOY TP VOL 01","Publisher":"DARK HORSE COMICS","IsAllowed":true,"IsCustom":false,"Category":"3 "}],[{"DiamdNo":"DEC172739","StockNo":"STK649684","Title":"BREAKING BAD TITANS MINI-FIGURES","Publisher":"TITAN BOOKS UK","IsAllowed":true,"IsCustom":false,"Category":"10 "},{"DiamdNo":"FEB180480","StockNo":"STL070977","Title":"CLOUD HOTEL TP","Publisher":"IDW - TOP SHELF","IsAllowed":true,"IsCustom":false,"Category":"3 "},{"DiamdNo":"JAN181932","StockNo":"STL083511","Title":"RIVERS OF LONDON CRY FOX TP","Publisher":"TITAN COMICS","IsAllowed":true,"IsCustom":false,"Category":"3 "},{"DiamdNo":"DEC170511","StockNo":"STL072509","Title":"TANGLED #2","Publisher":"IDW PUBLISHING","IsAllowed":true,"IsCustom":false,"Category":"1 "}]], dates : ["Wednesday, June 20, 2018","Wednesday, June 13, 2018"], numOfColumns : 4, primaryColor : '#000000', secondaryColor : '#ffffff', bgColor : '#92d0bb', itemWidthPer : 100 / 4, numPrevWeeks : 1, nextWeeksDate : '', curWeekDate : 'Wednesday, June 20, 2018', rowsPerPage: 0, curPage: 0, currentIndex: 0 }; function DmdNTW_722ab84abcf2484881abb32045b52042() { var settings = DmdNTWSettings_722ab84abcf2484881abb32045b52042; document.write('
'); for (var i = 0; i < settings.dates.length; i++) { if (settings.dates[i] == settings.curWeekDate) { DmdNTW_ChangeDate_722ab84abcf2484881abb32045b52042(i); settings.currentIndex = i; } } } function DmdNTW_ChangeDate_722ab84abcf2484881abb32045b52042(index) { var settings = DmdNTWSettings_722ab84abcf2484881abb32045b52042; settings.currentIndex = index; settings.curPage = 0; document.getElementById("dmdNewReleasesWidget_722ab84abcf2484881abb32045b52042").innerHTML = DmdNTW_SetDisplayMarkup_722ab84abcf2484881abb32045b52042(settings.pageItems[index], settings.dates[index]); } function DmdNTW_NextPage_722ab84abcf2484881abb32045b52042() { var settings = DmdNTWSettings_722ab84abcf2484881abb32045b52042; settings.curPage += 1; document.getElementById("dmdNewReleasesWidget_722ab84abcf2484881abb32045b52042").innerHTML = DmdNTW_SetDisplayMarkup_722ab84abcf2484881abb32045b52042(settings.pageItems[settings.currentIndex], settings.dates[settings.currentIndex]); } function DmdNTW_PrevPage_722ab84abcf2484881abb32045b52042() { var settings = DmdNTWSettings_722ab84abcf2484881abb32045b52042; settings.curPage -= 1; document.getElementById("dmdNewReleasesWidget_722ab84abcf2484881abb32045b52042").innerHTML = DmdNTW_SetDisplayMarkup_722ab84abcf2484881abb32045b52042(settings.pageItems[settings.currentIndex], settings.dates[settings.currentIndex]); } function DmdNTW_SetDisplayMarkup_722ab84abcf2484881abb32045b52042(collection, displayDate) { var settings = DmdNTWSettings_722ab84abcf2484881abb32045b52042; 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_722ab84abcf2484881abb32045b52042();