if(typeof TOM==="undefined"){var TOM={VERSION:"0.2dev",NEWLINE:"\n",DEBUG:true,alert:function(sMessage){alert(sMessage);},createFunctionInfoObj:function(sFunctionName,vThisElement,sReturnType,sSourceFile){TOM.ei(sFunctionName,vThisElement,sReturnType,sSourceFile);},ei:function(sFunctionName,vThisElement,sReturnType,sSourceFile){var sCaller;try{sCaller=vThisElement.caller;}catch(e){sCaller="undefined";}sReturnType=(typeof sReturnType=="undefined")?"undefined":sReturnType;sSourceFile=(typeof sSourceFile=="undefined")?"undefined":sSourceFile;var oFunctionInfo={};with(oFunctionInfo){FunctionName=sFunctionName;ThisElement=vThisElement;Caller=sCaller;ReturnType=sReturnType;SourceFile=sSourceFile;}return oFunctionInfo;},createErrorInfoObj:function(cErrorLevel,cErrorType,cErrorCode,sMessage,sErrorID){var sCaller;var oErrorInfo={};with(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){TOM.ee(oFunctionInfo,oError);},ee: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;}if(TOM.DEBUG){TOM.alert("An Error occured! Detailed error description:"+TOM.ERROR.NEWLINE+sErrorMsg);}},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=function(fHandleRequest,fHandleError,fHandleReadyState){this.createXMLHttpReqObj=function(){var oXmlHttpReq=null;try{oXmlHttpReq=new ActiveXObject("Msxml2.XMLHTTP");return oXmlHttpReq;}catch(e){try{if(typeof ActiveXObject!="undefined"){oXmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");return oXmlHttpReq;}else{if(typeof XMLHttpRequest!="undefined"){oXmlHttpReq=new XMLHttpRequest();return oXmlHttpReq;}else{return false;}}}catch(e){try{oXmlHttpReq=new XMLHttpRequest();return oXmlHttpReq;}catch(e){oXmlHttpReq=false;return oXmlHttpReq;}}}};this.request=function(sURL,sMethod,vData){try{oSource.httpReq=oSource.createXMLHttpReqObj();oSource.url=sURL;oSource.timer();oSource.active=true;if(!oSource.httpReq||sURL===""||typeof sURL!="string"){return false;}if(typeof sMethod==="undefined"){sMethod="GET";}else{sMethod=sMethod.toUpperCase();}if(typeof vData==="undefined"){vData=null;}if(sMethod=="POST"){oSource.httpReq.open(sMethod,sURL,true);if(typeof vData==="string"){oSource.httpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");oSource.httpReq.setRequestHeader("Method","POST "+sURL+" HTTP/1.1");}else{oSource.httpReq.setRequestHeader("Content-Type","text/xml");}}else{oSource.httpReq.open(sMethod,sURL,true);}oSource.httpReq.onreadystatechange=function(){try{if(oSource.httpReq.readyState==4&&oSource.active){window.clearTimeout(oSource.timeout);if(oSource.httpReq.status==200){oSource.text=oSource.httpReq.responseText;oSource.xml=oSource.httpReq.responseXML;if(oSource.returnMiddle){oSource.middleText=oSource.text.middle(oSource.startMarker,oSource.endMarker,true);oSource.handleRequest(oSource.middleText);}else{oSource.handleRequest(oSource.httpReq);}oSource.active=false;}else{oSource.handleError(oSource.url,oSource.httpReq.status);return false;}}else{oSource.active=true;oSource.handleReadyState(oSource.httpReq.readyState);}}catch(oError){var failsilent=oError;}};oSource.httpReq.send(vData);return true;}catch(e){TOM.ee(TOM.ei("TOM.ajax.request",this),e);return false;}};this.get=function(sURL){try{oSource.abort();var ret=oSource.request(sURL,"GET");return ret;}catch(e){TOM.ee(TOM.ei("TOM.ajax.get",this),e);return false;}};this.middle=function(sURL,sStartMarker,sEndMarker){try{oSource.abort();oSource.returnMiddle=true;oSource.startMarker=sStartMarker;oSource.endMarker=sEndMarker;var ret=oSource.request(sURL,"GET");return ret;}catch(e){TOM.ee(TOM.ei("TOM.ajax.middle",this),e);return false;}};this.post=function(sURL,vData){try{oSource.abort();var ret=oSource.request(sURL,"POST",vData);return ret;}catch(e){TOM.ee(TOM.ei("TOM.ajax.post",this),e);return false;}};this.abort=function(){if(oSource.active){oSource.active=false;oSource.httpReq.abort();oSource.httpReq=null;}};try{if(typeof fHandleRequest!="undefined"){this.handleRequest=fHandleRequest;}else{this.handleRequest=function(){};}if(typeof fHandleError!="undefined"){this.handleError=fHandleError;}else{this.handleError=function(){};}if(typeof fHandleReadyState!="undefined"){this.handleReadyState=fHandleReadyState;}else{this.handleReadyState=function(){};}this.period=10000;this.text="";this.middleText="";this.xml="";this.url="";this.timer=function(){oSource.timeout=window.setTimeout(function(){oSource.httpReq.abort();oSource.handleError(503);},oSource.period)};this.timeout=null;this.active=false;this.returnMiddle=false;this.startMarker="";this.endMarker="";var oSource=this;}catch(e){TOM.ee(TOM.ei("TOM.ajax",this),e);return false;}};String.prototype.contains=function(aReplacementList,bCaseSensitive){try{var sSource=this;var bMatch=false;bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;if(bCaseSensitive===false){sSource=sSource.toLowerCase();}if(typeof aReplacementList==="object"&&isArray(aReplacementList)){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(e){TOM.ee(TOM.ei("String.prototype.contains",this),e);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(e){TOM.ee(TOM.ei("String.prototype.left",this),e);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(e){TOM.ee(TOM.ei("String.prototype.leftBack",this),e);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(e){TOM.ee(TOM.ei("String.prototype.right",this),e);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(e){TOM.ee(TOM.ei("String.prototype.rightBack",this),e);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\uFFFDssig f\uFFFDr 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(e){TOM.ee(TOM.ei("String.prototype.middle",this),e);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(e){TOM.ee(TOM.ei("String.prototype.middleBack",this),e);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(e){TOM.ee(TOM.ei("String.prototype.trim",this),e);return"";}};String.prototype.begins=function(sMarker,bCaseSensitive){try{var sSource;if(typeof bCaseSensitive==="undefined"){bCaseSensitive=true;}if(typeof sMarker!=="string"){return false;}if(bCaseSensitive){sSource=this;}else{sSource=this.toLowerCase();sMarker=sMarker.toLowerCase();testCS=0;}var nLength=sMarker.length;if(sMarker===sSource.substr(0,nLength)){return true;}else{return false;}}catch(e){TOM.ee(TOM.ei("String.prototype.begins",this),e);return false;}};String.prototype.ends=function(sMarker,bCaseSensitive){try{var sContainer;if(typeof bCaseSensitive==="undefined"){bCaseSensitive=true;}if(typeof sMarker!=="string"){return false;}if(bCaseSensitive===true){sSource=this;}else{sSource=this.toLowerCase();sMarker=sMarker.toLowerCase();}var nLength=sMarker.length;if(sMarker===sSource.substring(sSource.length-nLength,sSource.length)){return true;}else{return false;}}catch(e){TOM.ee(TOM.ei("String.prototype.ends",this),e);return false;}};String.prototype.explode=function(sSeparators,bIncludeEmpties,bNewlineAsSeparator){try{var sSource=this;var aSeparators=[];var defaultSeparators=[" ",",",";"];var aArray=[];var count=0;var nEmptyCount=1;if(!sSource||sSource===""||sSource.length===0){return aArray;}if(bIncludeEmpties!==true){bIncludeEmpties=false;}if(bNewlineAsSeparator!==false){bNewlineAsSeparator=true;}if(typeof sSeparators!=="string"||sSeparators==""||sSeparators==null){aSeparators=defaultSeparators;}else{for(var ii=0;ii<sSeparators.length;ii++){aSeparators[ii]=sSeparators.substring(ii,(ii+1));}}if(bNewlineAsSeparator===true){sSource=sSource.replace(/\n/g,aSeparators[0]);}count=0;for(var i=0;i<sSource.length;i++){for(var j=0;j<aSeparators.length;j++){if(aSeparators[j]===sSource.charAt(i)){if(sSource.substring(0,i)!==""||bIncludeEmpties===true){for(var p=0;p<aSeparators.length;p++){if(sSource.substring(i+1,i+2)===aSeparators[p]){nEmptyCount=2;}}aArray[count]=sSource.substring(0,i);count++;if(nEmptyCount===2&&bIncludeEmpties===true){aArray[count]="";count++;}}sSource=sSource.substring(i+nEmptyCount,sSource.length);i=-1;nEmptyCount=1;}}}aArray[count]=sSource;return aArray;}catch(e){TOM.ee(TOM.ei("String.prototype.explode",this),e);return"";}};String.prototype.replaceSubstring=function(fromList,toList){try{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;}}catch(e){TOM.ee(TOM.ei("String.prototype.replaceSubstring",this),e);return"";}};String.prototype.occurrence=function(sSearchText,bCaseSensitive){try{if(sSearchText===""){throw TOM.createErrorInfoObj(TOM.ERROR.LEVEL.ERROR,TOM.ERROR.TYPE.CONTENTERROR,TOM.ERROR.MESSAGE.STRINGISEMPTY,"Leere Zeichenkette nicht zul\uFFFDssig f\uFFFDr ersten Parameter!","FNOCRNC0001");}if(typeof sSearchText!=="string"){throw TOM.createErrorInfoObj(TOM.ERROR.LEVEL.ERROR,TOM.ERROR.TYPE.CONTENTERROR,TOM.ERROR.MESSAGE.STRINGEXPECTED,"Zeichenkette erwartet, Typ Fehler!","FNOCRNC0002");}var sSource=this;var iHits=0;var iHitPos;var bReachedEnd=false;bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;if(bCaseSensitive===false){sSource=sSource.toLowerCase();sSearchText=sSearchText.toLowerCase();}var ex=0;while(!bReachedEnd&&ex<1000000){ex++;iHitPos=sSource.indexOf(sSearchText);if(iHitPos>=0){sSource=sSource.substr(iHitPos+sSearchText.length);iHits++;}else{bReachedEnd=true;}}return iHits;}catch(e){TOM.ee(TOM.ei("String.prototype.occurrence",this),e);return -1;}};String.prototype.convert=function(sSourceType,sReturnType,vCustom1,vCustom2){try{var sSource=this;sSource=sSource.toLowerCase();sSourceType=(typeof sSourceType!="string"||sSourceType=="")?"string":sSourceType.toLowerCase();sReturnType=(typeof sReturnType!="string"||sReturnType=="")?"integer":sReturnType.toLowerCase();var sReturn="";var aAllowedTransformations=['string','integer'];aAllowedTransformations['string']=aAllowedTransformations;aAllowedTransformations['integer']=aAllowedTransformations;var bTransformationSupported=(aAllowedTransformations[sSourceType].indexOf(sReturnType)>-1);if(bTransformationSupported){var aAllowedIntegerChars=["0","1","2","3","4","5","6","7","8","9"];var sDecimalDelimiter=(typeof sDecimalDelimiter!="string")?",":sDecimalDelimiter;var sDecimalDelimiter=",";var sCurrencyDelimiter=".";var aAllowedChars=[];var aAllowedFirstChars=[];switch(sReturnType){case"integer":aAllowedChars=aAllowedIntegerChars;aAllowedFirstChars=["-","+"];break;case"fraction":break;case"binary":break;case"hexadecimal":break;case"currency":break;}for(var n=0;n<sSource.length;n++){sCurrentChar=sSource.charAt(n);if(((sReturn.length==0)&&(aAllowedFirstChars.indexOf(sCurrentChar)>-1))||(aAllowedChars.indexOf(sCurrentChar)>-1)){sReturn+=sCurrentChar;}}switch(sSourceType.toLowerCase()){case"integer":break;case"fraction":break;case"binary":break;case"hexadecimal":break;case"currency":break;}}return sReturn;}catch(e){TOM.ee(TOM.ei("String.prototype.convert",this),e);return this;}}function isArray(oSource){try{var bIsArray=false;if(oSource instanceof Array){bIsArray=true;}return bIsArray;}catch(e){TOM.ee(TOM.ei("Array.prototype.isArray",this),e);return false;}}Array.prototype.toLowerCase=function(){try{var aSource=this;for(var n=0;n<aSource.length;n++){if(typeof aSource[n]==="string"){aSource[n]=aSource[n].toLowerCase();}else if(isArray(aSource[n])){aSource[n]=aSource[n].toLowerCase();}}return aSource;}catch(e){TOM.ee(TOM.ei("Array.prototype.toLowerCase",this),e);return null;}};Array.prototype.toUpperCase=function(){try{var aSource=this;for(var n=0;n<aSource.length;n++){if(typeof aSource[n]==="string"){aSource[n]=aSource[n].toUpperCase();}else if(isArray(aSource[n])){aSource[n]=aSource[n].toUpperCase();}}return aSource;}catch(e){TOM.ee(TOM.ei("Array.prototype.toUpperCase",this),e);return null;}};Array.prototype.contains=function(aReplacementList,bCaseSensitive){try{var aSource=this;var bMatch=false;bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;if(bCaseSensitive===false){aSource=aSource.toLowerCase();}for(var n=0;n<aSource.length;n++){if(typeof aSource[n]==="string"||isArray(aSource[n])){if(aSource[n].contains(aReplacementList,bCaseSensitive)){bMatch=true;}}}return bMatch;}catch(e){TOM.ee(TOM.ei("Array.prototype.contains",this),e);return false;}};Array.prototype.left=function(sStartMarker,bCaseSensitive,bSearchBackwards){try{var aSource=this;var aReturn=[];bSearchBackwards=(typeof bSearchBackwards==="undefined"||typeof bSearchBackwards!=="boolean")?false:bSearchBackwards;bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;for(entry in aSource){if(typeof aSource[entry]==="string"||isArray(aSource[entry])){aReturn[entry]=aSource[entry].left(sStartMarker,bCaseSensitive,bSearchBackwards);}else{aReturn[entry]=aSource[entry];}}return aReturn;}catch(e){TOM.ee(TOM.ei("Array.prototype.left",this),e);return null;}};Array.prototype.leftBack=function(sStartMarker,bCaseSensitive){try{var aSource=this;var aReturn=[];bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;for(entry in aSource){if(typeof aSource[entry]==="string"||isArray(aSource[entry])){aReturn[entry]=aSource[entry].leftBack(sStartMarker,bCaseSensitive);}else{aReturn[entry]=aSource[entry];}}return aReturn;}catch(e){TOM.ee(TOM.ei("Array.prototype.leftBack",this),e);return null;}};Array.prototype.right=function(sStartMarker,bCaseSensitive,bSearchBackwards){try{var aSource=this;var aReturn=[];bSearchBackwards=(typeof bSearchBackwards==="undefined"||typeof bSearchBackwards!=="boolean")?false:bSearchBackwards;bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;for(entry in aSource){if(typeof aSource[entry]==="string"||isArray(aSource[entry])){aReturn[entry]=aSource[entry].right(sStartMarker,bCaseSensitive,bSearchBackwards);}else{aReturn[entry]=aSource[entry];}}return aReturn;}catch(e){TOM.ee(TOM.ei("Array.prototype.right",this),e);return null;}};Array.prototype.rightBack=function(sStartMarker,bCaseSensitive){try{var aSource=this;var aReturn=[];bCaseSensitive=(typeof bCaseSensitive==="undefined"||typeof bCaseSensitive!=="boolean")?true:bCaseSensitive;for(entry in aSource){if(typeof aSource[entry]==="string"||isArray(aSource[entry])){aReturn[entry]=aSource[entry].rightBack(sStartMarker,bCaseSensitive);}else{aReturn[entry]=aSource[entry];}}return aReturn;}catch(e){TOM.ee(TOM.ei("Array.prototype.rightBack",this),e);return null;}};Array.prototype.middle=function(sStartMarker,sEndMarker,bCaseSensitive,bAllowPlaceholder,bEndMarkerRequired,bSearchBackwards){try{var aSource=this;var aReturn=[];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;for(entry in aSource){if(typeof aSource[entry]==="string"||isArray(aSource[entry])){aReturn[entry]=aSource[entry].middle(sStartMarker,sEndMarker,bCaseSensitive,bAllowPlaceholder,bEndMarkerRequired,bSearchBackwards);}else{aReturn[entry]=aSource[entry];}}return aReturn;}catch(e){TOM.ee(TOM.ei("Array.prototype.middle",this),e);return null;}};Array.prototype.middleBack=function(sStartMarker,sEndMarker,bCaseSensitive,bAllowPlaceholder,bEndMarkerRequired){try{var aSource=this;var aReturn=[];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;for(entry in aSource){if(typeof aSource[entry]==="string"||isArray(aSource[entry])){aReturn[entry]=aSource[entry].middleBack(sStartMarker,sEndMarker,bCaseSensitive,bAllowPlaceholder,bEndMarkerRequired);}else{aReturn[entry]=aSource[entry];}}return aReturn;}catch(e){TOM.ee(TOM.ei("Array.prototype.middleBack",this),e);return null;}};Array.prototype.implode=function(separator){try{separator=separator||" ";if(typeof separator==="string"){var result="";for(var i=0;i<this.length;i++){result+=this[i]+separator;}result=result.substring(0,result.lastIndexOf(separator));return result;}else{return null;}}catch(e){TOM.ee(TOM.ei("Array.prototype.implode",this),e);return"";}};Array.prototype.trim=function(){try{var aSource=this;var aReturn=[];var count=0;for(var i=0;i<aSource.length;i++){if(typeof aSource[i]==="string"||isArray(aSource[i])){if(aSource[i].trim()!==""){aReturn[count]=aSource[i].trim();count++;}}else{aReturn[count]=aSource[i];count++;}}return aReturn;}catch(e){TOM.ee(TOM.ei("Array.prototype.trim",this),e);return"";}};Array.prototype.begins=function(sMarker,bCaseSensitive){try{var aSource=this;if(typeof bCaseSensitive==="undefined"){bCaseSensitive=true;}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<aSource.length;i++){if(bCaseSensitive===false){sTmp=aSource[i].toLowerCase();}else{sTmp=aSource[i];}if(sMarker===sTmp.substring(0,nLength)){return true;}}return false;}catch(e){TOM.ee(TOM.ei("Array.prototype.begins",this),e);return false;}};Array.prototype.ends=function(sMarker,bCaseSensitive){try{var aSource=this;if(typeof bCaseSensitive==="undefined"){bCaseSensitive=true;}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<aSource.length;i++){if(bCaseSensitive===false){sTmp=aSource[i].toLowerCase();}else{sTmp=aSource[i];}if(sMarker===sTmp.substring(sTmp.length-nLength,sTmp.length)){return true;}}return false;}catch(e){TOM.ee(TOM.ei("Array.prototype.ends",this),e);return false;}};Array.prototype.replace=function(aFromList,aToList){try{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;}}catch(e){TOM.ee(TOM.ei("Array.prototype.replace",this),e);return null;}};Array.prototype.replaceSubstring=function(fromList,toList){try{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;}}catch(e){TOM.ee(TOM.ei("Array.prototype.replaceSubstring",this),e);return null;}};Array.prototype.remove=function(element){try{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;}}catch(e){TOM.ee(TOM.ei("Array.prototype.remove",this),e);return null;}};Array.prototype.indexOf=function(element){try{for(var i=0;i<this.length;i++){if(this[i]==element){return i;}}return -1;}catch(e){TOM.ee(TOM.ei("Array.prototype.indexOf",this),e);return -1;}};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;}};TOM.i={browser:{version:"version",name:"name",ie:"is ie?",nn:"is netscape?",f:"is firefox?",o:"is opera?"},os:{windows:"",linux:"",mac:""},body:{width:"",height:""},window:{width:"",height:""},screen:{width:"",height:""},cookies:{enabled:false}};if(navigator.appName=="Netscape"){TOM.i.browser.name="netscape navigator"}else if(navigator.appName=="Microsoft Internet Explorer"){TOM.i.browser.name="internet explorer"}TOM.i.browser.version=parseInt(navigator.appVersion);TOM.i.browser.nn=(TOM.i.browser.name=="netscape navigator");if(TOM.i.browser.nn&&(navigator.userAgent.indexOf('Netscape6')>0))TOM.i.browser.version=6;if(TOM.i.browser.nn&&(navigator.userAgent.indexOf('Netscape7')>0))TOM.i.browser.version=7;TOM.i.browser.ie=(TOM.i.browser.name=="internet explorer");if(navigator.appVersion.indexOf('MSIE 4')>0)TOM.i.browser.version=4;if(navigator.appVersion.indexOf('MSIE 5')>0)TOM.i.browser.version=5;if(navigator.appVersion.indexOf('MSIE 6')>0)TOM.i.browser.version=6;if(navigator.appVersion.indexOf('MSIE 7')>0)TOM.i.browser.version=7;if(navigator.appVersion.indexOf('MSIE 8')>0)TOM.i.browser.version=8;TOM.i.browser.mozilla=((navigator.appName=="Netscape")&&(navigator.appVersion.substring(0,1)>="5"));TOM.i.browser.opera=((navigator.appName=="Opera")||(navigator.userAgent.indexOf("Opera")>0));TOM.i.browser.konqueror=/Konqueror/i.test(navigator.userAgent);TOM.i.browser.safari=/Safari/i.test(navigator.userAgent);TOM.i.browser.khtml=/KHTML/i.test(navigator.userAgent);if((TOM.i.browser.opera)&&((parseInt(navigator.appVersion.substring(0,1))>=6)||(navigator.userAgent.indexOf("Opera 6")>0)))TOM.i.browser.version=6;if(TOM.i.browser.opera&&(parseInt(navigator.appVersion.substring(0,1))>=6))TOM.i.browser.version=parseInt(navigator.appVersion.substring(0,1));if(TOM.i.browser.opera){TOM.i.browser.ns=false;TOM.i.browser.ie=false;TOM.i.browser.mozilla=false;TOM.i.browser.konqueror=false;TOM.i.browser.safari=false;TOM.i.browser.khtml=false;}TOM.i.os.windows=(navigator.appVersion.toLowerCase().indexOf("windows")==-1)?false:true;TOM.i.os.linux=(navigator.appVersion.toLowerCase().indexOf("linux")==-1)?false:true;TOM.i.os.mac=(navigator.appVersion.toLowerCase().indexOf("macintosh")==-1)?false:true;TOM.i.browser.info="browser appName:"+navigator.appName+"\n"+"browser appVersion:"+navigator.appVersion+"\n"+"TOM.i.browser.name:"+TOM.i.browser.name+"\n"+"TOM.i.browser.version:"+TOM.i.browser.version+"\n"+"TOM.i.browser.ie?:"+TOM.i.browser.ie+"\n"+"TOM.i.browser.nn?:"+TOM.i.browser.nn+"\n"+"TOM.i.browser.mozilla?:"+TOM.i.browser.mozilla+"\n"+"TOM.i.browser.opera?:"+TOM.i.browser.opera+"\n"+"TOM.i.browser.konqueror?:"+TOM.i.browser.konqueror+"\n"+"TOM.i.browser.safari?:"+TOM.i.browser.safari+"\n"+"TOM.i.browser.khtml?:"+TOM.i.browser.khtml+"\n";TOM.i.window=function(){var res="Window:";var maximumWidth=0;var maximumHeight=0;this.targetObj=window;var info=(this.targetObj.document.documentElement)?this.targetObj.document.documentElement:this.targetObj.document.body;this.windowInnerWidth=info.clientWidth;this.windowInnerHeight=info.clientHeight;this.screenWidth=(info.scrollWidth>info.clientWidth)?info.scrollWidth:info.clientWidth;this.screenHeight=(info.scrollHeight>info.clientHeight)?(info.scrollHeight):info.clientHeight;var oElement=window;for(var e in oElement){if(e.indexOf("idth")>-1||e.indexOf("eight")>-1||e.indexOf("op")>-1||e.indexOf("eft")>-1){res+=e+" = "+oElement[e]+"\n";if((e.indexOf("idth")>-1||e.indexOf("eft")>-1)&&oElement[e]>maximumWidth){maximumWidth=oElement[e];}if((e.indexOf("eight")>-1||e.indexOf("op")>-1)&&oElement[e]>maximumHeight){maximumHeight=oElement[e];}}}res+="\nDocument:\n";oElement=document;for(var e in oElement){if(e.indexOf("idth")>-1||e.indexOf("eight")>-1||e.indexOf("op")>-1||e.indexOf("eft")>-1){res+=e+" = "+oElement[e]+"\n";if((e.indexOf("idth")>-1||e.indexOf("eft")>-1)&&oElement[e]>maximumWidth){maximumWidth=oElement[e];}if((e.indexOf("eight")>-1||e.indexOf("op")>-1)&&oElement[e]>maximumHeight){maximumHeight=oElement[e];}}}res+="\nScreen:\n";oElement=screen;for(var e in oElement){if(e.indexOf("idth")>-1||e.indexOf("eight")>-1||e.indexOf("op")>-1||e.indexOf("eft")>-1){res+=e+" = "+oElement[e]+"\n";if((e.indexOf("idth")>-1||e.indexOf("eft")>-1)&&oElement[e]>maximumWidth){maximumWidth=oElement[e];}if((e.indexOf("eight")>-1||e.indexOf("op")>-1)&&oElement[e]>maximumHeight){maximumHeight=oElement[e];}}}res+="\ndocument.body:\n";oElement=document.body;for(var e in oElement){if(e.indexOf("idth")>-1||e.indexOf("eight")>-1||e.indexOf("op")>-1||e.indexOf("eft")>-1){res+=e+" = "+oElement[e]+"\n";if((e.indexOf("idth")>-1||e.indexOf("eft")>-1)&&oElement[e]>maximumWidth){maximumWidth=oElement[e];}if((e.indexOf("eight")>-1||e.indexOf("op")>-1)&&oElement[e]>maximumHeight){maximumHeight=oElement[e];}}}res+="\ndocument.documentElement:\n";oElement=document.documentElement;for(var e in oElement){if(e.indexOf("idth")>-1||e.indexOf("eight")>-1||e.indexOf("op")>-1||e.indexOf("eft")>-1){res+=e+" = "+oElement[e]+"\n";if((e.indexOf("idth")>-1||e.indexOf("eft")>-1)&&oElement[e]>maximumWidth){maximumWidth=oElement[e];}if((e.indexOf("eight")>-1||e.indexOf("op")>-1)&&oElement[e]>maximumHeight){maximumHeight=oElement[e];}}}this.maximumWidth=maximumWidth;this.maximumHeight=maximumHeight;res="";res+="windowInnerWidth:"+this.windowInnerWidth+"\nwindowInnerHeight:"+this.windowInnerHeight;res+="\nmaximumWidth:"+this.maximumWidth+"\nmaximumHeight:"+this.maximumHeight;this.info=res;};TOM.selectedText=function(sVar,vHandler,iInterval){this.on=function(){try{if(!that.timer){that.timer=window.setInterval(function(){that.handler();},that.interval);}}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.selectedText.on",this,"None","TOM.js");TOM.handleError(oFunctionInfo,oError);}};this.off=function(){try{if(that.timer){window.clearInterval(that.timer);delete that.timer;}}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.selectedText.off",this,"None","TOM.js");TOM.handleError(oFunctionInfo,oError);}};this.execute=function(){try{that.handler();}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.selectedText.execute",this,"None","TOM.js");TOM.handleError(oFunctionInfo,oError);}};this.get=function(){try{var sSelectedText="";if(window.getSelection){sSelectedText=window.getSelection();}else if(document.getSelection){sSelectedText=document.getSelection();}else if(document.selection){sSelectedText=document.selection.createRange().text;}that.value=sSelectedText;return sSelectedText;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.selectedText.get",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return"";}};this.clear=function(){try{if(document.selection){document.selection.empty();}else if(window.getSelection){window.getSelection().removeAllRanges();}else if(document.getSelection){document.getSelection().removeAllRanges();}}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.selectedText.clear",this,"None","TOM.js");TOM.handleError(oFunctionInfo,oError);}};try{if(typeof sVar!=="string"){throw"STRING EXPECTED FOR FIRST PARAMETER";}this.interval=(typeof iInterval==="undefined"||typeof iInterval!="number")?250:iInterval;this.source=sVar;var that=this;if(typeof vHandler==="function"){that.handler=function(){vHandler(that.get());}}else if(typeof vHandler==="string"||typeof vHandler==="object"){if(typeof vHandler==="string"){that.target=document.getElementById(vHandler);}else{that.target=vHandler;}that.handler=function(){that.get();if((that.target.type&&that.target.type.toLowerCase()==="text")||(that.target.nodeName&&that.target.nodeName.toLowerCase()==="textarea")){if(that.value!=""){that.target.value=that.value;}}else{if(that.value!=""){that.target.innerHTML="<!-- X -->"+that.get();}}}}}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.selectedText",this,"Object","TOM.js");TOM.handleError(oFunctionInfo,oError);return null;}};TOM.watching=function(sVar,sSource,fHandler,iInterval){this.on=function(){try{that.check();that.off();that.timerId=window.setTimeout(function(){that.on();},that.interval);}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.watching.on",this,"None","TOM.js");TOM.handleError(oFunctionInfo,oError);}};this.off=function(){try{if(that.timerId){window.clearTimeout(that.timerId);delete that.timerId;}}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.watching.off",this,"None","TOM.js");TOM.handleError(oFunctionInfo,oError);}};this.check=function(){try{if(that.old&&((eval(sSource)==that.old)===that.compare)){if(that.executed===false){fHandler(that.old);that.executed=true;}}else{that.old=""+eval(sSource);that.executed=false;}}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.watching.check",this,"None","TOM.js");TOM.handleError(oFunctionInfo,oError);}};this.timeout=function(){try{that.old=""+eval(sSource);that.executed=false;that.off();that.timerId=window.setTimeout(function(){that.check();},that.interval);}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.watching.timeout",this,"None","TOM.js");TOM.handleError(oFunctionInfo,oError);}};try{if(typeof sVar!=="string"){throw"STRING EXPECTED FOR FIRST PARAMETER";}this.interval=(typeof iInterval==="undefined"||typeof iInterval!="number")?1500:iInterval;this.source=sVar;this.compare=true;this.executed=false;var that=this;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.watching",this,"Object","TOM.js");TOM.handleError(oFunctionInfo,oError);return null;}};TOM.AJAX=function(fHandleRequest,fHandleError,fHandleReadyState){this.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;}}}};this.request=function(sURL,sMethod){try{that.httpReq=that.createXMLHttpReqObj();that.timer();if(!that.httpReq||sURL===""||typeof sURL!="string"){return 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"){that.httpReq.open(sMethod,sURL+sQueryString,true);sQueryString="";}else{that.httpReq.open(sMethod,sURL,true);that.httpReq.setRequestHeader("Method","POST "+sURL+" HTTP/1.1");that.httpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}that.active=true;that.httpReq.onreadystatechange=function(){try{if(that.httpReq.readyState==4){window.clearTimeout(that.timeout);if(that.httpReq.status==200){that.text=that.httpReq.responseText;that.xml=that.httpReq.responseXML;that.handleRequest(that.httpReq);}else{that.handleError(that.httpReq.status);return false;}}else{that.handleReadyState(that.httpReq.readyState);}}catch(oError){var failsilent=oError;}};that.httpReq.send(sQueryString);return true;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.ajax.request",this,"None","TOM.js");TOM.handleError(oFunctionInfo,oError);return false;}};this.get=function(sURL){try{that.abort();var ret=that.request(sURL,"GET");return ret;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.ajax.get",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return false;}};this.post=function(sURL){try{that.abort();var ret=that.request(sURL,"POST");return ret;}catch(oError){var oFunctionInfo=TOM.createFunctionInfoObj("TOM.ajax.post",this,"String","TOM.js");TOM.handleError(oFunctionInfo,oError);return false;}};this.abort=function(){if(that.active){that.active=false;that.httpReq.abort();that.httpReq=null;}};if(typeof fHandleRequest!="undefined"){this.handleRequest=fHandleRequest;}else{this.handleRequest=function(){};}if(typeof fHandleError!="undefined"){this.handleError=fHandleError;}else{this.handleError=function(){};}if(typeof fHandleError!="undefined"){this.handleReadyState=fHandleReadyState;}else{this.handleReadyState=function(){};}this.period=10000;this.text="";this.xml="";this.timer=function(){that.timeout=window.setTimeout(function(){that.httpReq.abort();that.handleError(503);},that.period);};this.timeout=null;this.active=false;var that=this;};