	
		var DTM_array = new Array();
		var DTM_currentTabs = new Array();
	    function typoSetup() {
			this.passwordDummy = "********";
			this.decimalSign = ".";
		}
		var TS = new typoSetup();
	    var evalFunc = new evalFunc();
	function feedit_tx_addresschurch_congregation_formSet(theField, evallist, is_in, checkbox, checkboxValue,checkbox_off){
		var theFObj = new evalFunc_dummy (evallist,is_in, checkbox, checkboxValue);
        var feValField = theField+"_feVal";
		evalFunc.respectTimeZones =1;
		evalFunc.USmode =1;
		if(!(document.tx_addresschurch_congregation_form && document.tx_addresschurch_congregation_form[theField] && document.tx_addresschurch_congregation_form[feValField])) return;
		theValue = document.tx_addresschurch_congregation_form[theField].value;
		document.tx_addresschurch_congregation_form[feValField].value = evalFunc.outputObjValue(theFObj, theValue);
	}

	function feedit_tx_addresschurch_congregation_formGet(theField, evallist, is_in, checkbox, checkboxValue,checkbox_off){
		var theFObj = new evalFunc_dummy(evallist,is_in, checkbox, checkboxValue);
		evalFunc.respectTimeZones =1;
		evalFunc.USmode =1;		
		if (checkbox_off){
			document.tx_addresschurch_congregation_form[theField].value=checkboxValue;
	    }else{
			document.tx_addresschurch_congregation_form[theField].value = evalFunc.evalObjValue(theFObj, document.tx_addresschurch_congregation_form[theField+"_feVal"].value);
	     }
	    feedit_tx_addresschurch_congregation_formSet(theField, evallist, is_in, checkbox, checkboxValue,checkbox_off);
	}
	function feedit_tx_metafeedit_comments_formSet(theField, evallist, is_in, checkbox, checkboxValue,checkbox_off){
		var theFObj = new evalFunc_dummy (evallist,is_in, checkbox, checkboxValue);
        var feValField = theField+"_feVal";
		evalFunc.respectTimeZones =1;
		evalFunc.USmode =1;
		if(!(document.tx_metafeedit_comments_form && document.tx_metafeedit_comments_form[theField] && document.tx_metafeedit_comments_form[feValField])) return;
		theValue = document.tx_metafeedit_comments_form[theField].value;
		document.tx_metafeedit_comments_form[feValField].value = evalFunc.outputObjValue(theFObj, theValue);
	}

	function feedit_tx_metafeedit_comments_formGet(theField, evallist, is_in, checkbox, checkboxValue,checkbox_off){
		var theFObj = new evalFunc_dummy(evallist,is_in, checkbox, checkboxValue);
		evalFunc.respectTimeZones =1;
		evalFunc.USmode =1;		
		if (checkbox_off){
			document.tx_metafeedit_comments_form[theField].value=checkboxValue;
	    }else{
			document.tx_metafeedit_comments_form[theField].value = evalFunc.evalObjValue(theFObj, document.tx_metafeedit_comments_form[theField+"_feVal"].value);
	     }
	    feedit_tx_metafeedit_comments_formSet(theField, evallist, is_in, checkbox, checkboxValue,checkbox_off);
	}
	/**
	 * [Describe function...]
	 *
	 * @param	[type]		$theField: ...
	 * @return	[type]		...
	 */
            function feedit_manipulateMultipleSelect(theField) {
               selObj = document.tx_addresschurch_congregation_form[theField+"_select"];
               val = selObj.value;
               list = document.tx_addresschurch_congregation_form[theField].value;
               newList = "";
               for(i=0;i<selObj.length;i++) {
                  if(selObj.options[i].selected == true) {
                     newList += selObj.options[i].value+",";
                  }
               }
               if(newList.length!=0)
                 newList = newList.substring(0,newList.length-1);
               document.tx_addresschurch_congregation_form[theField].value = newList;

            }

	/**
	 * [Describe function...]
	 *
	 * @param	[type]		$theField: ...
	 * @return	[type]		...
	 */
            function feedit_manipulateGroup(theField) {
               selObj = document.tx_addresschurch_congregation_form[theField+"_select"];
               val = selObj.value;
               list = document.tx_addresschurch_congregation_form[theField].value;
               newList = "";
               for(i=0;i<selObj.length;i++) {
                  if(selObj.options[i].selected == false) {
                     newList += selObj.options[i].value+",";
                  } else {
                     rem_i = i;
                  }
               }
               if(newList.length!=0)
                 newList = newList.substring(0,newList.length-1);
               document.tx_addresschurch_congregation_form[theField].value = newList;
               selObj.options[rem_i] = null;

            }

	/**
	 * [Describe function...]
	 *
	 * @param	[type]		$theStr1, delim, index: ...
	 * @return	[type]		...
	 */
            function feedit_split(theStr1, delim, index) {
               var theStr = ""+theStr1;
               var lengthOfDelim = delim.length;
               sPos = -lengthOfDelim;
               if (index<1) {index=1;}
               for (var a=1; a < index; a++){
                   sPos = theStr.indexOf(delim, sPos+lengthOfDelim);
                   if (sPos==-1){return null;}
               }
               ePos = theStr.indexOf(delim, sPos+lengthOfDelim);
               if(ePos == -1) {ePos = theStr.length;}
               return (theStr.substring(sPos+lengthOfDelim,ePos));
            }
	 
	 
	 var browserWin="";

	function setFormValueOpenBrowser(mode,params) {	//
		var url = "browser.php?mode="+mode+"&bparams="+params;

		browserWin = window.open(url,"Typo3WinBrowser","height=350,width="+(mode=="db"?650:600)+",status=0,menubar=0,resizable=1,scrollbars=1");
		browserWin.focus();
	}
	function setFormValueFromBrowseWin(fName,value,label,exclusiveValues)	{	//
		var formObj = setFormValue_getFObj(fName)
		if (formObj && value!="--div--")	{
			fObj = formObj[fName+"_list"];
			var len = fObj.length;
				// Clear elements if exclusive values are found
			if (exclusiveValues)	{
				var m = new RegExp("(^|,)"+value+"($|,)");
				if (exclusiveValues.match(m))	{
						// the new value is exclusive
					for (a=len-1;a>=0;a--)	fObj[a] = null;
					len = 0;
				} else if (len == 1)	{
					m = new RegExp("(^|,)"+fObj.options[0].value+"($|,)");
					if (exclusiveValues.match(m))	{
							// the old value is exclusive
						fObj[0] = null;
						len = 0;
					}
				}
			}
				// Inserting element
			var setOK = 1;
			if (!formObj[fName+"_mul"] || formObj[fName+"_mul"].value==0)	{
				for (a=0;a<len;a++)	{
					if (fObj.options[a].value==value)	{
						setOK = 0;
					}
				}
			}
			if (setOK)	{
				fObj.length++;
				fObj.options[len].value = value;
				fObj.options[len].text = unescape(label);

					// Traversing list and set the hidden-field
				setHiddenFromList(fObj,formObj[fName]);
				
			}
		}
	}
	function setHiddenFromList(fObjSel,fObjHid)	{	//
		l=fObjSel.length;
		fObjHid.value="";
		for (a=0;a<l;a++)	{
			if (a==l-1){
				fObjHid.value+=fObjSel.options[a].value;
			}else{
				fObjHid.value+=fObjSel.options[a].value+",";
			}
		}
	}
	function setFormRegenerer(fName){
		var formObj = setFormValue_getFObj(fName);
		
		if (formObj)	{
		
			var fObjSel = formObj[fName+"_sel"];
			var fObjlist = formObj[fName+"_list"];
			var liste=fObjSel.options.length;
			for (a=0;a<liste;a++)	{
				
				if (fObjSel.options[a].selected==true)	{
					fObjSel.options[a].selected=false;
				}
				
			}
			myString = formObj[fName].value;
			myArray = myString.split(",");
			for (var num=0;   num<myArray.length;   num++)
			{	
				piece=myArray[num];
				for (a=0;a<liste;a++)	{
					
					if (fObjSel.options[a].value==piece)	{
						setFormRegenererAddOption(fObjlist, fObjSel.options[a].text, fObjSel.options[a].value);
					}
				
				}
			}
				
				
			
			
			
		}
		
	
	}
	function setFormRegenererAddOption(selectbox,text,value )
	{
		var optn = document.createElement("OPTION");
		optn.text = text;
		optn.value = value;
		selectbox.options.add(optn);
	}

	function setFormValueManipulate(fName,type)	{	//
		var formObj = setFormValue_getFObj(fName)
		if (formObj)	{
			var localArray_V = new Array();
			var localArray_L = new Array();
			var localArray_S = new Array();
			var fObjSel = formObj[fName+"_list"];
			var l=fObjSel.length;
			var c=0;
			if (type=="Remove" || type=="Top" || type=="Bottom")	{
				if (type=="Top")	{
					for (a=0;a<l;a++)	{
						if (fObjSel.options[a].selected==1)	{
							localArray_V[c]=fObjSel.options[a].value;
							localArray_L[c]=fObjSel.options[a].text;
							localArray_S[c]=1;
							c++;
						}
					}
				}
				for (a=0;a<l;a++)	{
					if (fObjSel.options[a].selected!=1)	{
						localArray_V[c]=fObjSel.options[a].value;
						localArray_L[c]=fObjSel.options[a].text;
						localArray_S[c]=0;
						c++;
					}
				}
				if (type=="Bottom")	{
					for (a=0;a<l;a++)	{
						if (fObjSel.options[a].selected==1)	{
							localArray_V[c]=fObjSel.options[a].value;
							localArray_L[c]=fObjSel.options[a].text;
							localArray_S[c]=1;
							c++;
						}
					}
				}
			}
			if (type=="Down")	{
				var tC = 0;
				var tA = new Array();

				for (a=0;a<l;a++)	{
					if (fObjSel.options[a].selected!=1)	{
							// Add non-selected element:
						localArray_V[c]=fObjSel.options[a].value;
						localArray_L[c]=fObjSel.options[a].text;
						localArray_S[c]=0;
						c++;

							// Transfer any accumulated and reset:
						if (tA.length > 0)	{
							for (aa=0;aa<tA.length;aa++)	{
								localArray_V[c]=fObjSel.options[tA[aa]].value;
								localArray_L[c]=fObjSel.options[tA[aa]].text;
								localArray_S[c]=1;
								c++;
							}

							var tC = 0;
							var tA = new Array();
						}
					} else {
						tA[tC] = a;
						tC++;
					}
				}
					// Transfer any remaining:
				if (tA.length > 0)	{
					for (aa=0;aa<tA.length;aa++)	{
						localArray_V[c]=fObjSel.options[tA[aa]].value;
						localArray_L[c]=fObjSel.options[tA[aa]].text;
						localArray_S[c]=1;
						c++;
					}
				}
			}
			if (type=="Up")	{
				var tC = 0;
				var tA = new Array();
				var c = l-1;

				for (a=l-1;a>=0;a--)	{
					if (fObjSel.options[a].selected!=1)	{

							// Add non-selected element:
						localArray_V[c]=fObjSel.options[a].value;
						localArray_L[c]=fObjSel.options[a].text;
						localArray_S[c]=0;
						c--;

							// Transfer any accumulated and reset:
						if (tA.length > 0)	{
							for (aa=0;aa<tA.length;aa++)	{
								localArray_V[c]=fObjSel.options[tA[aa]].value;
								localArray_L[c]=fObjSel.options[tA[aa]].text;
								localArray_S[c]=1;
								c--;
							}

							var tC = 0;
							var tA = new Array();
						}
					} else {
						tA[tC] = a;
						tC++;
					}
				}
					// Transfer any remaining:
				if (tA.length > 0)	{
					for (aa=0;aa<tA.length;aa++)	{
						localArray_V[c]=fObjSel.options[tA[aa]].value;
						localArray_L[c]=fObjSel.options[tA[aa]].text;
						localArray_S[c]=1;
						c--;
					}
				}
				c=l;	// Restore length value in "c"
			}

				// Transfer items in temporary storage to list object:
			fObjSel.length = c;
			for (a=0;a<c;a++)	{
				fObjSel.options[a].value = localArray_V[a];
				fObjSel.options[a].text = localArray_L[a];
				fObjSel.options[a].selected = localArray_S[a];
			}
			setHiddenFromList(fObjSel,formObj[fName]);

			
		}
	}
	function setFormValue_getFObj(fName)	{	
		//specifier ici le nom du formulaire a la place de document.formulaire
		var formObj = document.tx_addresschurch_congregation_form;
		if (formObj)	{
			if (formObj[fName] && formObj[fName+"_list"] && formObj[fName+"_list"].type=="select-multiple")	{
				return formObj;
			} else {
				alert("Formfields missing:\n fName: "+formObj[fName]+"\n fName_list:"+formObj[fName+"_list"]+"\n type:"+formObj[fName+"_list"].type+"\n fName:"+fName);
			}
		}
		return "";
	}
	
     