// 
// Astral Guard v2.00 (Jan 2003)
// by Astralys Solutions (http://www.astralys.com.sg), Copyright 2002-2003
//
// Copyright (c) 2002-2003, all rights reserved
// No part of this script may be copied, modified, used or distributed without
// prior knowledge or approval of Astralys Solutions.
//
// ---------------------------------------------------------------------------

// disable select
document.onselectstart  = new Function("return false;")
document.ondragstart  = new Function("return false;")

// event trap

if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) { 
	document.onmousedown=CaptureClick;
	document.captureEvents(Event.MOUSEDOWN);
}
if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=5) { 
	document.onmouseup=CaptureClick;
}
if (navigator.appName!="Netscape")
{
	document.onmousedown = CaptureClick;
	document.oncontextmenu = new Function("return false;")
}

function CaptureClick(e) {
	if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) { 
		if (e.which == 3) {
			return false;
		}
	}
	if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=5) { 
    		if (e.button == 2 || e.button == 3) {
      			e.preventDefault();
			return false;
  		}
	}
	var shiftPressed=0;
	if (navigator.appName=="Netscape")
	{}
//		shiftPressed=(e.modifiers-0>3);
	else
	{
		shiftPressed=event.shiftKey;
		if (event.button==2)
		{
			event.cancelBubble = true
			event.returnValue = false;
			return false;
		}
	}
		
	if (shiftPressed) {
		alert ('This function is disabled.')
		return false;
	}
	return true;
}
