// keyhit.js //

/*

	In order for this to function properly,
	you must have the pNext and pPrev variables
	added after the js link in your pages.
	Like this (you can copy/paste from here):
	
<script language="JavaScript" src="/b2b/jscript/b2b_keyhit.js" type="text/JavaScript"></script>
<script language="javascript">
<!--
	// for use with the /b2b/jscript/b2b_keyhit.js file - specifies pages that load on arrow events.
	var pNext = "";			// Next
	var pPrev = "";			// Previous
-->
</script>

*/

document.onkeydown = keyhit;

var pNext = "";
var pPrev = "";

function keyhit(e) {
    if (document.layers)
        Key = e.which;
    else
        Key = window.event.keyCode;
	if (Key == 39)
		goNext(pNext);
	if (Key == 37)
		goPrev(pPrev);
}

function goNext(where) {
	window.location.href = where;
}

function goPrev(where) {
	window.location.href = where;
}