function OnImageOff()
{
  dojo.style('bigimagegroup', 'display', 'none');
}

function OnImageClick(id, aImage)
{
  if (editNode && (editNode.id == id)) {
    return;
  }
  // todo: use dojo.position(node) of source for dojo.anim
  if (dojo.isIE) {
    // IE does not handle max-width, max-height correctly
    $('bigimage').height = dojo.style('bigimage', 'maxHeight');
  }
  $('bigimage').src = aImage;
  $('bigimage').onload = function() {
    if (dojo.isIE) {
      // IE does not handle max-width, max-height correctly
      if ($('bigimage').width > dojo.style('bigimage', 'maxWidth')) {
        $('bigimage').height = $('bigimage').height * dojo.style('bigimage', 'maxWidth') / $('bigimage').width;
      }
    }
    dojo.style('bigimagegroup', 'display', 'block');
  }
  $('bigimagegroup').onclick = OnImageOff;
}

