		// --------------------------------------------------------------------
		// COMPANY:       ARTELIER MEDIA- GRAFIKDESIGN, 5020 SALZBURG
		// AUTHOR:        ORLANDO R. DEGEN
		// DATE CREATED:  May. 11. 2002	
		// MODIFIED BY: 
		// DATE MODIFIED: 
		// --------------------------------------------------------------------
		
		function checkFormAnfrageEn(){
			if (document.layers||document.getElementById||document.all)
				return valAnfrageEn()
			}
			
	/* ----------------------------------------------------------------------------------------------------------------*/

			var reNum				= /^[0-9\-]+$/;
			
			var reTelNr				= /^[0-9\ \-\(\)\+\/]+$/;
			
			var reMail				= /^.+@.+\..{2,3}$/;
			
			var reUrl				= /^[a-z0-9\.\:\-\/]+$/;
			
			var reMailIlleg			= /[\(\)\<\>\,\;\:\ \\\'\"\[\]\/]/;

			var reAlphaUp 			= /^[A-Z]+$/;

			var reAlphaFloat 		= /^[A-Za-z\.\ \-]+$/;

			var reAlphaFloatPlus	= /^[a-zA-Z\.\ \-\&\/]+$/;

			var reAlphaNumPlus 		= /^[A-Za-z0-9\.\ \-\&\/]+$/;
			
	/* ----------------------------------------------------------------------------------------------------------------*/
		function valAnfrageEn(thisForm) {

			thisForm = document.Anfrage

			
	/* ---------------------------------------------------------*/
			var requiredFields = new Array("Vorname",
										"Nachname",
										"Firma",
										"Adresse",
										"PLZ_Nummer",
										"Ort",
										"Staat",
										"Telefon",
										"email",
										"spam");

			var fieldNames = new Array("* First Name",
									"* Last Name",
									"* Company",
									"* Company Street",
									"* ZIP",
									"* City",
									"* Country",
									"* Phone-Nr",
									"* e-mail",
									"* SPAM");
									
		gesucht = ("First Name|Last Name|Company|Company Street|ZIP|City|Country|Phone|e-mail|SPAM");
			var fieldCheck   = true;
				var fieldsNeeded = "\nA value must be entered in the following field(s):\n\n\t";

		for(var fieldNum=0; fieldNum < requiredFields.length; fieldNum++) {
		if ((thisForm.elements[requiredFields[fieldNum]].value == "") || (thisForm.elements[requiredFields[fieldNum]].value == " ") ||
			(thisForm.elements[requiredFields[fieldNum]].value.match(gesucht)))
			{
		fieldsNeeded += fieldNames[fieldNum] + "\n\t";
			fieldCheck = false;
			}
		}
		if (fieldCheck == false)
		{
		alert(fieldsNeeded);
			return false;
		}
	/* ----------------------------------------------------------*/
    	var el = document.Anfrage.elements;
		for(var i = 0 ; i < el.length ; ++i) {
			if(el[i].type == "radio") {
			var radiogroup = el[el[i].name]; 					// get the whole set of radio buttons.
			var itemchecked = false;
		for(var j = 0 ; j < radiogroup.length ; ++j) {
			if(radiogroup[j].checked) {
				itemchecked = true;
				break;
			}
		}
			if(!itemchecked) { 
				alert("Please select your correct "+el[i].name+".");
			if(el[i].focus)
				el[i].focus();
				return false;
				}
			}
		}
	/* ----------------------------------------------------------*/
			var strTitel = thisForm.Titel.value;
			gesucht = ("Title");
		if ((strTitel.match(reAlphaFloat)) || (strTitel.match(gesucht)) || (strTitel == "")){
			testresult=true
		}else{
			alert("Please, enter only letters at 'Title'!\n")
			thisForm.Titel.focus();
		return false;
		}
		if(strTitel.match(gesucht)){
			thisForm.Titel.value="---";
		testresult = true;
		}
	/* ----------------------------------------------------------*/		
			var strVname = thisForm.Vorname.value;
			var filter = reAlphaFloat;
			
		if (strVname.match(filter)){
			testresult=true
		}else{
			alert("Please, enter only letters at 'First Name'!\n")
			thisForm.Vorname.focus();
		return false;
		}
	/* ----------------------------------------------------------*/
			var strNname = thisForm.Nachname.value;
			var filter = reAlphaFloat;
			
		if (strNname.match(filter)){
			testresult=true
		}else{
			alert("Please, enter only letters at 'Last Name'!\n")
			thisForm.Nachname.focus();
		return false;
		}
	/* ---------------------------------------------------------*/
			var strFirma = thisForm.Firma.value;
			var filter = reAlphaNumPlus;
			
		if (strFirma.match(filter)){
			testresult=true
		}else{
			alert("Please, enter only letters at 'Company'!\n")
			thisForm.Firma.focus();
		return false;
		}
	/* ----------------------------------------------------------*/
			var strFunktion = thisForm.Funktion.value;
			gesucht = ("Jobtitle");
			var filter = reAlphaNumPlus;
			
		if ((strFunktion.match(filter)) || (strFunktion.match(gesucht)) || (strFunktion == "")){
			testresult=true
		}else{
			alert("Please, enter only letters at 'Jobtitle'!\n")
			thisForm.Funktion.focus();
		return false;
		}
		if(strFunktion.match(gesucht)){
			thisForm.Funktion.value="----------";
		testresult = true;
		}
	/* ----------------------------------------------------------*/		
			var strStaat = thisForm.Staat.value;
			gesucht = ("Country");
			var filter = reAlphaFloat;
			
		if ((strStaat.match(filter)) || (strStaat.match(gesucht)) || (strStaat == "")){
			testresult=true
		}else{
			alert("Please, enter only letters at 'Country'!\n")
			thisForm.Staat.focus();
		return false;
		}
		if(strStaat.match(gesucht)){
			thisForm.Staat.value="----------";
		testresult = true;
		}
	/* --------------------------------------------------------*/	
			var strZipNr = thisForm.PLZ_Nummer.value;
		if (strZipNr.match(reNum)){
			testresult=true
		}else{
			alert("Please input a valid number at 'ZIP'!\n")
			thisForm.PLZ_Nummer.focus();
		return false;
		}
	/* ---------------------------------------------------------*/
			var strOrt = thisForm.Ort.value
			var filter = reAlphaFloatPlus;
		
		if (strOrt.match(filter)){
			testresult=true
		}else{
			alert("Please, enter only letters with dot, space, dash or slash at 'City'!\n")
			thisForm.Ort.focus();
		return false;
		}
	/* ---------------------------------------------------------*/
			var strAdr = thisForm.Adresse.value;
			var filter = reAlphaNumPlus;
			
		if (strAdr.match(filter)){
			testresult=true
		}else{
			alert("Please, enter only letters with dot, space, dash or slash at 'Company Street'!\n")
			thisForm.Adresse.focus();
		return false;
		}
	/* -------------------------------------------------------*/	
			var strTel = thisForm.Telefon.value;
		if (strTel.match(reTelNr)){
			testresult=true
		}else{
			alert("Please input a valid number at 'Phone-Nr'!\n(including space, (), +, / and -)\n")
			thisForm.Telefon.focus();
		return false;
		}
	/* ---------------------------------------------------------*/
			var strFax = thisForm.FaxNr.value;
			gesucht = ("Fax");
		if((strFax.match(gesucht)) || (strFax.match(reTelNr)) || (strFax == "")){
			testresult = true
		}else{
			alert("Please input a valid number at 'Fax-Nr'!\n(including space, (), +, / and -)\n")
			thisForm.FaxNr.focus();
		return false;
		}
		if(strFax.match(gesucht)){
			thisForm.FaxNr.value="----------";
		testresult = true;
		}
	/* ----------------------------------------------------------------------------------------------------------------*/		
			var max = 350	
			wert = thisForm.Kommentar.value.length;
		if (wert > max) {
			alert("Please restrain your input to 350 or less digits!");
			in_value = thisForm.Kommentar.value;
			out_value = in_value.substring(0,max-1);
			thisForm.Kommentar.value = out_value;
			thisForm.Kommentar.focus();
			return false;
		}
	/* ---------------------------------------------------------*/
			var strUrl = thisForm.Internet.value;
			gesucht = ("www| ");
		if((strUrl.match(reUrl)) || (strUrl.match(gesucht)) || (strUrl == "")){
			testresult = true
		}else{
			alert("Please type in your correct WWW-Address!\n\nOr let the field emty!")
			thisForm.Internet.focus();
		return false;
		}
		if((strUrl.match(gesucht)) || (strUrl == "")){
			thisForm.Internet.value="http://";
		testresult = true;
		}
	/* ---------------------------------------------------------*/		 
		 if(thisForm.Einverstaendnis.checked == false){
			alert("\nPlease check the box 'accept agreement' to continue");
					thisForm.Einverstaendnis.focus();
				return false;
		}
	/* ---------------------------------------------------------------------------------------------------------------*/
			var strMail = thisForm.email.value;
			
			if ((reMail.test(strMail)) && (!(strMail.match(reMailIlleg)))){
	//			return convertAnfrage();
				testresult=true;
			}else{
				alert("Please, enter a valid email address!")
					thisForm.email.focus();
					return false;
					}
	
	/* ----------------------------------------------------------------------------------------------------------------*/
			var strSPAM = thisForm.spam.value;
			var strRand = thisForm.rand.value;
			if (strSPAM != strRand) {
				alert("The SPAM protection entries do not match with each other")
				thisForm.spam.focus();
				return false;
				}				
	
				}
	/* ----------------------------------------------------------------------------------------------------------------*/
		function ResetCheck(){
			
			chk = confirm("\nDo you want to delete all inputs?");
			
			if (chk == true) location.reload();
		}
	/* ----------------------------------------------------------------------------------------------------------------*/		
		function countText(what){
			formcontents=what.form.Kommentar.value;
			what.form.displaycounter.value=formcontents.length;
		}
