//------------------------------------------------------------------------------

var ie4   = (document.all)? true: false;
var isNS4 = (document.layers) ? true : false;
var isIE5 = (document.all && document.getElementById) ? true : false;
var isNS6 = (!document.all && document.getElementById) ? true : false;

callInit();

function callInit(){

	try {
		document.onkeydown		= disablekeyboardnavigation;

		if(isIE5){
			document.onmousedown = disablerightclick;
		} else {
			document.onclick	 = disablerightclick;
		}
		if (document.layers || (!document.all && document.getElementById)) {
			//alert('layers');
			window.captureEvents(Event.MOUSEDOWN);
			document.captureEvents(Event.KEYDOWN);
		}
	} catch (e0) {
		//alert('RS_01_eng[callInit] error occurred => '+e0.message);
	}
}
//-------------------------------------------------------------------------------------------------
function disablerightclick(e){
	var mouse_click	= "";

	try {
		if(window.event) {
			mouse_click	= event.button;		//IE
		} else {
			mouse_click	= e.which;			//firefox
		}
		//alert('navigator---'+navigator.appName+', mouse_click--'+mouse_click+', isIE5-'+isIE5);
		if (mouse_click == 2 || mouse_click == 3 || mouse_click == 4){
			if (isIE5 && mouse_click == 2 && (event.srcElement.tagName != "U")){
				alert("&copy; All Rights Reserved");
				return false;
			} else if(!isIE5 && mouse_click == 3 && (e.target.tagName != 'U')){
				alert("(C) All Rights Reserved - CapitalVia");
				e.preventDefault();
				e.stopPropagation();
				return false;
			}
		}
	} catch (e1) {
		//alert('disable[disablerightclick] error occurred => '+e.message);
		mouse_click = "";
	}	
	return true;
}
//-------------------------------------------------------------------------------------------------
function disablekeyboardnavigation(e)
{
	var input_key	= "";

	try	{
		if(window.event) {
			input_key	= event.keyCode;	//IE
		} else {
			input_key	= e.which;			//firefox
		}
		//alert('navigator---'+navigator.appName+', input_key--'+input_key);

		if (input_key == 8) //Back
		{ 
			if (isIE5 && event.srcElement.tagName != "INPUT" && event.srcElement.tagName != "TEXTAREA"){
				//alert('keyboard-Back...not allowed..'+event.srcElement.tagName);  
				alert('This operation is not allowed');
				return false; 
			}
			if (!isIE5 && e.target.tagName != 'INPUT' && e.target.tagName != 'TEXTAREA'){
				//alert('keyboard-Back...not allowed..'+e.target.tagName);  
				alert('This operation is not allowed');
				return false; 
			}
		}
		if((input_key == 36 || input_key == 37 || input_key == 39) && input_key == 18) //Alt + Home, Ltarrw, RtArrw
		{
			//alert('RS_01_eng[disablerightclick]...Alt + LtAr/RtAr/Hm-'+input_key);	//not working
			alert('This operation is not allowed');
			return false;
		}
		if (input_key == 27) //Esc button
		{
			//alert("keyboard-Esc...not allowed - "+input_key);  
			alert('This operation is not allowed');
			return false;
		}
		if (event.keyCode == 116 || event.keyCode == 121 || event.keyCode == 122)	//F5, F10, F11
		{
			if (isIE5){
				event.keyCode = 0;
			} else {
				e.preventDefault();
				e.stopPropagation();
			}
			//alert('RS_01_eng[disablerightclick]...F5/F10/F11-'+input_key);
			alert('This operation is not allowed');
			return false;
		}
		
	} catch (e2) {
		//alert('RS_01_eng[disablerightclick] error occurred => '+e.message);
		input_key = "";
	}	
	return true;
}
//------------------------------------------------------------------------------------------------- 

/******************************************************************************
**
**	End of file
**
*****************************************************************************/
