/******************************************************************

Copyright © Global Knowledge Software LLC 2006.  All Rights Reserved.

This program is protected by U.S. and International Copyright and
Patent Laws.  Unauthorized duplication and/or distribution of this
program is strictly prohibited. Distribution and duplication of this
program are limited by license. If you do not currently have a valid
license from Global Knowledge for this program, any copying or
distribution of the program is unauthorized.  If you do have a current
license from Global Knowledge to utilize this program, your use is
strictly limited by the terms of that license.

Patent Pending.

******************************************************************/

function EventKeyDown(event)
{
	var code = event.keyCode;
	if (code==114 || code==116 || code==122)		// F1, F3, F5 and F11 keys
	{
		event.keyCode=0;
		return false;
	}
	return true;
}

function EventNull(event)
{
	return false;
}

function attach_event_handlers(wnd)
{
	if (wnd.document.body)
	{
		wnd.document.body.attachEvent("onkeydown", EventKeyDown);
		wnd.document.body.attachEvent("oncontextmenu", EventNull);
		wnd.document.body.attachEvent("onhelp", EventNull);
	}
	if (wnd.frames)
	{
		for (var f=0; f<wnd.frames.length; f++)
			attach_event_handlers(wnd.frames[f]);
	}
}

function SetNoEvents()
{
	attach_event_handlers(window);
}
