title: I want to enable right click on image only
body: <p>I am using code to block right click on my blog. It's work for may website and disable ctrl+v ctrl+c-right click f12 on my webpage. But I want to enable right click on image. I don't know how to do that.  But  Please Help me. </p>
  
  <pre><code>var isCtrl = false;
  document.onkeyup = function(e) {
    if (e.which == 17)
      isCtrl = false;
  }
  
  document.onkeydown = function(e) {
    if (e.which == 123)
      isCtrl = true;
  
    if (((e.which == 85) || (e.which == 65) || (e.which == 88) || (e.which == 67) || (e.which == 86) || (e.which == 2) || (e.which == 3) || (e.which == 123) || (e.which == 83)) &amp;&amp; isCtrl == true) {
      alert('This is Function Disabled');
      return false;
    }
  }
  
  // right click code
  var isNS = (navigator.appName == "Netscape") ? 1 : 0;
  if (navigator.appName == "Netscape")
    document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
  
  function mischandler() {
    alert('This is Function Disabled');
    return false;
  }
  
  function mousehandler(e) {
    var myevent = (isNS) ? e : event;
    var eventbutton = (isNS) ? myevent.which : myevent.button;
    if ((eventbutton == 2) || (eventbutton == 3)) return false;
  }
  
  document.oncontextmenu = mischandler;
  document.onmousedown = mousehandler;
  document.onmouseup = mousehandler;
  
  //select content code disable  alok goyal
  function killCopy(e) {
    return false
  }
  
  function reEnable() {
    return true
  }
  
  document.onselectstart = new Function("return false")
  if (window.sidebar) {
    document.onmousedown = killCopy
    document.onclick = reEnable
  }
  </code></pre>