/*
	*****
	Progam-ID : OnEnter.js
	Author : Katia De Smet.
	Company : Touring (Since 01/02/2005).
	Date written : 15/06/2007
	Last modified : 18/06/2007 (By : Katia De Smet).

    Catches the event KEYPRESS (for browsers different from IE).
    This file should never be included, because it is included by default on every page (it is included in the SimpleLogin.asp file in the left menu).

    There should always be a function SubmitXXXOnEnter(oForm, strUserLang, theKeyCode) where XXX stands for the name of the asp file. 
    In this function following code should be written : 
        if (typeof(theKeyCode) == "undefined") theKeyCode = -1;
        if (theKeyCode == -1) theKeyCode = (typeof(window.event) != "undefined" ? theKeyCode = window.event.keyCode : -1);
        if (theKeyCode == 13) SubmitSimpleLogInForm(oForm, strUserLang);
    In case the keycode = 13, the submit of that particular form that you want to submit in case of ENTER should be called. 
    Why not simply do a submit of the form ? Because all the checks on the fields should be performed. 

    Add the onkeyup event on the last input field of the form. Only when on the last input field the enter button is hit, the form should be submitted. 
    Event to add : onkeyup="javascript:SubmitLoginOnEnter(document.frmMember,'<%=strUserLang%>',theKeyCode);"
    
    Examples :
        -   Login/SimpleLogin.asp
        -   Login/Login.asp
	*****
*/
	
theKeyCode = -1
if (typeof(event) == "undefined")
{
	document.captureEvents(Event.KEYPRESS);
	document.onkeypress = ClickNotIE;
} // end if

function ClickNotIE(e)
{
    theKeyCode = e.which;
	return;
} // end ClickNotIE()

