/*
  
*/

function checkRadios(formular){
  var cansend = false;

  for(var i=0; i<formular.elements.length; i++) {
    if (formular.elements[i].checked && formular.elements[i].type=='radio') cansend = true;
  }

  if (cansend==true) {
    return true;
  } else {
    alert('Dieses Mail kann nur abgesendet werden, wenn Sie Ihre Meinung abgegeben haben.');
    return false;
  }
}


function validateContact ( $array )
{
   var i = 0;
   var msg = '';
   for (i;i<$array.length;++i)
   {
     xname = $array[i]
     if (xname == 'Name') {msg += 'Bitte Name ausfüllen.\n';}
     if (xname == 'Firma') {msg += 'Bitte Firma ausfüllen.\n';}
     if (xname == 'Telefon') {msg += 'Bitte Telefon ausfüllen.\n';}
     if (xname == 'EMail') {msg += 'Bitte E-Mail ausfüllen.\n';}
   }
   alert(msg);
}

function validateGewinnspiel ( $array )
{
   var i = 0;
   var msg = '';
   for (i;i<$array.length;++i)
   {
     xname = $array[i]
     if (xname == 'Vorname') {msg += 'Bitte Vorname ausfüllen.\n';}
     if (xname == 'Nachname') {msg += 'Bitte Nachname ausfüllen.\n';}
     if (xname == 'StrasseHnr') {msg += 'Bitte Strasse, Hnr. ausfüllen.\n';}
     if (xname == 'PLZ') {msg += 'Bitte PLZ ausfüllen.\n';}
     if (xname == 'Ort') {msg += 'Bitte Ort ausfüllen.\n';}
     if (xname == 'Telefonnr') {msg += 'Bitte Telefonnr. ausfüllen.\n';}
     if (xname == 'EMail') {msg += 'Bitte E-Mail ausfüllen.\n';}
     if (xname == 'Geboren') {msg += 'Bitte "Ich bin vor 1989 geboren." akzeptieren.\n';}
   }
   alert(msg);
}

function addEmail2RecipientGewinnspiel()
{
  EMail = document.f_gewinnspiel.EMail.value;
  document.f_gewinnspiel.xfrm_recipient.value += ';'+EMail;
}

