function BlockContextMenu()
{
   if (event.button==2||event.button==3)
   {
      oncontextmenu='return false';
   }
}

document.onmousedown=BlockContextMenu;
document.oncontextmenu = new Function("return false;")
