/**************************Kurssuche Eingabe mindestens 3 Zeichen**********************/

NS4 = (document.layers) ? true : false;

function replaceWs (eingabe){
	while (eingabe.match (/\s/))
	{
		eingabe = eingabe.replace (' ', '');
	}
	return eingabe;
}

function checkEingabe(eingabe, event, pnr){
	if (NS4) {
        code = event.which;
    }else{
        code = event.keyCode;
	}
	if (code==13){   
	   	eingabe = replaceWs (eingabe); 	
		if (eingabe.length < 3){
			alert("Bitte geben Sie mindestens 3 Zeichen ein"); 
			document.frmInfoform.suchbegriff.value = '';
		}else{
			setAction (pnr);
		}
	}
}

function checkClickEingabe(eingabe, event, pnr, sessid, para, onr){				
		if (eingabe.length < 3)
			alert("Bitte geben Sie mindestens 3 Zeichen ein");
		else setAction (pnr);
}

/**************************Diverse allgemeingebraeuchliche Funktionen*****************************/

function setAction (action) { document.frmInfoform.action = action; document.frmInfoform.submit ();} 
function setTarget (target) { document.frmInfoform.target = target; } 
function setActionValue ( value ) { document.frmInfoform.op.value=value; } 
function deleteActionValue (control) { control.value=''; } 
function getActionValue (control) { return (control.value=='x');}

function openWindow (url){
	window.open (url,'','width=480px,height=400px,scrollbars=yes,resizable=yes,left=342px,top=180px');
}



