/*	'Disable Rightclick JavaScript function', version 2.0.2
 *	(c) 2007-2008 compartment AB. All rights reserved.
 *	
 *	'Disable Rightclick JavaScript function' is NOT freely
 *	available and/or (re-)distributable. To purchase a license;
 *	contact compartment AB: 
 *		E-mail:	sales@compartment.se, 
 *		Phone:	+46 (0)8 724 83 10,
 *		Web:	http://www.compartment.se/
 *
 *	Contact compartment AB for licenseagreement &
 *	terms and conditions associated with any use of this
 *	and/or any other program owned by compartment AB.
 *
 *	In order to use this program you must first purchase a
 *	license from compartment AB.
 *
 *	Unauthorized use of this and/or any other program
 * 	owned by compartment AB is a violations of the terms
 *	and conditions and entitles compartment AB to 
 *	compensation. 
 *	Contact compartment AB for more/full information. 
/*------------------------------------------------------------*/
<!--

var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS) 
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
  if(EnableRightClick==1){ return true; }
  else {return false; }
}
function mousehandler(e){
  if(EnableRightClick==1){ return true; }
  var myevent = (isNS) ? e : event;
  var eventbutton = (isNS) ? myevent.which : myevent.button;
  if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
  var myevent = (isNS) ? e : window.event;
  if (myevent.keyCode==96)
    EnableRightClick = 1;
  return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
//-->

