var IE = (document.all)    ? 1 : 0;
var NS = (!IE);

var submitted=0;

function CheckKey(e) {

    thekey = (NS) ? e.which : window.event.keyCode;
    m =  (NS) ? e.modifiers : window.event.shiftKey;

    if(!(!m && (thekey==13 || thekey==8 || thekey==37 || thekey==39 || thekey==46 || (thekey>=48 && thekey<=57) || (thekey>=96 && thekey<=105)))) {
        if (NS) {
            // e.which=0;
        } else {
            window.event.keyCode=0;
            window.event.returnValue = false;
        }
        return false;
    } else {
        return true;
    }
}
