function Enter13(e) { if(!e) e = window.event; if(13 == e.keyCode) this.submit(); }
String.prototype.trim = function() { return this.replace(/^\s*|\s*$/g,''); }
function chknum(e, exp) {
	if(!e) e = window.event;
	if(!exp) exp = '';
	if (!e.charCode && !window.event) return true;
	e = String.fromCharCode(e.charCode ? e.charCode : e.keyCode);
	return (e >= '0' && e <= '9')  || (-1 != exp.indexOf(e));
}
function chkdate(p, dl, y4) {
	if(!dl) dl = '/';
	ar=p.value.split(dl);
	for(i=0;i<ar.length;i++) {
		if(isNaN(ar[i])) break;
	}
	if(3 != i || (y4 ? ar[2] < 2000 : ar[2] > 99)) {
		alert("Datum soll in folgender Format sein: tt"+dl+"mm"+dl+(y4?"yyyy":"yy")+".");
		p.focus();
		return false;
	}
	return true;
}
function chkEmpty(p, fld) {
	p.value = p.value.trim();
	if("" == p.value) { alert("Geben Sie bitte "+fld+" ein."); p.focus(); return false; }
	return true;
}

