// opens the day selection jsp
function openSelection(form_element) {
    window.open("jsp/daySelect.jsp?call=document."+form_element.form.name+"."+form_element.name+"&p_pageid=182&p_id=1",'Kalender','width=230,height=240,left=50,top=50,resizable=1');
}

function checkEnter(e,form){ //e is event object passed from function invocation
	var characterCode; // literal character code will be stored in this variable
	if(e && e.which){ //if which property of event object is supported (NN4)
		characterCode = e.which; //character code is contained in NN4's which property
	} else {
		characterCode = e.keyCode; //character code is contained in IE's keyCode property
	}
	if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
		var formName=form.name;
		formName=formName.toUpperCase();
		formName=formName.charAt(0)+form.name.substring(1,form.name.length);
		if (eval("validate"+formName+"(form)")) {
			form.submit();
		} else {
			return false;
		}
	} else {
		return true;
	}
} 
