document.oncontextmenu=cmenu;
function cmenu() {
  return false;
}

// IE
if (document.all) {
  document.onkeydown=ie_kdown;
  document.onkeypress=ie_kpress;
  document.onmousedown=ie_mdown;
}
function ie_kdown() {
  if ((event.ctrlKey) || (event.shiftKey)) {
    return false;
  }
}
function ie_kpress() {
  if ((event.ctrlKey) || (event.shiftKey)) {
    return false;
  }
}
function ie_mdown() {
  if (event.button==2) {
    return false;
  }
}

// NN
if (document.layers) {
  document.captureEvents(Event.KEYDOWN,Event.KEYPRESS,Event.MOUSEDOWN);
  document.onkeydown=nn_kdown;
  document.onkeypress=nn_kpress;
  document.onmousedown=nn_mdown;
}
function nn_kdown(e) {
  //if ((event.modifiers==2) || (event.modifiers==4)) {
    return false;
  //}
}
function nn_kpress(e) {
  //if ((event.modifiers==2) || (event.modifiers==4)) {
    return false;
  //}
}
function nn_mdown(e) {
  if (e.which==3) {
    return false;
  }
}

// NN6
if (document.getElementById && !document.all) {
  document.captureEvents(Event.KEYDOWN,Event.KEYPRESS,Event.MOUSEDOWN);
  document.onkeydown=n6_kdown;
  document.onkeypress=n6_kpress;
  document.onmousedown=n6_mdown;
}
function n6_kdown(e) {
  //if ((event.modifiers==2) || (event.modifiers==4)) {
    return false;
  //}
}
function n6_kpress(e) {
  //if ((event.modifiers==2) || (event.modifiers==4)) {
    return false;
  //}
}
function n6_mdown(e) {
  if (e.which==3) {
    return false;
  }
}