if (window.Event)
{
	document.captureEvents(Event.MOUSEUP);
}

if (document.layers)
{ 
	document.captureEvents(Event.MOUSEDOWN); 
} 

document.oncontextmenu = nocontextmenu; 
document.onmousedown = norightclick; 
document.onmouseup = norightclick;
document.onkeydown = noF5;


if (parseInt(navigator.appVersion)>3)
{
	document.onmousedown = mouseDown;
	if (navigator.appName=="Netscape")
		document.captureEvents(Event.MOUSEDOWN);
}

function noF5()
{
	var tecla=window.event.keyCode;
	var elm = event.srcElement;

	/* tecla F5 e ESC */
	if (tecla==116 || tecla==27 || tecla==44)
	{
		event.keyCode=0;
		event.returnValue=false;
	}

	
	/* tecla BACKSPACE */
	if (elm.type !="password" && elm.type !="text" && elm.type !="textarea" && event.keyCode == 8) 
	{ 
		event.keyCode=0;
		event.returnValue=false;
	} 

	/* tecla TAB */
	if (elm.type !="password" && elm.type !="text" && elm.type !="textarea" && event.keyCode == 9) 
	{ 
		//event.keyCode=0;
		//event.returnValue=false;
	} 
}

function nocontextmenu() 
{ 
	event.cancelBubble = true 
	event.returnValue = false; 
	return false; 
} 

function norightclick(e) 
{
	if (window.Event) 
	{ 
		if (e.which == 2 || e.which == 3) 
		return false;
	} 
	else 
		if (event.button == 2 || event.button == 3) 
		{ 
		event.cancelBubble = true 
		event.returnValue = false; 
		return false; 
		} 
} 

