function generateID() {
	var ID = "";
	for (i=1;i<=32;i++) {
		ID += String.fromCharCode(Math.round(Math.random() * 25) + 97);
	}
	return ID;
}

function getElementID(elementName) {
	var myList = new Array();
	myList = this.fieldList.getList();
	var myID = "";
	for (i=0; i<myList.length; i ++) {
		var thisID = "";
		thisID = myList[i].fieldID;
		if (thisID==elementName) {
			myID = thisID;
		}
	}
	return myID
}

function snipLabel(labelString) {
	var myString;
	var maxStringLength = 40;
	if (labelString.length>maxStringLength) {
		myString = labelString.substring(0,maxStringLength) + "...";
	} else {
		myString = labelString
	}
	return myString;
}

function arrayContains(array1, myString) {
	var arrayString = new String();
	arrayString = array1.toString();
	var returnValue = false;
	if (arrayString.indexOf(myString) >= 0) returnValue = true;
	return returnValue;
}

function hideLayer(layer) {
	var thisLayer = document.getElementById(layer);
	thisLayer.style.visibility="hidden";
	thisLayer.style.display = "none";
}

function showLayer(layer) {
	var thisLayer = document.getElementById(layer);
	thisLayer.style.visibility="visible";
	thisLayer.style.display = "inline";
}

function formElements() {
	var elementList = new Array();
	this.add = function(myObject) {
		var myLength = elementList.length;
		elementList[myLength] = myObject;
	}
	this.getNrOfElements = function() {
		return elementList.length;
	}
	this.getList = function() {
		return elementList;
	}
	this.changeViewByID = function(myID) {
		var contentTest = true;
		var content = "";
		var nrOfElements = elementList.length;
		for (i = 0; i < nrOfElements; i++) {
			if (elementList[i].fieldID == myID) {
				var hideList = new Array();
				var showList = new Array();
				if (elementList[i].fieldType == "selectBox") {
					eval("hideList = elementList[i].onChangeHide[document.myForm['" + myID + "'].selectedIndex];");
					if (hideList == undefined) hideList = Array("");
				} else { 
					if (elementList[i].fieldType == "radioButtons") {
						var nrOfElements = 0;
						eval("nrOfElements = document.myForm['" + myID + "'].length;");
						var checkedElement = 0;
						for (j = 0; j < nrOfElements; j++) {
							var isChecked = false;
							eval("isChecked = document.myForm['" + myID + "'][" + j + "].checked");
							if (isChecked) {
								checkedElement = j;
							}
						}
						eval("hideList = elementList[i].onChangeHide[" + checkedElement + "];");
						if (hideList == undefined) hideList = Array("");
					} else {
						if (elementList[i].fieldType == "checkbox") {
							//do nothing
							hideList = "";
						} else {
							//Textfield
							hideList = elementList[i].onChangeHide;
							if (elementList[i].fieldContent == "number") {
					 			eval("content = document.myForm." + elementList[i].fieldID + ".value");
					 			if (content.length>0) {
						 			if (!isNaN(content)) {	
						 				if (elementList[i].onChangeTest!="") {
						 					eval("contentTest = (" +  content + elementList[i].onChangeTest + ");");
						 					if (contentTest) {
												hideList = elementList[i].onChangeHide;
						 					} else {
												hideList = elementList[i].onChangeShow;
						 					}
						 				}
						 			} else {
						 				hideList="";
						 				alert(elementList[i].incorrectContentMessage);
						 			}
						 		}
						 				
							}
						}
					}
				}
				var listNr = hideList.length;
				for (j = 0; j < listNr; j++) {
					if (hideList[j].length > 0) {
						eval(hideList[j] + ".visible = false;");
						eval("hideLayer(" + hideList[j] + ".labelID);");
						eval("hideLayer(" + hideList[j] + ".fieldID);");
					}
				}
				if (elementList[i].fieldType == "selectBox") {
					eval("showList = elementList[i].onChangeShow[document.myForm['" + myID + "'].selectedIndex];");
					if (showList == undefined) showList = Array("");
				} else	{
					if (elementList[i].fieldType == "radioButtons") {
						var nrOfElements = 0;
						eval("nrOfElements = document.myForm['" + myID + "'].length;");
						var checkedElement = 0;
						for (j = 0; j < nrOfElements; j++) {
							var isChecked = false;
							eval("isChecked = document.myForm['" + myID + "'][" + j + "].checked");
							if (isChecked) {
								checkedElement = j;
							}
						}
						eval("showList = elementList[i].onChangeShow[" + checkedElement + "];");
						if (showList == undefined) showList = Array("");
					} else {
						if (elementList[i].fieldType == "checkbox") {
							//do nothing
							showList = "";
						} else {
							showList = elementList[i].onChangeShow;
							if (elementList[i].fieldContent == "number") {
					 			if (!isNaN(content)) {	
									if (contentTest) {
										showList = elementList[i].onChangeShow;
									} else {
										showList = elementList[i].onChangeHide;
									}
								} else {
									showList = "";
								}
							}
						}
					}
				}
				listNr = showList.length;
				for (j = 0; j < listNr; j++) {
					if (showList[j].length > 0) {
						eval(showList[j] + ".visible = true;");
						eval("showLayer(" + showList[j] + ".labelID);");
						eval("showLayer(" + showList[j] + ".fieldID);");
					}
				}
			}
		}
 		eval("document.myForm['" + myID + "'].focus;");
	}
}

function changeVisibility(ID) {
	fieldList.changeViewByID(ID);
}

function group() {
	this.fieldType = "group";
	this.label = "label";
	this.labelStyle = "";
	this.visible = true;
	this.contains = new Array();
	this.preLabelCode = "";
	this.postLabelCode = "";
	this.preFieldCode = "";
	this.postFieldCode = "";

	this.labelID = generateID();
	this.fieldID = generateID();

	this.showLabel = function() {
		this.visible = true;
		showLayer(this.labelID);
	}
	this.showField = function() {
		this.visible = true;
		showLayer(this.fieldID);
	}
	this.hideLabel = function() {
		this.visible = false;
		hideLayer(this.labelID);
	}
	this.hideField = function() {
		this.visible = false;
		hideLayer(this.fieldID);
	}
	this.writeLabel = function() {
		document.write("<span id=\"" + this.labelID + "\">");
		document.write(this.preLabelCode + "<span class=\"" + this.labelStyle + "\">" + this.label + "</span>");
		document.write(this.postLabelCode + "</span>");
		if (!this.visible) {
			this.hideLabel();
		}
	}
	this.writeGroupStart = function() {
		document.write("<span id=\"" + this.fieldID + "\">");
	}
	this.writeGroupEnd = function() {
		document.write(this.postFieldCode + "</span>");
		if (!this.visible) {
			this.hideField();
		}
	}

}

function textField() {
	this.fieldType = "textField";
	this.fieldContent = "text";
	this.contentTest = "";
	this.incorrectContentMessage = "";
	this.visible = true;
	this.label = "label";
	this.labelStyle = "";
	this.inputStyle = "";
	this.helptext = "";
	this.onChangeHide = new Array();
	this.onChangeShow = new Array();
	this.onChangeTest = "";
	this.preLabelCode = "";
	this.postLabelCode = "";
	this.preFieldCode = "";
	this.postFieldCode = "";
	this.obligatory = false;
	this.obligatoryStyle = "";

	this.labelID = generateID();
	this.fieldID = generateID();

	this.showLabel = function() {
		this.visible = true;
		showLayer(this.labelID);
	}
	this.showField = function() {
		this.visible = true;
		showLayer(this.fieldID);
	}
	this.hideLabel = function() {
		this.visible = false;
		hideLayer(this.labelID);
	}
	this.hideField = function() {
		this.visible = false;
		hideLayer(this.fieldID);
	}
	this.writeLabel = function() {
		document.write("<span id=\"" + this.labelID + "\">");
		document.write(this.preLabelCode + "<span class=\"" + this.labelStyle + "\">" + this.label + "</span>");
		if (this.obligatory) {
			document.write("<span class=\"obligatory\">*</span>");
		}
		if (this.helptext.length > 0) {
			document.write("<span class=\"helptext\">" + this.helptext + "</span>");
		}
		document.write(this.postLabelCode + "</span>");
		if (!this.visible) {
			this.hideLabel();
		}
	}
	this.writeField = function() {
		document.write("<span id=\"" + this.fieldID + "\">");
		document.write(this.preFieldCode + "<input ");
		if ((this.onChangeHide != undefined) || (this.onChangeShow != undefined)){
			if ((this.onChangeHide.length > 0) || (this.onChangeShow.length > 0)) {
				document.write(" onChange=\"changeVisibility(\'" + this.fieldID + "\');\" ");
			}
		}
		document.write("class = \"" + this.inputStyle + "\" type=\"text\" name=\"" + this.fieldID + "\">");
		document.write(this.postFieldCode + "</span>");
		if (!this.visible) {
			this.hideField();
		}
	}
}

function textArea() {
	this.fieldType = "textArea";
	this.visible = true;
	this.label = "label";
	this.labelStyle = "";
	this.inputStyle = "";
	this.helptext = "";
	this.onChangeHide = new Array();
	this.onChangeShow = new Array();
	this.preLabelCode = "";
	this.postLabelCode = "";
	this.preFieldCode = "";
	this.postFieldCode = "";
	this.obligatory = false;
	this.obligatoryStyle = "";
	this.columns = 80;
	this.rows = 5;

	this.labelID = generateID();
	this.fieldID = generateID();

	this.showLabel = function() {
		this.visible = true;
		showLayer(this.labelID);
	}
	this.showField = function() {
		this.visible = true;
		showLayer(this.fieldID);
	}
	this.hideLabel = function() {
		this.visible = false;
		hideLayer(this.labelID);
	}
	this.hideField = function() {
		this.visible = false;
		hideLayer(this.fieldID);
	}
	this.writeLabel = function() {
		document.write("<span id=\"" + this.labelID + "\">");
		document.write(this.preLabelCode + "<span class=\"" + this.labelStyle + "\">" + this.label + "</span>");
		if (this.obligatory) {
			document.write("<span class=\"obligatory\">*</span>");
		}
		if (this.helptext.length > 0) {
			document.write("<span class=\"helptext\">" + this.helptext + "</span>");
		}
		document.write(this.postLabelCode + "</span>");
		if (!this.visible) {
			this.hideLabel();
		}
	}
	this.writeField = function() {
		document.write("<span id=\"" + this.fieldID + "\">");
		document.write(this.preFieldCode + "<textarea ");
		if ((this.onChangeHide != undefined) || (this.onChangeShow != undefined)){
			if ((this.onChangeHide.length > 0) || (this.onChangeShow.length > 0)) {
				document.write(" onChange=\"changeVisibility(\'" + this.fieldID + "\');\" ");
			}
		}
		document.write("cols=\"" + this.columns + "\" rows=\"" + this.rows + "\" style = \"" + this.inputStyle + "\" name=\"" + this.fieldID + "\"></textArea>");
		document.write(this.postFieldCode + "</span>");
		if (!this.visible) {
			this.hideField();
		}
	}
}

function checkbox() {
	this.fieldType = "checkbox";
	this.value = "";
	this.visible = true;
	this.label = "label";
	this.labelStyle = "";
	this.inputStyle = "";
	this.helptext = "";
	this.preLabelCode = "";
	this.postLabelCode = "";
	this.preFieldCode = "";
	this.postFieldCode = "";
	this.selStatus = false;

	this.labelID = generateID();
	this.fieldID = generateID();

	this.showLabel = function() {
		this.visible = true;
		showLayer(this.labelID);
	}
	this.showField = function() {
		this.visible = true;
		showLayer(this.fieldID);
	}
	this.hideLabel = function() {
		this.visible = false;
		hideLayer(this.labelID);
	}
	this.hideField = function() {
		this.visible = false;
		hideLayer(this.fieldID);
	}
	this.writeLabel = function() {
		document.write("<span id=\"" + this.labelID + "\">");
		document.write(this.preLabelCode + "<span class=\"" + this.labelStyle + "\">" + this.label + "</span>");
		if (this.helptext.length > 0) {
			document.write("<span class=\"helptext\">" + this.helptext + "</span>");
		}
		document.write(this.postLabelCode + "</span>");
		if (!this.visible) {
			this.hideLabel();
		}
	}
	this.writeField = function() {
		document.write("<span id=\"" + this.fieldID + "\">");
		document.write(this.preFieldCode + "<input ");
		if ((this.onChangeHide != undefined) || (this.onChangeShow != undefined)){
			if ((this.onChangeHide.length > 0) || (this.onChangeShow.length > 0)) {
				document.write(" onChange=\"changeVisibility(\'" + this.fieldID + "\');\" ");
			}
		}
		document.write("value=\"" + this.value + "\" style = \"" + this.inputStyle + "\" type=\"checkbox\" name=\"" + this.fieldID + "\"" + (this.selStatus?" checked=\"checked\" ":"") + ">");
		document.write(this.postFieldCode + "</span>");
		if (!this.visible) {
			this.hideField();
		}
	}
}

function textLabel() {
	this.fieldType = "textLabel";
	this.visible = true;
	this.label = "label";
	this.labelStyle = "";
	this.preLabelCode = "";
	this.postLabelCode = "";

	this.labelID = generateID();
	this.fieldID = generateID();

	this.showLabel = function() {
		this.visible = true;
		showLayer(this.labelID);
	}
	this.showField = function() {
		this.visible = true;
		showLayer(this.fieldID);
	}
	this.hideLabel = function() {
		this.visible = false;
		hideLayer(this.labelID);
	}
	this.hideField = function() {
		this.visible = false;
		hideLayer(this.fieldID);
	}
	this.writeLabel = function() {
		document.write("<span id=\"" + this.labelID + "\">");
		document.write(this.preLabelCode + "<span class=\"" + this.labelStyle + "\">" + this.label + "</span>");
		document.write(this.postLabelCode + "</span>");
		document.write("<span id=\"" + this.fieldID + "\"></span>");
		if (!this.visible) {
			this.hideLabel();
			this.hideField();
		}
	}
}

function selectBox() {
	this.fieldType = "selectBox";
	this.visible = true;
	this.label = "label";
	this.labelStyle = "";
	this.selects = new Array();
	this.values = new Array();
	this.inputStyle = "";
	this.helptext = "";
	this.onChangeHide = new Array();
	this.onChangeShow = new Array();
	this.preLabelCode = "";
	this.postLabelCode = "";
	this.preFieldCode = "";
	this.postFieldCode = "";
	this.obligatory = false;
	this.obligatoryStyle = "";
	this.selectedIndex = 0;

	this.labelID = generateID();
	this.fieldID = generateID();

	this.showLabel = function() {
		this.visible = true;
		showLayer(this.labelID);
	}
	this.showField = function() {
		this.visible = true;
		showLayer(this.fieldID);
	}
	this.hideLabel = function() {
		this.visible = false;
		hideLayer(this.labelID);
	}
	this.hideField = function() {
		this.visible = false;
		hideLayer(this.fieldID);
	}
	this.writeLabel = function() {
		document.write("<span id=\"" + this.labelID + "\">");
		document.write(this.preLabelCode + "<span class=\"" + this.labelStyle + "\">" + this.label + "</span>");
		if (this.obligatory) {
			document.write("<span class=\"obligatory\">*</span>");
		}
		if (this.helptext.length > 0) {
			document.write("<span class=\"helptext\">" + this.helptext + "</span>");
		}
		document.write(this.postLabelCode + "</span>");
		if (!this.visible) {
			this.hideLabel();
		}
	}
	this.writeField = function() {
		document.write("<span id=\"" + this.fieldID + "\">");
		document.write(this.preFieldCode + "<select ");
		var showChange = false;
		if ((this.onChangeHide != undefined) || (this.onChangeShow != undefined)){
			for (i = 0; i < this.onChangeHide.length; i++) {
				if (this.onChangeHide[i].length > 0) {
					if (!showChange) {
						showChange = true;
					}
				}
			}
			for (i = 0; i < this.onChangeShow.length; i++) {
				if (this.onChangeShow[i].length > 0) {
					if (!showChange) {
						showChange = true;
					}
				}
			}
			if (showChange) {
				document.write(" onChange=\"changeVisibility(\'" + this.fieldID + "\');\" ");
			}
		}
		document.write("class = \"" + this.inputStyle + "\" name=\"" + this.fieldID + "\">");
		for (i = 0; i < this.selects.length; i++) {
			if (this.values[i] == undefined) {
				document.write("<option value=\"" + this.selects[i] + "\"");
			} else {
				document.write("<option value=\"" + this.values[i]) + "\"";
			}
			if (this.selectedIndex == i) document.write(" selected ");
			document.write(">" + this.selects[i] + "</option>");
		}
		document.write("</select>");
		document.write(this.postFieldCode + "</span>");
		if (!this.visible) {
			this.hideField();
		}
	}
}

function radioButtons() {
	this.fieldType = "radioButtons";
	this.visible = true;
	this.label = "label";
	this.labelStyle = "";
	this.radioLabels = new Array();
	this.values = new Array();
	this.inputStyle = "";
	this.helptext = "";
	this.onChangeHide = new Array();
	this.onChangeShow = new Array();
	this.preLabelCode = "";
	this.postLabelCode = "";
	this.preFieldCode = "";
	this.postFieldCode = "";
	this.rotation = "H";
	this.obligatory = false;
	this.obligatoryStyle = "";

	this.labelID = generateID();
	this.fieldID = generateID();

	this.showLabel = function() {
		this.visible = true;
		showLayer(this.labelID);
	}
	this.showField = function() {
		this.visible = true;
		showLayer(this.fieldID);
	}
	this.hideLabel = function() {
		this.visible = false;
		hideLayer(this.labelID);
	}
	this.hideField = function() {
		this.visible = false;
		hideLayer(this.fieldID);
	}
	this.writeLabel = function() {
		document.write("<span id=\"" + this.labelID + "\">");
		document.write(this.preLabelCode + "<span class=\"" + this.labelStyle + "\">" + this.label + "</span>");
		if (this.obligatory) {
			document.write("<span class=\"obligatory\">*</span>");
		}
		if (this.helptext.length > 0) {
			document.write("<span class=\"helptext\">" + this.helptext + "</span>");
		}
		document.write(this.postLabelCode + "</span>");
		if (!this.visible) {
			this.hideLabel();
		}
	}
	this.writeField = function() {
		document.write("<span id=\"" + this.fieldID + "\" style = \"" + this.inputStyle + "\">");
		document.write(this.preFieldCode);
		for (i = 0; i < this.radioLabels.length; i++) {
			if (this.values[i] == undefined) {
				document.write("<input type=\"radio\" value=\"" + this.radioLabels[i] + "\" name=\"" + this.fieldID + "\"");
			} else {
				document.write("<input type=\"radio\" value=\"" + this.values[i] + "\" name=\"" + this.fieldID + "\"");
			}
			var showChange = false;
			if (this.onChangeHide != undefined) {
				if (this.onChangeHide.length > 0) {
					if (this.onChangeHide[i] != undefined) {
						if (this.onChangeHide[i].length > 0) {
							showChange = true;
						}
					}
				}
			}
			if (this.onChangeShow != undefined) {
				if (this.onChangeShow.length > 0) {
					if (this.onChangeShow[i] != undefined) {
						if (this.onChangeShow[i].length > 0) {
							showChange = true;
						}
					}
				}
			}
			if (showChange) {
				document.write(" onClick=\"changeVisibility(\'" + this.fieldID + "\');\" ");
			}
			document.write(">" + this.radioLabels[i]);
			if ((this.rotation != "H") && (this.rotation != "h")) {
				document.write("<br/>");
			}
		}
		document.write(this.postFieldCode + "</span>");
		if (!this.visible) {
			this.hideField();
		}
	}
}

function checkData(myForm) {
	var myList = new Array();
	var emailAddress = "";
	var contactname = "";
	var body;
	body = "";
	var obligatoryOK = true;
	var incorrectContent;
	incorrectContent = "";
	var obligatoryMessage;
	obligatoryMessage = standardObligatoryMessage;
	myList = this.fieldList.getList();
	var nrOfElements = myList.length;
	//get elements in hidden groups
	var hiddenGroupElements = new Array();
	for (i = 0;i < nrOfElements; i++) {
		if ((myList[i].fieldType=="group") && (myList[i].visible==false)) {
			var groupElements = new Array();
			groupElements = myList[i].contains;
			for (j=0; j<groupElements.length; j++) {
				var thisID = "";
				eval("thisID = " + groupElements[j] + ".fieldID;");
				hiddenGroupElements[hiddenGroupElements.length]=thisID;
			}
		}
	}
	for (i = 0;i < nrOfElements; i++) {
		 if ((myList[i].visible) && (! arrayContains(hiddenGroupElements, myList[i].fieldID))) {
		 	if (myList[i].fieldType == "checkbox") {
		 		var isChecked = false;
	 			eval("isChecked = document.myForm." + myList[i].fieldID + ".checked");
	 			if (isChecked) {
				 	//eval("body += \"" + snipLabel(myList[i].label) + " : \" + document.myForm." + myList[i].fieldID + ".value + \"\\n\\r\"");
				 	body += "Ik wens mij WEL in te schrijven op de nieuwsbrief.\n\r";
		 		} else {
				 	body += "Ik wens mij NIET in te schrijven op de nieuwsbrief.\n\r";
		 			if (myList[i].obligatory) {
		 				obligatoryOK = false;
		 				obligatoryMessage += "\n\r* " + myList[i].label;
		 			}
		 		}
		 	}
		 	if (myList[i].fieldType == "textField") {
		 		if (myList[i].obligatory) {
		 			eval("if (document.myForm." + myList[i].fieldID + ".value == \"\") obligatoryOK = false;");
	 				eval("if (document.myForm." + myList[i].fieldID + ".value == \"\") obligatoryMessage += \"\\n\\r* \" + myList[i].label;");
		 		}
	 			if (myList[i].fieldContent == "number") {
	 				var content = "";
		 			eval("content = document.myForm." + myList[i].fieldID + ".value");
		 			if (content.length>0) {
			 			if (isNaN(content)) {
			 				incorrectContent += myList[i].label + " : " + myList[i].incorrectContentMessage + "\n\r";
			 			} else {
			 				var myTest = false;
			 				eval("if (content" + myList[i].contentTest + ") myTest = true;");
			 				if (!myTest) {
				 				incorrectContent += myList[i].label + " : " + myList[i].incorrectContentMessage + "\n\r";
			 				}
			 			}
					}
	 			}
	 			if (myList[i].fieldContent == "e-mail") {
	 				var content = "";
		 			eval("content = document.myForm." + myList[i].fieldID + ".value");
		 			emailAddress = content;
	 				if (window.RegExp) {
						var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$";
						var reg2 = new RegExp(reg2str);
						if (!reg2.test(content)) {
			 				incorrectContent += myList[i].label + " : " + myList[i].incorrectContentMessage + "\n\r";
						}
	 				} else {
					    if((content.indexOf("@") < 1) && (content.indexOf(".") < 2)) {
			 				incorrectContent += myList[i].label + " : " + myList[i].incorrectContentMessage + "\n\r";
					   	}
	 				}
	 			}
	 			var myFormelement;
	 			eval("myFormElement = document.myForm." + myList[i].fieldID + ";");
	 			if (myFormElement!=undefined) {
//				 	alert("body += \"" + myList[i].label + " : \" + document.myForm." + myList[i].fieldID + ".value + \"\\n\\r\"");
					if(myList[i].label != "Voornaam" && myList[i].label != "Straat")
					{
						if(myList[i].label == "Familienaam")
				 			eval("body += \"Naam : \" + document.myForm." + address_firstName.fieldID + ".value + ' ' + document.myForm." + myList[i].fieldID + ".value + \"\\n\\r\"");
						else if(myList[i].label == "Nr")
				 			eval("body += \"Straat : \" + document.myForm." + address_street.fieldID + ".value + ', ' + document.myForm." + myList[i].fieldID + ".value + \"\\n\\r\"");
						else
				 			eval("body += \"" + snipLabel(myList[i].label) + " : \" + document.myForm." + myList[i].fieldID + ".value + \"\\n\\r\"");
					}
				}
			}
		 	if (myList[i].fieldType == "textArea") {
		 		if (myList[i].obligatory) {
		 			eval("if (document.myForm." + myList[i].fieldID + ".value == \"\") obligatoryOK = false;");
	 				obligatoryMessage += "\n\r* " + myList[i].label;
		 		}
	 			var myFormelement;
	 			eval("myFormElement = document.myForm." + myList[i].fieldID + ";");
	 			if (myFormElement!=undefined) {
//				 	alert("body += \"" + myList[i].label + " : \" + document.myForm." + myList[i].fieldID + ".value + \"\\n\\r\"");
				 	eval("body += \"\\n\\r" + snipLabel(myList[i].label) + " :\\n\\r\" + document.myForm." + myList[i].fieldID + ".value + \"\\n\\r\"");
				}
			}
		 	if (myList[i].fieldType == "selectBox") {
		 		if (myList[i].obligatory) {
		 			eval("if (document.myForm." + myList[i].fieldID + ".value == \"\") obligatoryOK = false;");
	 				eval("if (document.myForm." + myList[i].fieldID + ".value == \"\") obligatoryMessage += \"\\n\\r* \" + myList[i].label;");;
		 		}
	 			var myFormelement;
	 			eval("myFormElement = document.myForm." + myList[i].fieldID + ";");
	 			if (myFormElement!=undefined) {
//				 	alert("body += \"" + myList[i].label + " : \" + document.myForm." + myList[i].fieldID + ".value + \"\\n\\r\"");
				 	eval("body += \"" + snipLabel(myList[i].label) + " : \" + document.myForm." + myList[i].fieldID + ".value + \"\\n\\r\"");
				}
			}
		 	if (myList[i].fieldType == "radioButtons") {
		 		var myValue;
		 		var myLength;
		 		eval("myLength = document.myForm." + myList[i].fieldID + ".length;");
		 		var isOneChecked;
		 		isOneChecked = false;
		 		for (j = 0; j < myLength; j++) {
		 			var isChecked;
		 			var myFormElement;
		 			eval("myFormElement = document.myForm." + myList[i].fieldID + ";");
		 			if (myFormElement!=undefined) {
			 			eval("isChecked = document.myForm." + myList[i].fieldID + "[j].checked;");
			 			if (isChecked) isOneChecked = true;
			 			if (isChecked) {
			 				eval("myValue = document.myForm." + myList[i].fieldID + "[j].value;");
						 	body += snipLabel(myList[i].label) + " : " + myValue + "\n\r";
			 			}
			 		}
		 		}
		 		if (myList[i].obligatory) {
		 			if (!isOneChecked) {
		 				obligatoryOK = false;
		 				obligatoryMessage += "\n\r* " + myList[i].label;
		 			}
		 		}
			}
		 }
	}
	var message;
	message = "";
	if (!obligatoryOK) {
		message = obligatoryMessage + "\n\r";
		alert(obligatoryMessage);
	} else
	if (incorrectContent.length>0) {
		message += incorrectContent;
		alert(incorrectContent);
	}
	if (message.length > 0)
	{
//		alert(message);
	}
	else
	{
		document.sendForm.body.value = body;
		document.sendForm.email.value = emailAddress;
		document.sendForm.submit();
	}
}
