// check lenght of char in input fields
//-------------------------------------------------------------------------------------------------------
function checkLength(obj, maxLength, formID) {
	if (!formID) formID = "maxChars";
	if(obj != null) {
	if(maxLength == null) maxLength = 200;

	strLength=obj.value.length;
	
	if(strLength==1 && obj.value.substring(0,1)=='') {
		obj.value='';
		strLength=0;
	}
	
	if(strLength > maxLength) {
		obj.value=obj.value.substring(0,maxLength);
		charsLeft=0;
	} else {
		charsLeft=maxLength-strLength;
	}

	document.getElementById(formID).value=charsLeft;
	}
}

// Neu in 2.0: Max. Zeichen in Eingabefeldern festlegen und ausgeben
function showMaxChars(text, maxLength, formID) {
	if (!formID) formID = "maxChars";
	if(maxLength == null) maxLength = 200;
	document.write('<table cellspacing="0" cellpadding="0"><tr><td><input type="text" class="text" value="'+maxLength+'" disabled="disabled" name="'+formID+'" id="'+formID+'" style="width: 3em;" /></td><td>'+text+'</td></tr></table>');
}
//-------------------------------------------------------------------------------------------------------