/*
Created by : owenc/at/totalsales/dot/com
Date Created : 11/25/2005

Purpose : This is a cross browser keyboard input detector... You need to setup an array like such :

	var key = new Array();
	key['h'] = "http://urltogoto.com";
	
Then add in the keyboard listener to perform this function, like so :	
	
	document.onkeyup = KeyCheck;
	
This script will only react to input if not within another element such as a form, etc.
*/

function KeyCheck(e) {
	// Check for Netscape
	if ( document.layers ) {
		eventChooser = e.which;
	// Check for IE
	} else if ( window.event ) {
		eventChooser = event.keyCode;
	// Mozilla compatible
	} else {
		eventChooser = e.keyCode;
	}

	which = String.fromCharCode(eventChooser).toUpperCase();

	var evt  = (e) ? e : ((event) ? event : null);

	var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);

	if (! node.type )
		for (var i in key) 
			if (which == i.toUpperCase()) 
				window.location = key[i];			
}
