  function onResize() {
   var intWidth = document.body.clientWidth;
   var intDealCount = 2

   if (intDealCount = 1) {
    showHideDeals(1, "auto");
   }

   if (intDealCount = 2) {
    if (intWidth <= 1225) {
     showHideDeals(1, "auto");
    }
    if (intWidth > 1225) {
     showHideDeals(2, "50%");
    }
   }

   if (intDealCount = 3) {
    if (intWidth <= 1225) {
     showHideDeals(1, "auto");
    }
    if (intWidth > 1225 && intWidth <= 1575) {
     showHideDeals(2, "50%");
    }
    if (intWidth > 1575) {
     showHideDeals(3, "34%");
    }
   }

   if (intDealCount = 4) {
    if (intWidth <= 1225) {
     showHideDeals(1, "auto");
    }
    if (intWidth > 1225 && intWidth <= 1575) {
     showHideDeals(2, "50%");
    }
    if (intWidth > 1575 && intWidth <= 1825) {
     showHideDeals(3, "34%");
    }
    if (intWidth > 1825) {
     showHideDeals(4, "25%");
    }
   }
  }

  function showHideDeals(intDeals, strWidth) {
   for (var i = 1; i <= 2; i++) {
    var e = document.getElementById("dealHolster" + i);

    if (i <= intDeals) {
     e.style.display = "";
     e.style.width = strWidth;
    }
    else {
     e.style.display = "none";
     e.style.width = strWidth;
    }
   }
  }

  onResize();
  window.onresize = onResize;