window.history.forward(1);

var message="Sorry, right-click has been disabled"; 
/////////////////////////////////// Functions
function clickIE() 
{
  if (document.all) 
  {
    (message);
    return false;
  }
} 

function clickNS(e) 
{
  if (document.layers||(document.getElementById&&!document.all)) 
  { 
    if (e.which==2||e.which==3) 
    {
      (message);
      return false;
    }
  }
} 

function cancelBack()
{
  if(window.event && window.event.keyCode == 116)
  { // Capture and remap F5
    window.event.keyCode = 505;
  }
  if(window.event && window.event.keyCode == 505)
  { // New action for F5
    return false;
    // Must return false or the browser will refresh anyway
  }  
  
  // 8 backspace, 37 left arrow, 39 right arrow, 116  F5, 122 F11, CTRL-N, CTRL-R
  if( (
         (window.event.keyCode == 8) 
      || (window.event.keyCode == 37 && window.event.altKey) 
      || (window.event.keyCode == 39 && window.event.altKey)
      )
  && (event.srcElement.form == null || event.srcElement.isTextEdit == false))
  {
    event.cancelBubble = true;
    event.returnValue = false;
    //alert('Backspace, Alt+leftarrow, or Alt+rightarrow called');
  }
  else if(
         (window.event.keyCode == 116 )
      || (window.event.keyCode == 122)
      || (window.event.ctrlKey && (window.event.keyCode == 78 || window.event.keyCode == 82)))
  {
    event.cancelBubble = true;
    event.returnValue = false;
    //alert('F5, F11, Ctrl+N, or Ctrl+R called');
  }      
}
/////////////////////////////////// Calls

if (document.layers) 
{
  document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
} 
else
{
  document.onmouseup=clickNS;document.oncontextmenu=clickIE;
} 

document.oncontextmenu=new Function("return false") 

document.onkeydown=cancelBack;