var isNetscape = false;
var isInternetExplorer = false;

function keyHandler_SetupFunction(inLink)
{
	isInternetExplorer = true;

	try
	{
		var testLink = document.anchors(inLink)
	}
	catch (err)
	{
		isNetscape = true;
		isInternetExplorer = false;
	}

// old
//	if( document.all )
//	{
//		isInternetExplorer = true;
//	}
//	else
//	{
//		if( document.layers )
//		{
//			isNetscape = true;
//		}
//	}

	document.onkeydown = keyHandler_ProcessFunction;
	if( isNetscape == true )
	{
		document.captureEvents(Event.keydown); 
	}
}

function keyHandler_ProcessFunction(e)
{
	var nKeyPressed = 0;
	var ieKeyPressed = 0;

	if( isNetscape == true )
	{
		nKeyPressed = e.which;
	}
	if( isInternetExplorer == true )
	{
		ieKeyPressed = event.keyCode;
	}

	if( ( nKeyPressed == nKeyToCheckFor ) || ( ieKeyPressed == ieKeyToCheckFor ) ) 
	{
		keyHandler_PressedFunction();
	}
}