// JavaScript Document
function setLieferdatenActive() {

  document.my_addr.adresse_liefer_wie_oben.checked = false;
  document.img1.src = "images/mussfeld.gif";
  document.img2.src = "images/mussfeld.gif";
  document.img3.src = "images/mussfeld.gif";
  document.img4.src = "images/mussfeld.gif";
  document.img5.src = "images/mussfeld.gif";

  return true;
}

function toggleLieferdatenActive() {

  if(document.my_addr.adresse_liefer_wie_oben.checked == false) {
    document.img1.src = "images/mussfeld.gif";
    document.img2.src = "images/mussfeld.gif";
    document.img3.src = "images/mussfeld.gif";
    document.img4.src = "images/mussfeld.gif";
    document.img5.src = "images/mussfeld.gif";
  } else {
    document.img1.src = "images/mussfeld_ggf.gif";
    document.img2.src = "images/mussfeld_ggf.gif";
    document.img3.src = "images/mussfeld_ggf.gif";
    document.img4.src = "images/mussfeld_ggf.gif";
    document.img5.src = "images/mussfeld_ggf.gif";
	
    document.my_addr.anrede_liefer.checked = false;		// scheint bei Radio-Button nicht zu gehen
    document.my_addr.vorname_liefer.value = '';
    document.my_addr.nachname_liefer.value = '';
    document.my_addr.firmenname_liefer.value = '';
    document.my_addr.strasse_liefer.value = '';
    document.my_addr.plz_liefer.value = '';
    document.my_addr.ort_liefer.value = '';
  }

  return true;
}

function toggleAgb() {
  if(document.bestellen.agb_confirm.checked == true) {
    document.bestellen.submit4.disabled = '';
  } else {
    document.bestellen.submit4.disabled = 'true';
  }

  return true;
}

function setPutInWako(uebergabe) {
  document.in_wako.put_in_wako.value = uebergabe;
  this.form.submit();

  return true;
}

function mergeEmail (mailuser,mprovider) { 
  // ergibt den String "mailto:<user>@<domain>"
  // den Link setzen: <a href="javascript:;" onclick="mergeEmail('<mailuser>','<mprovider>')">
  var mtotal='mailto:' + mailuser + String.fromCharCode(64) + mprovider;
  document.location.href = mtotal;
}
