function checkForm(form){
	if (typeof(form.elements['plzlist']) != 'undefined'){
		parWERT = form.elements['plzlist'].value;
	} else if (typeof(form.elements['countrylist']) != 'undefined'){
		parWERT = form.elements['countrylist'].value;
	} else if (typeof(form.elements['ublist']) != 'undefined') {
		parWERT = form.elements['ublist'].value;
	} else {
		form.submit();
		return false;
	}
	dummy = MB_GetFlashData(parWERT);
	return false;
}

function MB_GetFlashData(parUB,parLANG,parMAP,parART,parWERT) {
	myform = document.getElementById('contacts_form');
	if(parUB == 'lookup'){
		param = parWERT;
	} else {
		param = parUB;
	}
	varname='flash_lookup_'+param;
	if (typeof(window[varname]) != 'undefined' && param != ''){
		target = eval(varname);
	} else {
		target = param;
	}
	if (target != ''){
		if (target.substr(0,5) == 'LINK:'){
			location.href = target.substr(5);
		} else if(typeof(myform['plzlist']) != 'undefined') {
			if (target == 'IRL'){ // HACK!
				// alert('hallo');
				myform['countrylist'].value = 'IE';
				myform['plzlist'].value = 'IRL';
			} else {
				myform['plzlist'].value = target;
			}
			myform.submit();
		} else if(typeof(myform['countrylist']) != 'undefined'){
			myform['countrylist'].value = target;
			myform.submit();
		} else if(typeof(myform['ublist']) != 'undefined'){
			myform['ublist'].value = target;
			myform.submit();
		}
	} else {
		alert(contacts_message_empty);
	}
}

function TG_formcheck() {
	if ((document.suche.parPLZ.value=="")) {
		alert("Bitte machen Sie eine Eingabe im Feld 'PLZ'");
		document.suche.parPLZ.select();
		document.suche.parPLZ.focus();
		return false;
	}
	if (document.suche.parPLZ.value!="") {
		var pset=0;
		for (i=0;i<document.suche.parPLZ.value.length;++i) {
			if ((document.suche.parPLZ.value.charAt(i)<"0")||(document.suche.parPLZ.value.charAt(i)>"9")) {
					pset++;
			}
		}
		if (pset>0) {
			alert("Fehlerhafte Eingabe im Feld 'PLZ'");
			document.suche.parPLZ.select();
			document.suche.parPLZ.focus();
			return false;
		}
	}
}