Event.observe(window, 'load', function () {
  var didImageLoad = function (img) {
    var complete = img.complete;

    if (typeof complete == 'undefined') {
      var test = new Image();
      test.src = img.src;
      complete = test.complete;
    }

    if (!complete || (complete && img.naturalWidth == 0))
      return false;

    return true;
  }

  $$('div.book_recommend div.book_recommend_img img').each(function (img) {
    if (!didImageLoad(img))
      img.src = "/images/missingbookimage.gif";
  });
});