
// Wechseln der Button-Bilder
function changeBtn(elem,pic,col) {
  if(document.all)
  {
    document.all(elem).style.backgroundImage=pic;
    document.all(elem).style.backgroundColor=col;
  }
  else if(document.getElementById)
  {
    document.getElementById(elem).style.backgroundImage=pic;
    document.getElementById(elem).style.backgroundColor=col;
  }
}

function check_form(sLanguage)
{
  error 		= false;
  NotFilled = '';

  if (sLanguage == 'DE') {
  	NotFilled = "Bitte füllen Sie diese Felder aus: \n \n";
  }
  else {
  	NotFilled = "Please fullfill these fields: \n \n";
  }

  if (document.bookform.Name.value == "") {
    error = true;
    if (sLanguage == 'DE') {
    	NotFilled = NotFilled + " Name \n";
    }
    else {
			NotFilled = NotFilled + " name \n";
    }
  }
  if (document.bookform.Vorname.value == "") {
    error = true;
    if (sLanguage == 'DE') {
    	NotFilled = NotFilled + " Vorname \n";
    }
    else {
			NotFilled = NotFilled + " first name \n";
    }
  }
  if (document.bookform.Anrede.selectedIndex == 0) {
    error = true;
    if (sLanguage == 'DE') {
    	NotFilled = NotFilled + " Anrede \n";
    }
    else {
			NotFilled = NotFilled + " title \n";
    }
  }
  if (document.bookform.Email.value == "") {
    error = true;
    if (sLanguage == 'DE') {
    	NotFilled = NotFilled + " Email \n";
    }
    else {
			NotFilled = NotFilled + " Email \n";
    }
  }
  if (document.bookform.Land.value == "") {
    error = true;
    if (sLanguage == 'DE') {
    	NotFilled = NotFilled + " Land \n";
    }
    else {
			NotFilled = NotFilled + " country \n";
    }
  }
  if (document.bookform.Apartment[0].checked == false &&
      document.bookform.Apartment[1].checked == false &&
      document.bookform.Apartment[2].checked == false &&
      document.bookform.Apartment[3].checked == false) {
    error = true;
    if (sLanguage == 'DE') {
    	NotFilled = NotFilled + " Appartement \n";
    }
    else {
			NotFilled = NotFilled + " apartment \n";
    }
  }
  if (document.bookform.Apartment.value == "") {
    error = true;
    if (sLanguage == 'DE') {
    	NotFilled = NotFilled + " Appartement \n";
    }
    else {
			NotFilled = NotFilled + " apartment \n";
    }
  }
  if (document.bookform.Personen.value == "") {
    error = true;
    if (sLanguage == 'DE') {
    	NotFilled = NotFilled + " Anzahl der Personen \n";
    }
    else {
			NotFilled = NotFilled + " number of persons \n";
    }
  }

  if (error == true) {
    alert(NotFilled);
  }
  else {
    document.bookform.submit();
  }
}