
// JavaScript for calling Maintenance
var K2 = "";
var K1 = 0;
function getKey(e) {
	if (document.all){
	    var evnt = window.event;
	    x=evnt.keyCode;
	}else{
	    x=e.keyCode;
	}

    K1 = x;
    if (K1 == 17) {
        K2 = "L";
    }
    else if (K1 == 13) {
    	LogInSubmit();
	}
    else{
        if (K2 == "L") {
            switch (K1) {
                case 76:
	            	var haendlerindex = window.top.location.href.indexOf('/Haendler/');
		         	var zielurl = '?dservice';
            		if (haendlerindex > 0)
            			zielurl = window.top.location.href.substr(haendlerindex, '/Haendler/A00000'.length) + zielurl;
            		window.top.location = zielurl;
            		break;
                //case 76: alert('Die Wartungs-Funktionen sind noch nicht aktiviert.'); break;
                case 13:
                	LogInSubmit();
                	break;
                default: K2 = ""; break;
            }
        }else{
            K2 = "";
        }   
    }
 
}
document.onkeydown = getKey;
