// Scriptlibrary zur Pflichtfelder- und Dateinamen-\u00DCberpr\u00FCfungvar bCheckFields=true;var bCheckFilename=true; var strBGColorInvalid="#FFAA99";		// k\u00F6nnen mit konfigurierten Werten \u00FCberschrieben werdenvar strBGColorValid="#FFFFFF";			// k\u00F6nnen mit konfigurierten Werten \u00FCberschrieben werdenvar strFileMessage="";//**********************************************// Variablen initialisieren//**********************************************function initFieldchecker() {	bCheckFields=true;} //**********************************************// R\u00FCckgabewert//**********************************************function areFieldsValid() {	return bCheckFields;}//**********************************************// F\u00FCr externe Pr\u00FCfungen//**********************************************// Optional:		strSpecialBGColorValidfunction setFieldValid(strIdField, strSpecialBGColorValid) {	var el = document.getElementById(strIdField);	if (el) {		if (strSpecialBGColorValid) {			el.style.backgroundColor=strSpecialBGColorValid;		} else {			el.style.backgroundColor=strBGColorValid;		}	}}function setFieldInvalid(strIdField) {	var el = document.getElementById(strIdField);	if (el) {		bCheckFields=false;		el.style.backgroundColor=strBGColorInvalid;	}}//**********************************************// Textfeld auf Inhalt pr\u00FCfen//**********************************************function checkText(strIdField, strIdDiv) {	// Optional: strIdDiv --> z.B. zum Pr\u00FCfen von Hidden Fields	// Ist Feld vorhanden?	if (document.getElementById(strIdField)) {		// Ist Feld gef\u00FCllt?		if (document.getElementById(strIdField).value=="") {			// Feld leer -> Meldung und einf\u00E4rben			bCheckFields = false;			if (strIdDiv) {				document.getElementById(strIdDiv).style.backgroundColor=strBGColorInvalid;			} else {				document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;			}			return false;		} else {			// Feld gef\u00FCllt -> etwaige vorige Einf\u00E4rbung entfernen			if (strIdDiv) {				document.getElementById(strIdDiv).style.backgroundColor=strBGColorValid;			} else {				document.getElementById(strIdField).style.backgroundColor=strBGColorValid;			}			return true;		}	}}//**********************************************// Textarea auf Inhalt pr\u00FCfen//**********************************************// Optional:		strSpecialBGColorValidfunction checkTextarea(strIdField, strIdDiv, strSpecialBGColorValid) {	// Ist Feld vorhanden?	if (document.getElementById(strIdField)) {		// Ist Feld gef\u00FCllt?		if (document.getElementById(strIdField).value=="") {			// Feld leer -> Meldung und einf\u00E4rben			bCheckFields = false;			document.getElementById(strIdDiv).style.backgroundColor=strBGColorInvalid;			return false;		} else {			// Feld gef\u00FCllt -> etwaige vorige Einf\u00E4rbung entfernen			if (strSpecialBGColorValid) {				document.getElementById(strIdDiv).style.backgroundColor=strSpecialBGColorValid;				return true;			} else {				document.getElementById(strIdDiv).style.backgroundColor=strBGColorValid;				return true;			}		}	}}//**************************************************// Zahlenfeld auf Inhalt pr\u00FCfen (ganze Zahlen)//**************************************************function checkNumber(strIdField, blnCheckEmpty) {	// Ist Feld vorhanden?	if (document.getElementById(strIdField)) {		// Ist Feld gef\u00FCllt?		if (document.getElementById(strIdField).value=="") {			// Feld leer -> Meldung und einf\u00E4rben			if (blnCheckEmpty) {				bCheckFields = false;				document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;				return false;			} else {				// Feld leer aber Feld muss nicht gef\u00FCllt sein -> etwaige vorige Einf\u00E4rbung entfernen				document.getElementById(strIdField).style.backgroundColor=strBGColorValid;				return true;			}		} else {			// Feld gef\u00FCllt -> Inhalt pr\u00FCfen			var blnOk = true;			var strNumber = document.getElementById(strIdField).value;			// Zahlen pr\u00FCfen			for(var i = 0; i <= strNumber.length -1; i++) {			 	// Bei Sonderzeichen R\u00FCckgabewert auf false setzen		 		if (strNumber.charCodeAt(i)<48 || strNumber.charCodeAt(i)>57) {		 			 blnOk = false;					 break;				}			}			if (blnOk == true) {				document.getElementById(strIdField).style.backgroundColor=strBGColorValid;				return true;			} else {				bCheckFields = false;				document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;				return false;			}		}	}}//**************************************************// Zahlenfeld auf korrekten Inhalt pr\u00FCfen (Ber\u00FCcksichtigung von Tausendertrennzeichen und Dezimaltrenner)//**************************************************function checkNumberExtended(strIdField, allowEmpty, strThousandsSeparator, allowDecimal, strDecimalSeparator, allowNegative) {	// Ist Feld vorhanden?	if (document.getElementById(strIdField)) {		// Ist Feld gef\u00FCllt?		if (document.getElementById(strIdField).value=="") {			// Feld leer -> Meldung und einf\u00E4rben			if (!allowEmpty) {				bCheckFields = false;				document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;				return false;			} else {				// Feld leer aber Feld muss nicht gef\u00FCllt sein -> etwaige vorige Einf\u00E4rbung entfernen				document.getElementById(strIdField).style.backgroundColor=strBGColorValid;				return true;			}		} else {			// Feld gef\u00FCllt -> Inhalt pr\u00FCfen			if (isNumeric(document.getElementById(strIdField).value, strThousandsSeparator, allowDecimal, strDecimalSeparator, allowNegative, allowEmpty)) {				document.getElementById(strIdField).style.backgroundColor=strBGColorValid;				return true;			} else {				bCheckFields = false;				document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;				return false;			}		}	}}// Trim Funktion ggf. hinzuf\u00FCgenif (typeof String.prototype.trim !== 'function') {  String.prototype.trim = function() {    return this.replace(/^\s+|\s+$/g, '');   }}// Stellt fest ob ein string numerisch (dezimalnumerisch) korrekt ist// default ist deutsches Nummernformat (tausender '.', dezimal ','), Ganzzahlen, Nicht-Negativfunction isNumeric(text, strThousandsSeparator, allowDecimal, strDecimalSeparator, allowNegative, allowEmpty) {	/********************* defaults ********************/	if (strThousandsSeparator == null) strThousandsSeparator = ".";	if (allowDecimal == null) allowDecimal = false;	if (strDecimalSeparator == null) strDecimalSeparator = ",";	if (allowNegative == null) allowNegative = false;	if (allowEmpty == null) allowEmpty = true;	/***************************************************/	numThousandsChar = strThousandsSeparator.charCodeAt(0);	numDecimalChar = strDecimalSeparator.charCodeAt(0);	text = text.trim();	if (text.length == 0) return allowEmpty;													// Wenn leer -> raus, je nach allowEmpty-Einstellung	var commaCount = 0;	for (var i = 0; i < text.length; i++) {		if ((text.charCodeAt(i) < 48 || text.charCodeAt(i) > 57)							// liegt nicht im ascii zahlen-bereich 		  && text.charCodeAt(i) != numDecimalChar   								 	// und ist kein dezimaltrenner		  && text.charCodeAt(i) != numThousandsChar) {								// und ist kein tausendertrenner		  	if (allowNegative) {																		// darf negativ sein? 		  		if (!(i == 0 && text.charCodeAt(i) == 45 && text.length > 1)) 		  			return false; 																		// ist nicht das erste zeichen und ein minus und nicht das einzige zeichen -> raus		  	}		  	else return false;																		// ansonsten sowieso -> raus		}		if (text.charCodeAt(i) == numDecimalChar) commaCount++;				// dezimaltrenner z\u00E4hlen		if (text.charCodeAt(i) == numThousandsChar) {			var tmp = text.split(String.fromCharCode(numDecimalChar))[0];		// trenne mal ersten teil bis dezimaltrenner ab			if ((tmp.length - i) % 4 != 0) return false;										// ist nicht sinnvoller 3er-Block von hinten -> raus		}	}	if (allowDecimal && commaCount == 1) {		if (text.split(strDecimalSeparator)[1].length == 0) return false;		// hinterm Dezimaltrenner nix mehr? -> raus	}	if (commaCount > (allowDecimal) ? 1 : 0) return false;							// darf dezimal sein - 1 dezimaltrenner erlaubt, wenn nicht - 0	return true;}//**********************************************// checkSelectBox auf Inhalt pr\u00FCfen//**********************************************function checkSelectBox(strIdField, blnCheckText) {	// Ist Feld vorhanden?	if (document.getElementById(strIdField)) {		// Ist Feld gef\u00FCllt?		if (document.getElementById(strIdField).selectedIndex == -1) {			// Feld leer -> Meldung und einf\u00E4rben			bCheckFields = false;			document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;			return false;		} else {			var strValue = "";			if (blnCheckText) {				strValue = document.getElementById(strIdField).options[document.getElementById(strIdField).selectedIndex].text;						} else {				strValue = document.getElementById(strIdField).options[document.getElementById(strIdField).selectedIndex].value;									}			if (strValue == "") {				// Feld leer -> Meldung und einf\u00E4rben				bCheckFields = false;				document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;				return false;			} else {							// Feld gef\u00FCllt -> etwaige vorige Einf\u00E4rbung entfernen				document.getElementById(strIdField).style.backgroundColor=strBGColorValid;				return true;			}		}	}}//**********************************************// Email / Passwort auf Inhalt \u00FCberpr\u00FCfen//**********************************************function IsEmailValid(strEmail) {	var myEMailIsValid = true;	var myAtSymbolAt = strEmail.indexOf('@');	var myLastDotAt = strEmail.lastIndexOf('.');	var mySpaceAt = strEmail.indexOf(' ');	var myLength = strEmail.length;	//@Symbol fehlt	if (myAtSymbolAt < 1 )  {myEMailIsValid = false}	//Punkt vor @Symbol	if (myLastDotAt < myAtSymbolAt)  {myEMailIsValid = false}	//mehr als 3 Zeichen hinter @Symbol fehlt	if (myLength - myLastDotAt <= 2) {myEMailIsValid = false}	//Leerzeichen vorhanden	if (mySpaceAt != -1)  {myEMailIsValid = false}	return myEMailIsValid;}function checkEMail(strIdField) {	// Ist Feld vorhanden?	if (document.getElementById(strIdField)) {		// Ist Email g\u00FCltig?		if (IsEmailValid(document.getElementById(strIdField).value)==false)  {			//Email ung\u00FCltig -> Fehler und einf\u00E4rben			bCheckFields=false;			document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;			return false;		} else {			// Email g\u00FCltig -> etwaige vorige Einf\u00E4rbung entfernen			document.getElementById(strIdField).style.backgroundColor=strBGColorValid;			return true;		}	}}function checkRepeat(strIdField1, strIdField2) {	// Sind beide Felder vorhanden?	if (document.getElementById(strIdField1) && document.getElementById(strIdField2)) {		if (document.getElementById(strIdField1).value == "" || document.getElementById(strIdField1).value != document.getElementById(strIdField2).value) {			bCheckFields=false;			document.getElementById(strIdField2).style.backgroundColor=strBGColorInvalid;			return false;		} else {			document.getElementById(strIdField2).style.backgroundColor=strBGColorValid;			return true;		}	}}function checkLength(strIdField, intLength) {	// Feld vorhanden?	if (document.getElementById(strIdField)) {		if (document.getElementById(strIdField).value.length < intLength) {			bCheckFields=false;			document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;			return false;		} else {			document.getElementById(strIdField).style.backgroundColor=strBGColorValid;			return true;		}	}}function checkMaxLength(strIdField, intLength) {	// Feld vorhanden?	if (document.getElementById(strIdField)) {		if (document.getElementById(strIdField).value.length > intLength) {			bCheckFields=false;			document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;			return false;		} else {			document.getElementById(strIdField).style.backgroundColor=strBGColorValid;			return true;		}	}}function checkPasswordQuality(strIdField, blnMustContainText, blnMustContainNumbers, blnMustContainCaseSensitiveText) {	// Feld vorhanden?	if (document.getElementById(strIdField)) {		var strText = document.getElementById(strIdField).value;		var blnOk = true;			var blnTextUpperCase = false;		var blnTextLowerCase = false;		var blnNumbers = false;		// Ermitteln was im Passwort enthalten ist		for (var i = 0; i <= strText.length -1; i++) { 			if (strText.charCodeAt(i)>=65 && strText.charCodeAt(i)<=90) blnTextUpperCase = true;			if (strText.charCodeAt(i)>=97 && strText.charCodeAt(i)<=122) blnTextLowerCase = true;			if (strText.charCodeAt(i)>=48 && strText.charCodeAt(i)<=57) blnNumbers = true;		}				// Auswerten zwischen Ist und Soll		if (blnMustContainText && !blnTextUpperCase && !blnTextLowerCase) blnOk = false;		if (blnMustContainNumbers && !blnNumbers) blnOk = false;		if (blnMustContainCaseSensitiveText && (!blnTextUpperCase || !blnTextLowerCase)) blnOk = false;		if (blnOk) {			document.getElementById(strIdField).style.backgroundColor=strBGColorValid;			return true;		} else {			bCheckFields=false;			document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;			return false;		}	}}//**********************************************// Radio und Checkboxen auf Inhalt pr\u00FCfen//**********************************************// Optional:		strSpecialBGColorValidfunction checkRadio(strNameField, strIdDiv, strSpecialBGColorValid) {	var n;	var elBox=document.getElementsByName(strNameField);			//Unterscheiden zwischen mehrfachen und einfachen Auswahloptionen	if (elBox.length > 0) {		//Alle Auswahloptionen auf Selektion \u00FCberpr\u00FCfen		for(n = 0; n < elBox.length; ++n) {			if (elBox[n].checked == true) {				//Eine Auswahl gefunden -> Feld gef\u00FCllt -> etwaige vorige Einf\u00E4rbung entfernen				if (strSpecialBGColorValid) {					document.getElementById(strIdDiv).style.backgroundColor=strSpecialBGColorValid;				} else {					document.getElementById(strIdDiv).style.backgroundColor=strBGColorValid;				}				return true;			}		}	} else {		// Feld vorhanden? - Funktioniert nicht!		if (elBox) {			//Nur eine Auswahl			if (elBox.checked == true) {				//Auswahl markiert -> Feld gef\u00FCllt -> etwaige vorige Einf\u00E4rbung entfernen				if (strSpecialBGColorValid) {					document.getElementById(strIdDiv).style.backgroundColor=strSpecialBGColorValid;				} else {					document.getElementById(strIdDiv).style.backgroundColor=strBGColorValid;				}				return true;			}		}	}	// Keine Selektion gefunden -> Feld leer -> Meldung und einf\u00E4rben	bCheckFields=false;	if (document.getElementById(strIdDiv)) {		document.getElementById(strIdDiv).style.backgroundColor=strBGColorInvalid;		return false;	}}//**********************************************// Dateinamen auf Inhalt \u00FCberpr\u00FCfen//**********************************************function validateFilename(strFilePathName) {	var strFileName="";	var bIsFileNameValid = true;	for(var i = 0; i <= strFilePathName.length -1; i++) {		strFileName = strFileName + strFilePathName.substr(i,1);	 	// Bei Sonderzeichen R\u00FCckgabewert auf false setzen 		if (!(	((strFilePathName.charCodeAt(i)>=65) && (strFilePathName.charCodeAt(i)<=90)) ||				((strFilePathName.charCodeAt(i)>=97) && (strFilePathName.charCodeAt(i)<=122)) ||				((strFilePathName.charCodeAt(i)>=48) && (strFilePathName.charCodeAt(i)<=57)) ||				(strFilePathName.charCodeAt(i)==45) || (strFilePathName.charCodeAt(i)==46) ||				(strFilePathName.charCodeAt(i)==95))) { 					 bIsFileNameValid = false;		}		// Wenn Slash oder Backslash gefunden wird wieder auf True setzen		if ((strFilePathName.charCodeAt(i)==47) || (strFilePathName.charCodeAt(i)==92)) {			strFileName = '';			bIsFileNameValid = true;	 	 }	}	return bIsFileNameValid}function checkFilename(strIdUpload, strIdField) {	if (document.getElementById(strIdUpload)) {		if (document.getElementById(strIdUpload).value!="") {			if (!validateFilename(document.getElementById(strIdUpload).value)) {					bCheckFields=false;					document.getElementById(strIdUpload).style.backgroundColor=strBGColorInvalid;					return false;			}			if (strIdField) {				document.getElementById(strIdField).value = document.getElementById(strIdUpload).value;			}		}		document.getElementById(strIdUpload).style.backgroundColor=strBGColorValid;	}	return true;	}function checkFiletype(strIdUpload, strFiletypesAllowed) {//	strFiletypesAllowed mit | getrennt z.B.:		gif|jpg|jpeg|png	if (strFiletypesAllowed!="") {		var arrFiletypes = strFiletypesAllowed.split("|");	} else {		alert("Filetypes not defined!");		return false;	}	if (document.getElementById(strIdUpload)) {		if (document.getElementById(strIdUpload).value!="") {			// Dateiendung ermitteln			var strFilepath = document.getElementById(strIdUpload).value;			var strType = "";		   	var posStart = strFilepath.lastIndexOf(".");			if (posStart >= 0) {		     	strType = strFilepath.substring(posStart + 1, strFilepath.length).toLowerCase();		    	}		    	// Pr\u00FCfen ob Endung in erlaubten Endungen enthalten			var blnFound = false;			for(var i = 0; i < arrFiletypes.length; i++) {				if (arrFiletypes[i] == strType) {					blnFound = true;					break;				}			}			if (!blnFound) {				bCheckFields=false;				document.getElementById(strIdUpload).style.backgroundColor=strBGColorInvalid;				return false;			} else {				document.getElementById(strIdUpload).style.backgroundColor=strBGColorValid;				return true;			}		}	}	return true;	}//**********************************************// Datumsfeld auf Inhalt pr\u00FCfen//**********************************************function checkDate(strIdField, strFormatType) {	// Ist Feld vorhanden?	if (document.getElementById(strIdField)) {		// Ist Feld gef\u00FCllt?		if (document.getElementById(strIdField).value=="") {			// Feld leer -> Meldung und einf\u00E4rben			bCheckFields = false;			document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;			return false;		} else {			// Feld gef\u00FCllt -> etwaige vorige Einf\u00E4rbung entfernen			if (isDateValid(document.getElementById(strIdField).value, strFormatType)) {				document.getElementById(strIdField).style.backgroundColor=strBGColorValid;				return true;			} else {				bCheckFields = false;				document.getElementById(strIdField).style.backgroundColor=strBGColorInvalid;				return false;			}		}	}}//***************************************************************// Pr\u00FCfen ob ein Datum g\u00FCltig ist//***************************************************************function isDateValid(strDateTime, intFormatType) {// Pr\u00FCft ob ein Datum g\u00FCltig ist und ob es das Datum auch gibt (29.Feb)// FormatType (optional)://	1 = dd.mm.yyyy (default)//	2 = dd.mm.yyyy hh:nn//	3 = dd.mm.yyyy hh:nn:ss//	4 = hh:nn//	5 = hh:nn:ss	if (strDateTime == "") return;	var blnOk = true;	var strDate = "";	var strTime = "";	var intTimeLen = 0;	if (!intFormatType) intFormatType = 1;			// strDate und strTime setzen	if (intFormatType == 1) {		strDate = strDateTime;	} else if (intFormatType == 2 | intFormatType == 3) {		var arrDateTime = strDateTime.split(" ");		if (arrDateTime.length !=2) {			blnOk = false;		} else {			strDate = arrDateTime[0];			strTime = arrDateTime[1];		}	} else if (intFormatType == 4 | intFormatType == 5) {		strTime = strDateTime;	}	// Zeit Anzahl Stellen	if (intFormatType == 2 | intFormatType == 4) intTimeLen = 2;	if (intFormatType == 3 | intFormatType == 5) intTimeLen = 3;			// Datum pr\u00FCfen	if (strDate != "") {		var arrDate = strDate.split(".");		if (arrDate.length !=3) {			// Datumswerte nicht im richtigen Format (mit 2 Punkten)			blnOk = false;		} else {			// Auf Zahlen pr\u00FCfen			if (!isInteger(arrDate[0])) blnOk = false;			if (!isInteger(arrDate[1])) blnOk = false;			if (!isInteger(arrDate[2])) blnOk = false;			// Tag pr\u00FCfen			if (Number(arrDate[0]) < 1 | Number(arrDate[0]) > 31) blnOk = false;			// Monat pr\u00FCfen			if (Number(arrDate[1]) < 1 | Number(arrDate[1]) > 12) blnOk = false;			// Jahr pr\u00FCfen			if (Number(arrDate[2]) < 1900 | Number(arrDate[2]) > 2100) blnOk = false;			// Datum pr\u00FCfen			if (blnOk) {				// Letzten Tag des Monats ermitteln				if (arrDate[1]!="12") {					intMonth = Number(arrDate[1]) + 1 - 1;		// Die New Date Funktion ben\u00F6tigt Monate 0-11					intYear = Number(arrDate[2]);				} else {					intMonth = 0;					intYear = Number(arrDate[2]) + 1;				}				var dateNext = new Date(String(intYear), String(intMonth), "01");				var dateMonthLastDay = new Date(dateNext.getTime() - 86400000);				// Datum pr\u00FCfen				if (Number(arrDate[0]) > dateMonthLastDay.getDate()) blnOk = false;			}		}	}		// Zeit pr\u00FCfen	if (strTime != "") {		var arrTime = strTime.split(":");		if (arrTime.length != intTimeLen) {			// Zeitwert nicht im richtigen Format (mit : getrennt)			blnOk = false;		} else {			// Auf Zahlen pr\u00FCfen			if (!isInteger(arrTime[0])) blnOk = false;			if (!isInteger(arrTime[1])) blnOk = false;			if (intTimeLen == 3) {				if (!isInteger(arrTime[2])) blnOk = false;			}			// Stunden pr\u00FCfen			if (Number(arrTime[0]) < 0 | Number(arrTime[0]) > 23) blnOk = false;			// Minuten pr\u00FCfen			if (Number(arrTime[1]) < 0 | Number(arrTime[1]) > 59) blnOk = false;			if (arrTime[1].length != 2) blnOk = false;			// Sekunden pr\u00FCfen			if (intTimeLen == 3) {				if (Number(arrTime[2]) < 0 | Number(arrTime[2]) > 59) blnOk = false;				if (arrTime[2].length != 2) blnOk = false;			}		}	}		if (blnOk) return true;}//***************************************************************// Pr\u00FCfen ob ein Enddatum gr\u00F6\u00DFer ist als ein Anfangsdatum//***************************************************************function isDateGreater(strDate1, strDate2, intFormatType) {// Pr\u00FCft ob strDate2 gr\u00F6\u00DFer als strDate1 ist// FormatType (optional)://	1 = dd.mm.yyyy (default)//	2 = dd.mm.yyyy hh:nn//	3 = dd.mm.yyyy hh:nn:ss//	4 = hh:nn//	5 = hh:nn:ss	var strDateTime1 = "";	var strDateTime2 = "";	if (!intFormatType) intFormatType = 1;	// strDateTime auf volles Format bringen	if (intFormatType == 1) {		strDateTime1 = strDate1 + " 00:00:00";						// Zeit anh\u00E4ngen		strDateTime2 = strDate2 + " 00:00:00";	} else if (intFormatType == 2) {		strDateTime1 = strDate1 + ":00";								// Sekunden anh\u00E4ngen		strDateTime2 = strDate2 + ":00";	} else if (intFormatType == 4) {		strDateTime1 = "01.01.2001 " + strDate1 + ":00";		// Datum voranstellen und Sekunden anh\u00E4ngen		strDateTime2 = "01.01.2001 " + strDate2 + ":00";	} else if (intFormatType == 5) {		strDateTime1 = "01.01.2001 " + strDate1;					// Datum voranstellen		strDateTime2 = "01.01.2001 " + strDate2;	}	var arrDateTime1 = strDateTime1.split(" ");	var arrDateTime2 = strDateTime2.split(" ");	var arrDate1 = arrDateTime1[0].split(".");	var arrDate2 = arrDateTime2[0].split(".");	var arrTime1 = arrDateTime1[1].split(":");	var arrTime2 = arrDateTime2[1].split(":");				var date1 = new Date(arrDate1[2], String(Number(arrDate1[1]) - 1), arrDate1[0], arrTime1[0], arrTime1[1], arrTime1[2]);	var date2 = new Date(arrDate2[2], String(Number(arrDate2[1]) - 1), arrDate2[0], arrTime2[0], arrTime2[1], arrTime2[2]);	if (date2.getTime() >= date1.getTime()) {		// Datum2 gr\u00F6\u00DFer oder gleich		return true;	} else {		// Datum2 kleiner		return false;	}}//***************************************************************// Hilfsfunktionen//***************************************************************function isInteger(s){	var i;    for (i = 0; i < s.length; i++){           var c = s.charAt(i);        if (((c < "0") || (c > "9"))) return false;    }    return true;}function getUploadFilename(strID) {	var pos;	var fileName = "";	if (document.getElementById(strID)) {		if (document.getElementById(strID).value != "") {			fileName = document.getElementById(strID).value;			if (fileName.indexOf("\\") != - 1) {				pos = fileName.lastIndexOf("\\");				fileName = fileName.substring(pos + 1, fileName.length);			}			else if (fileName.indexOf("/") != - 1) {				pos = fileName.lastIndexOf("/");				fileName = fileName.substring(pos + 1, fileName.length);			}			return fileName;					}	}	return "";}function setRadioValue(strName, intIndex) {	document.getElementsByName(strName)[intIndex].checked = true;}function setCheckboxValue(strName, intIndex) {	var elm = document.getElementsByName(strName);	if (elm) {		if (elm[intIndex].checked == true) {			elm[intIndex].checked = false;		} else {			elm[intIndex].checked = true;		}	}}//***************************************************************// Schreibt alle Formularfelder in einen Postdata String zusammen (f\u00FCr Ajax Post Methode)//***************************************************************function getFormValues(fobj, strMultipleValueSeparator, strOnlyFieldnameContainsText) {	var strReturn = ""; 	var arrDone = new Array();	for (var i = 0; i < fobj.elements.length; i++) {		if (fobj.elements[i].type == "button" | fobj.elements[i].id.indexOf("___") != -1) {				// Zu ignorierende Elemente				// --> Buttons				//---> Config Feld des FCKEditors (enth\u00E4lt 3 Underscores)		} else if (fobj.elements[i].name == "") {			alert("Element without name: id=" + fobj.elements[i].id + " / type=" + fobj.elements[i].type);			return;		// Falls Parameter gegeben --> Nehme nur Felder die im Feldnamen den gesuchten String enthalten		} else if ((!strOnlyFieldnameContainsText) | (strOnlyFieldnameContainsText && fobj.elements[i].name.indexOf(strOnlyFieldnameContainsText) != -1)) {							if (fobj.elements[i].type == "text" | fobj.elements[i].type == "textarea" | fobj.elements[i].type == "hidden" | fobj.elements[i].type == "password" | fobj.elements[i].type == "file") {				strReturn += fobj.elements[i].name + "=" + encodeURIComponent(fobj.elements[i].value) + "&";				} else if (fobj.elements[i].type == "select-one") {				strReturn += fobj.elements[i].name + "=" + encodeURIComponent(fobj.elements[i].options[fobj.elements[i].selectedIndex].value) + "&";			} else if (fobj.elements[i].type == "select-multiple") {				var strValues = "";				for (n = 0; n < fobj.elements[i].options.length; ++n) {					if (fobj.elements[i].options[n].selected == true) {						if (strValues!="") {strValues += strMultipleValueSeparator;}						strValues += encodeURIComponent(fobj.elements[i].options[n].value);					}				}				strReturn += fobj.elements[i].name + "=" + strValues + "&";			} else if (fobj.elements[i].type == "radio" | fobj.elements[i].type == "checkbox") {				var blnDone = false;						// Pr\u00FCfen ob bereits abgehandelt				for (var n = 0; n <= arrDone.length; n++) {					if (arrDone[n] == fobj.elements[i].name) {						blnDone = true;					}				}				if (blnDone == false) {					arrDone.push(fobj.elements[i].name);					var elBox = document.getElementsByName(fobj.elements[i].name);					var strValues = "";							// Unterscheiden zwischen mehrfachen und einfachen Auswahloptionen					if (elBox.length > 0) {						// Alle Auswahloptionen auf Selektion \u00FCberpr\u00FCfen						for (n = 0; n < elBox.length; ++n) {							if (elBox[n].checked == true) {								if (strValues!="") {strValues += strMultipleValueSeparator;}								strValues += encodeURIComponent(elBox[n].value);							}						}					} else {						// Nur eine Auswahl						if (elBox.checked == true) {							strValues += encodeURIComponent(elBox.value); 						}					}					strReturn += fobj.elements[i].name + "=" + strValues + "&";				}			} else {				alert("Undefined element type: name=" + fobj.elements[i].name + " / type=" + fobj.elements[i].type);				return;			}		}	// 	strOnlyFieldnameContainsText		}	strReturn = strReturn.substr(0, (strReturn.length - 1));	return strReturn;}//***************************************************************// Bef\u00FCllt Formularfelder aufgrund eines Postdata Strings//***************************************************************function setFormValues(fobj, strData, strMultipleValueSeparator) {	var arrData = strData.split("&");	var arrTemp;	var arrValues;	var arrElements;	var strTemp = "";	// Alle Parameter abklappern	for (var i = 0; i < arrData.length; i++) {		arrTemp = arrData[i].split("=");		arrValues = arrTemp[1].split(strMultipleValueSeparator);		arrElements = document.getElementsByName(arrTemp[0]);		if (arrElements) {			// Falls Elemente gefunden - Werte je nach Feldtyp des ersten Elements setzen			if (arrElements[0].type == "text" | arrElements[0].type == "textarea" | arrElements[0].type == "hidden" | arrElements[0].type == "password") {				arrElements[0].value = arrValues[0];			} else if (arrElements[0].type == "select-one" | arrElements[0].type == "select-multiple") {				for (n = 0; n < arrElements[0].options.length; n++) {					// Pr\u00FCfen ob aktuelle Option selected sein darf					var blnFound = false;					for (x = 0; x < arrValues.length; x++) {						if (arrValues[x] == arrElements[0].options[n].value) {							blnFound = true;							break;						}					}					if (blnFound) {						arrElements[0].options[n].selected = true;					} else {						arrElements[0].options[n].selected = false;					}				}			} else if (arrElements[0].type == "radio" | arrElements[0].type == "checkbox") {				for (n = 0; n < arrElements.length; n++) {					// Pr\u00FCfen ob aktuelle Option selected sein darf					var blnFound = false;					for (x = 0; x < arrValues.length; x++) {						if (arrValues[x] == arrElements[n].value) {							blnFound = true;							break;						}					}					if (blnFound) {						if (arrElements.length > 0) {							arrElements[n].checked = true;						} else {							arrElements.checked = true;						}					} else {						if (arrElements.length > 0) {							arrElements[n].checked = false;						} else {							arrElements.checked = false;						}					}				}			}		}	}}
