if(typeof TOM==="undefined"){var TOM={VERSION:"0.1",NEWLINE:"\n",DEBUG:true,alert:function(sMessage){alert(sMessage);},createFunctionInfoObj:function(sFunctionName,vThisElement,sReturnType,sSourceFile,oError){var sCaller;try{sCaller=vThisElement.caller;}catch(e){sCaller="undefined";}var oFunctionInfo={FunctionName:sFunctionName,ThisElement:vThisElement,Caller:sCaller,ReturnType:sReturnType,SourceFile:sSourceFile};return oFunctionInfo;},createErrorInfoObj:function(cErrorLevel,cErrorType,cErrorCode,sMessage,sErrorID){var sCaller;var oErrorInfo={ErrorLevel:cErrorLevel,ErrorType:cErrorType,ErrorCode:cErrorCode,Message:sMessage,ErrorID:sErrorID};return oErrorInfo;},ERROR:{NEWLINE:"\n",LEVEL:{INFO:"[1] Information",WARNING:"[2] Warnung",ERROR:"[3] Fehler"},TYPE:{USERERROR:"UserError",CONTENTERROR:"ContentError",TYPEERROR:"TypeError",UNEXPECTEDERROR:"UnexpectedError"},MESSAGE:{STRINGNOTFOUND:"Zeichenkette wurde nicht gefunden",STRINGISEMPTY:"Die Zeichenkette ist leer",STRINGEXPECTED:"Zeichenketten erwartet",NUMBEREXPECTED:"Zahl erwarted",POSITIVENUMBEREXPECTED:"Zahl >= 0 erwarted",NEGATIVENUMBEREXPECTED:"Zahl < 0 erwarted",BOOLEANEXPECTED:"Wahr (true) oder Falsch (false) erwarted",OBJECTEXPECTED:"Object erwarted"},ERROROBJECT:function(sErrorMsg){this.msg=sErrorMsg;return this.msg;}},handleError:function(oFunctionInfo,oError){var sErrorMsg="";var e;for(e in oFunctionInfo){sErrorMsg+=e+"="+oFunctionInfo[e]+TOM.ERROR.NEWLINE;}for(e in oError){sErrorMsg+=e+"="+oError[e]+TOM.ERROR.NEWLINE;}},log:{init:function(){TOM.log.NEWLINE="\n";TOM.log.INDENT="\t";TOM.log.sShowInElementWithId="";TOM.log.text="TOM Log:"+TOM.log.NEWLINE;},add:function(sLogMessage){TOM.log.text+=((sLogMessage.substr(0,1)==="@")?"":TOM.log.INDENT)+sLogMessage+TOM.log.NEWLINE;},clear:function(){TOM.log.init();},show:function(){if(TOM.log.sShowInElementWithId===""){alert(TOM.log.text);}else{document.getElementById(TOM.log.sShowInElementWithId).innerHTML=TOM.log.text;}}}};}TOM.ajax={createXMLHttpReqObj:function(){var oXmlHttpReq=null;try{oXmlHttpReq=new ActiveXObject("Msxml2.XMLHTTP");return oXmlHttpReq;}catch(e){try{oXmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");return oXmlHttpReq;}catch(e){try{oXmlHttpReq=new XMLHttpRequest();return oXmlHttpReq;}catch(e){oXmlHttpReq=false;return oXmlHttpReq;}}}},request:function(sURL,fHandleRequest,sQueryString,sMethod){try{var oXmlHttpReq=this.createXMLHttpReqObj();var bComplete=false;if(!oXmlHttpReq){return false;}bComplete=false;if(typeof sQueryString==="undefined"){sQueryString="";}else{sQueryString+=((sURL.indexOf("?")>-1)?"":"?")+sQueryString;}if(typeof sMethod==="undefined"){sMethod="GET";}else{sMethod=sMethod.toUpperCase();}if(sMethod=="GET"){oXmlHttpReq.open(sMethod,sURL+sQueryString,true);sQueryString="";}else{oXmlHttpReq.open(sMethod,sURL,true);oXmlHttpReq.setRequestHeader("Method","POST "+sURL+" HTTP/1.1");oXmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}oXmlHttpReq.onreadystatechange=function(){if(oXmlHttpReq.readyState===4&!bComplete){bComplete=true;fHandleRequest(oXmlHttpReq);}};oXmlHttpReq.send(sQueryString);return true;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.middle",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return false;}}};TOM.ajax.get=function(sURL,fHandleRequest,sQueryString){return TOM.ajax.request(sURL,fHandleRequest,sQueryString,"GET");};TOM.ajax.post=function(sURL,fHandleRequest,sQueryString){return TOM.ajax.request(sURL,fHandleRequest,sQueryString,"POST");};String.prototype.contains=function(aReplacementList,bCaseSensitive){try{var sSource=this;var bMatch=false;bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?false:bCaseSensitive;if(bCaseSensitive===true){sSource=sSource.toLowerCase();}if(typeof aReplacementList==="object"){for(var i=0;i<aReplacementList.length;i++){if(typeof aReplacementList[i]==="string"){if(bCaseSensitive===true){aReplacementList[i]=aReplacementList[i].toLowerCase();}if(sSource.indexOf(aReplacementList[i])>-1){bMatch=true;}}}}else if(typeof aReplacementList==="string"){if(sSource.indexOf(aReplacementList)>=0){bMatch=true;}}return bMatch;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.contains",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return false;}};String.prototype.left=function(sStartMarker,bCaseSensitive,bSearchBackwards){try{var sSource=this;var sWorkingSource=sSource;var sReturn="";var iStartPos=-1;bSearchBackwards=(typeof bSearchBackwards==="undefined"||typeof bSearchBackwards!=="boolean")?false:bSearchBackwards;bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;if(typeof sStartMarker==="string"){if(sStartMarker===""){throw TOM.createErrorInfoObj(TOM.ERROR.LEVEL.ERROR,TOM.ERROR.TYPE.CONTENTERROR,TOM.ERROR.MESSAGE.STRINGISEMPTY,"","SPL_sStartMarkerEmpty");}if(!bCaseSensitive){sWorkingSource=sWorkingSource.toLowerCase();sStartMarker=sStartMarker.toLowerCase();}iStartPos=(bSearchBackwards)?sWorkingSource.lastIndexOf(sStartMarker):sWorkingSource.indexOf(sStartMarker);}else if(typeof sStartMarker==="number"){sStartMarker=(sStartMarker!==Math.ceil(sStartMarker))?Math.round(sStartMarker):sStartMarker;iStartPos=(sStartMarker<0)?sWorkingSource.length:((bSearchBackwards)?(sWorkingSource.length-sStartMarker):sStartMarker);if(iStartPos<0){throw TOM.createErrorInfoObj(TOM.ERROR.LEVEL.ERROR,TOM.ERROR.TYPE.CONTENTERROR,TOM.ERROR.MESSAGE.POSITIVENUMBEREXPECTED,"","SPL_sStartMarkerIsNegativ");}}else{throw TOM.createErrorInfoObj(TOM.ERROR.LEVEL.ERROR,TOM.ERROR.TYPE.CONTENTERROR,TOM.ERROR.MESSAGE.NUMBEREXPECTED+TOM.ERROR.NEWLINE+TOM.ERROR.MESSAGE.STRINGEXPECTED,"","SPL_sStartMarkerTypeError");}sReturn=sSource.substr(0,iStartPos);return sReturn;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.left",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return"";}};String.prototype.leftBack=function(sStartMarker,bCaseSensitive){try{bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;var sResult=this.left(sStartMarker,bCaseSensitive,true);return sResult;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.leftBack",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return"";}};String.prototype.right=function(sStartMarker,bCaseSensitive,bSearchBackwards){try{TOM.log.add("@Start debuging of 'String.prototype.right':");var sSource=this;var sWorkingSource=sSource;var sReturn="";var iStartPos=-1;bSearchBackwards=(typeof bSearchBackwards==="undefined"||typeof bSearchBackwards!=="boolean")?false:bSearchBackwards;bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;if(typeof sStartMarker==="string"){if(sStartMarker===""){throw{context:"Intercepted Error",name:"Parameter Error",type:"The first parameter must not be empty, please use a string with at least one character or a positiv integer instead!"};}if(!bCaseSensitive){sWorkingSource=sWorkingSource.toLowerCase();sStartMarker=sStartMarker.toLowerCase();}iStartPos=(bSearchBackwards)?sWorkingSource.lastIndexOf(sStartMarker):sWorkingSource.indexOf(sStartMarker);sReturn=(iStartPos<0)?"":sSource.substr(iStartPos+sStartMarker.length);}else if(typeof sStartMarker==="number"){sStartMarker=(sStartMarker!==Math.ceil(sStartMarker))?Math.round(sStartMarker):sStartMarker;sStartMarker=(sStartMarker>sWorkingSource.length)?sWorkingSource.length:sStartMarker;iStartPos=(sStartMarker<0)?((bSearchBackwards)?"":sWorkingSource.length):((bSearchBackwards)?(sStartMarker):(sWorkingSource.length-sStartMarker));if(iStartPos<0){throw("The value '"+iStartPos+"' is not allowed for the first parameter, please use only positiv integer values");}sReturn=sSource.substr(iStartPos);}else{throw{context:"Intercepted Error",name:"Parameter Error",type:"Wrong type for first parameter ("+(typeof sStartMarker)+"), please use string or number"};}TOM.log.add("@End debuging of 'String.prototype.right':");return sReturn;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.right",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return"";}};String.prototype.rightBack=function(sStartMarker,bCaseSensitive){try{bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;var sResult=this.right(sStartMarker,bCaseSensitive,true);return sResult;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.rightBack",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return"";}};String.prototype.middle=function(sStartMarker,sEndMarker,bCaseSensitive,bAllowPlaceholder,bEndMarkerRequired,bSearchBackwards){try{TOM.log.add("@Start debuging of 'String.prototype.middle':");var sSource=this;var sWorkingSource=sSource;var sWorkingRestSource="";var sReturn="";var iStartPos=-1;var iEndPos=-1;var iTempPos;var i;var aReplacementList=['*'];bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;bAllowPlaceholder=(typeof bAllowPlaceholder==="undefined"||typeof bAllowPlaceholder!=="boolean")?false:bAllowPlaceholder;bEndMarkerRequired=(typeof bEndMarkerRequired==="undefined"||typeof bEndMarkerRequired!=="boolean")?false:bEndMarkerRequired;bSearchBackwards=(typeof bSearchBackwards==="undefined"||typeof bSearchBackwards!=="boolean")?false:bSearchBackwards;if(!bCaseSensitive){sWorkingSource=sWorkingSource.toLowerCase();}if(typeof sStartMarker==="string"){if(sStartMarker===""){throw TOM.createErrorInfoObj(TOM.ERROR.LEVEL.ERROR,TOM.ERROR.TYPE.CONTENTERROR,TOM.ERROR.MESSAGE.STRINGISEMPTY,"Leere Zeichenkette nicht zul\u00EF\u00BF\u00BDssig f\u00EF\u00BF\u00BDr ersten Parameter!","FN00000236");}if(!bCaseSensitive){sStartMarker=sStartMarker.toLowerCase();}if(!bAllowPlaceholder||sStartMarker.contains(aReplacementList)===false){iStartPos=(bSearchBackwards)?sWorkingSource.lastIndexOf(sStartMarker):sWorkingSource.indexOf(sStartMarker);if(iStartPos===-1){sReturn="";}else if(!bSearchBackwards){iStartPos=iStartPos+sStartMarker.length;}}else{iTempPos=0;sWorkingRestSource=sWorkingSource;iStartPos=0;aStarChunks=sStartMarker.split("*");for(i=0;i<aStarChunks.length;i++){iTempPos=(i===0&&bSearchBackwards)?sWorkingRestSource.lastIndexOf(aStarChunks[i]):sWorkingRestSource.indexOf(aStarChunks[i]);if(iTempPos>-1){iStartPos+=iTempPos+aStarChunks[i].length;sWorkingRestSource=sWorkingRestSource.substr(iTempPos+aStarChunks[i].length);}else{i=aStarChunks.length+1;iStartPos=-1;sReturn="";}}}}else if(typeof sStartMarker==="number"){if(sStartMarker<0){throw{context:"Intercepted Error",name:"Parameter Error",type:"The value '"+iStartPos+"' is not allowed for the first parameter, please use only positiv integer values"};}sStartMarker=(sStartMarker!==Math.ceil(sStartMarker))?Math.round(sStartMarker):sStartMarker;iStartPos=(bSearchBackwards)?(sWorkingSource.length+1-sStartMarker):sStartMarker;if(iStartPos>sSource.length){iStartPos=sSource.length;}if(iStartPos<0){iStartPos=0;}}else{throw{context:"Intercepted Error",name:"Parameter Error",type:"Wrong type for first parameter ("+(typeof sStartMarker)+"), please use string or number"};}if(iStartPos!==-1){if(typeof sEndMarker==="undefined"){sReturn=bSearchBackwards?sSource.substr(0,iStartPos):sSource.substr(iStartPos);}else{if(typeof sEndMarker==="string"){TOM.log.add("sEndMarker is a string:"+sEndMarker);if(sEndMarker===""){throw{context:"Intercepted Error",name:"Parameter Error",type:"The second parameter must not be empty, please use a string with at least one character or a positiv or negativ integer instead!"};}if(bCaseSensitive===false){sEndMarker=sEndMarker.toLowerCase();}sWorkingRestSource=bSearchBackwards?sWorkingSource.substr(0,iStartPos):sWorkingSource.substr(iStartPos);if(bAllowPlaceholder===false||sEndMarker.contains(aReplacementList)===false){iEndPos=bSearchBackwards?(sWorkingRestSource.lastIndexOf(sEndMarker)):sWorkingRestSource.indexOf(sEndMarker);if(iEndPos!==-1&&bSearchBackwards){iEndPos+=sEndMarker.length;}iEndPos=(iEndPos===-1)?(bSearchBackwards?0:(-1)):(bSearchBackwards?iEndPos:(iStartPos+iEndPos));TOM.log.add("iEndPos="+iEndPos);}else{iTempPos=0;TOM.log.add("start placeholder search");iEndPos=-1;aStarChunks=sEndMarker.split("*");TOM.log.add("Start searching for marker with placeholder");for(i=0;i<aStarChunks.length;i++){iTempPos=(i===0&&bSearchBackwards)?sWorkingRestSource.lastIndexOf(aStarChunks[i]):sWorkingRestSource.indexOf(aStarChunks[i]);TOM.log.add("searched for '"+aStarChunks[i]+"' in '"+sWorkingRestSource+"', iTempPos:"+iTempPos);if(iTempPos>-1){if(i===0){iEndPos=iStartPos+iTempPos;}sWorkingRestSource=sWorkingRestSource.substr(iTempPos+aStarChunks[i].length);}else{TOM.log.add("sWorkingSource.indexOf("+aStarChunks[i]+") = -1");i=aStarChunks.length+1;iEndPos=-1;}}}TOM.log.add("iEndPos="+iEndPos);}else if(typeof sEndMarker==="number"){TOM.log.add("sEndMarker is a number:"+sEndMarker);sEndMarker=(sEndMarker!==Math.ceil(sEndMarker))?Math.round(sEndMarker):sEndMarker;if(sEndMarker===0){throw{context:"Intercepted Error",name:"Parameter Error",type:"The value '"+iEndPos+"' is not allowed for the second parameter, please use only positiv or negativ integer values or a string"};}if(sEndMarker<0){TOM.log.add("sEndMarker is negativ, sEndMarker="+sEndMarker);iTempPos=iStartPos;TOM.log.add("iTempPos = iStartPos = "+iTempPos);if(typeof sStartMarker==="string"&&!bSearchBackwards){iTempPos=iTempPos-sStartMarker.length;TOM.log.add("sStartMarker is a string, so substract the length: "+iTempPos);}TOM.log.add("iStartPos("+iStartPos+") + ("+sEndMarker+")sEndMarker");iStartPos=iTempPos+sEndMarker;if(iStartPos<0){TOM.log.add("iStartPos is smaller then 0:"+iStartPos+", iStartPos set to 0");iStartPos=0;}TOM.log.add("iStartPos after substraction="+iStartPos);iEndPos=iTempPos;}else{if(bSearchBackwards){if(typeof sStartMarker==="string"){iStartPos=iStartPos+sStartMarker.length;iEndPos=iStartPos+sEndMarker;}else{iEndPos=iStartPos+sEndMarker;}}else{iEndPos=iStartPos+sEndMarker;}}TOM.log.add("iEndPos="+iEndPos);}else{throw{context:"Intercepted Error",name:"Parameter Error",type:"Wrong type for second parameter ("+(typeof sEndMarker)+"), please use string or number"};}if(bSearchBackwards&&iStartPos>iEndPos){var iTempPos=iEndPos;iEndPos=iStartPos;iStartPos=iTempPos;}sReturn=(iEndPos===-1)?(bEndMarkerRequired?"":sSource.substr(iStartPos)):sSource.substring(iStartPos,iEndPos);}}TOM.log.add("@End debuging of 'String.prototype.middle'");return sReturn;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.middle",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return"";}};String.prototype.middleBack=function(sStartMarker,sEndMarker,bCaseSensitive,bAllowPlaceholder,bEndMarkerRequired){try{bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;bAllowPlaceholder=(typeof bAllowPlaceholder==="undefined"||typeof bAllowPlaceholder!=="boolean")?false:bAllowPlaceholder;bEndMarkerRequired=(typeof bEndMarkerRequired==="undefined"||typeof bEndMarkerRequired!=="boolean")?false:bEndMarkerRequired;bSearchBackwards=(typeof bSearchBackwards==="undefined"||typeof bSearchBackwards!=="boolean")?false:bSearchBackwards;var sReturn=this.middle(sStartMarker,sEndMarker,bCaseSensitive,bAllowPlaceholder,bEndMarkerRequired,true);return sReturn;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.middleBack",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return"";}};String.prototype.trim=function(){try{var sSource=this;while(sSource.substring(0,1)===' '){sSource=sSource.substring(1,sSource.length);}while(sSource.substring(sSource.length-1,sSource.length)===' '){sSource=sSource.substring(0,sSource.length-1);}return(sSource.replace(/\s+/g," "));}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.trim",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return""}};String.prototype.begins=function(sMarker,bCaseSensitive){try{var sContainer;if(bCaseSensitive==="undefined"){bCaseSensitive=false;}if(typeof sMarker!=="string"){return false;}if(bCaseSensitive===true){sContainer=this;}else{sContainer=this.toLowerCase();sMarker=sMarker.toLowerCase();}var nLength=sMarker.length;if(sMarker===sContainer.substring(0,nLength)){return true;}else{return false;}}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.begins",this,"String","TOM.js");return TOM.handleError(oFunctionInfo,oError);}};String.prototype.ends=function(sMarker,bCaseSensitive){try{var sContainer;if(bCaseSensitive==="undefined"){bCaseSensitive=false;}if(typeof sMarker!=="string"){return false;}if(bCaseSensitive===true){sContainer=this;}else{sContainer=this.toLowerCase();sMarker=sMarker.toLowerCase();}var nLength=sMarker.length;if(sMarker===sContainer.substring(sContainer.length-nLength,sContainer.length)){return true;}else{return false;}}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.begins",this,"String","TOM.js");return TOM.handleError(oFunctionInfo,oError);}};String.prototype.explode=function(sSeparators,bIncludeEmpties,bNewlineAsSeparator){try{var sContainer=this;aSeparators=[];aArray=[];var count=0;var nEmptyCount=1;if(bIncludeEmpties==="undefined"){bIncludeEmpties=false;}if(bNewlineAsSeparator==="undefined"){bNewlineAsSeparator=true;}if(typeof sSeparators!=="string"){return[];}if(sSeparators!==""){for(var ii=0;ii<sSeparators.length;ii++){aSeparators[count]=sSeparators.substring(ii,(ii+1));count++;}}else{aSeparators[0]=",";aSeparators[1]=";";}if(bNewlineAsSeparator===true){sContainer=sContainer.replace(/\n/g,aSeparators[0]);}else{sContainer=sContainer.replace(/\n/g," ");}count=0;for(var i=0;i<sContainer.length;i++){for(var j=0;j<aSeparators.length;j++){if(aSeparators[j]===sContainer.charAt(i)){if(sContainer.substring(0,i)!==""||bIncludeEmpties===true){for(var p=0;p<aSeparators.length;p++){if(sContainer.substring(i+1,i+2)===aSeparators[p]){nEmptyCount=2;}}aArray[count]=sContainer.substring(0,i);count++;if(nEmptyCount===2&&bIncludeEmpties===true){aArray[count]="";count++;}}sContainer=sContainer.substring(i+nEmptyCount,sContainer.length);i=-1;nEmptyCount=1;}}}aArray[count]=sContainer;return aArray;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.begins",this,"String","TOM.js");return TOM.handleError(oFunctionInfo,oError);}};Array.prototype.implode=function(seperator){seperator=seperator||",";if(typeof seperator==="string"){var result="";for(var i=0;i<this.length;i++){result+=this[i]+seperator;}result=result.substring(0,result.lastIndexOf(seperator));return result;}else{return null;}};Array.prototype.trim=function(){try{aArray=[];var count=0;for(var i=0;i<this.length;i++){if(typeof this[i]==="string"){if(this[i].trim()!==""){aArray[count]=this[i].trim();count++;}}else{aArray[count]=this[i];}}return aArray;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.begins",this,"String","TOM.js");return TOM.handleError(oFunctionInfo,oError);}};Array.prototype.begins=function(sMarker,bCaseSensitive){try{if(bCaseSensitive==="undefined"){bCaseSensitive=false;}if(typeof sMarker!=="string"){throw createErrorInfoObj(TOM.ERROR.LEVEL.ERROR,TOM.ERROR.TYPE.USERERROR,TOM.ERROR.MESSAGE.STRINGEXPECTED,"Eine Zeichenkette wurde erwartet","FN00000234");}if(bCaseSensitive===false){sMarker=sMarker.toLowerCase();}var nLength=sMarker.length;var sTmp;for(var i=0;i<this.length;i++){if(bCaseSensitive===false){sTmp=this[i].toLowerCase();}else{sTmp=this[i];}if(sMarker===sTmp.substring(0,nLength)){return true;}}return false;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.begins",this,"String","TOM.js");return TOM.handleError(oFunctionInfo,oError);}};Array.prototype.ends=function(sMarker,bCaseSensitive){try{if(bCaseSensitive==="undefined"){bCaseSensitive=false;}if(typeof sMarker!=="string"){throw createErrorInfoObj(TOM.ERROR.LEVEL.ERROR,TOM.ERROR.TYPE.USERERROR,TOM.ERROR.MESSAGE.STRINGEXPECTED,"Eine Zeichenkette wurde erwartet","FN00000234");}if(bCaseSensitive===false){sMarker=sMarker.toLowerCase();}var nLength=sMarker.length;var sTmp;for(var i=0;i<this.length;i++){if(bCaseSensitive===false){sTmp=this[i].toLowerCase();}else{sTmp=this[i];}if(sMarker===sTmp.substring(sTmp.length-nLength,sTmp.length)){return true;}}return false;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("String.prototype.begins",this,"String","TOM.js");return TOM.handleError(oFunctionInfo,oError);}};Array.prototype.replace=function(aFromList,aToList){var aSource=null;if(aFromList instanceof Array&&aToList instanceof Array){aSource=this;for(var i=0;i<aSource.length;i++){for(var j=0;j<aFromList.length;j++){if(aSource[i]===aFromList[j]){aSource[i]=aToList[j];}}}return aSource;}else if(typeof aFromList==="string"&&typeof aToList==="string"){aSource=this;for(var i=0;i<aSource.length;i++){for(var j=0;j<aFromList.length;j++){if(aSource[i]===aFromList){aSource[i]=aToList;}}}return aSource;}else{return aSource;}};Array.prototype.replaceSubstring=function(fromList,toList){if(typeof fromList==="string"&&typeof toList==="string"){var aSource=this;for(var i=0;i<aSource.length;i++){while(aSource[i].indexOf(fromList)>=0){aSource[i]=aSource[i].replace(fromList,toList);}}return aSource;}else{return null;}};Array.prototype.remove=function(element){if(typeof element==="number"){var aSource=this;var partOneOfNewArray=aSource.slice(0,element);var partTwoOfNewArray=aSource.slice(element);partTwoOfNewArray.shift();aSource=partOneOfNewArray.concat(partTwoOfNewArray);return aSource;}else{return this;}};Array.prototype.indexOf=function(element){for(var i=0;i<this.length;i++){if(this[i]==element){return i;}}return -1;};String.prototype.replaceSubstring=function(fromList,toList){if(typeof fromList==="string"&&typeof toList==="string"){var sSource=this;while(sSource.indexOf(fromList)>=0){sSource=sSource.replace(fromList,toList);}return sSource;}else{return null;}};TOM.XML={loadXMLFile:function(sFilename){var xmlDoc=null;if(document.implementation&&document.implementation.createDocument){xmlDoc=document.implementation.createDocument("","",null);}else if(window.ActiveXObject){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");}else{return xmlDoc;}if(sFilename&&xmlDoc){xmlDoc.load(sFilename);}return xmlDoc;},parseXML:function(sXMLData){var oXMLDoc=null;if(typeof sXMLData==="string"){if(!sXMLData){return null;}if(window.ActiveXObject){oXMLDoc=new ActiveXObject("Microsoft.XMLDOM");oXMLDoc.async=false;if(oXMLDoc){oXMLDoc.loadXML(sXMLData);}}else if(document.implementation.createDocument){var vParser=new DOMParser();if(vParser){oXMLDoc=vParser.parseFromString(sXMLData,"text/xml");}}}return oXMLDoc;}};