/* is called with <input type="text" onKeyup="this.value=withoutNonZipcodeCharacters(this.value)" (...) > */
var notAlertedYet = true;
function withoutNonZipcodeCharacters(text) {
   textWithout = text.replace(/[^\d]/gim,"");
   if (notAlertedYet && text != textWithout) {
     alert("The German zip code is numeric with 5 digits. (non-digit characters are deleted)");
     notAlertedYet = false;
   }
   return textWithout;
}
/* is called with <form onsubmit="return alertOnEmptyValue(this.datafieldname.value, 'text');" (...) > */
function alertOnEmptyValue(value, text) {
  if (value != '') {
    return true;
  } else {
    alert (text);
    return false;
  }
}

