function norightclickforimages() {
  if ((event.button == 2) && (event.srcElement.tagName == 'IMG')) {
    alert('Right-click has been disabled.');
   }
}
document.onmousedown=norightclickforimages
