image
function windowFunction(event) { console.log('window function'); }
function imageFunction(event)  { console.log('image function'); }

window.addEventListener('DOMContentLoaded', function()
{
   var stopPropagationFlag = false;

   function processClick1(event)
   {
      if (event.target.nodeName !== 'IMG')
         return true;

      event.preventDefault();
      event.stopPropagation();
   // WtF?!? isn't event.stopPropagation() supposed to handle this?
      stopPropagationFlag = true;

      imageFunction(event);
   };
   window.addEventListener('click', processClick1, false);

   function processClick2(event)
   {
      if (stopPropagationFlag === true)
      {
         stopPropagationFlag = false;
         return;
      }
      windowFunction(event);
   };
   window.addEventListener('click', processClick2, false);
}, false);