


/* Komplette URL einf&uuml;gen */
function DateiLink()
        {
                DateiName = document.URL;
                document.write ('<nobr><a href="' + DateiName + '">' + DateiName + '</a></nobr>');
        }


/* Rollover Effekt - Funktion zum Austauschen der Bilder */
function BA(BILDNAME,QUELLE)
        {
                eval("window.document." + BILDNAME + ".src = " + QUELLE + ".src");
        }

/* Weiterleitung zum Anmeldeformular */
function weiter()
     {
       window.location.href = "http://www.amicalalpin.de/amical/anmeldeformular.php";
//       window.location.href = "http://www.kajotteff.de/amical/anmeldeformular.php";
     }

/* Weiterleitung zum Anmeldeformular englisch*/
function weitere()
     {
       window.location.href = "http://www.amicalalpin.de/amical/bookingform.php";
//       window.location.href = "http://www.kajotteff.de/amical/bookingform.php";
     }




function chkFormularDetail()
{
   if(document.frmDetail.vorname.value == ""){alert("Geben Sie bitte Ihren Vornamen ein!");document.frmDetail.vorname.focus();return false;}
   if(document.frmDetail.nachname.value == ""){alert("Geben Sie bitte Ihren Nachnamen ein!");document.frmDetail.nachname.focus();return false;}
   if(document.frmDetail.strasse.value == ""){alert("Geben Sie bitte Ihren Adresse ein!");document.frmDetail.strasse.focus();return false;}
   if(document.frmDetail.plz.value == ""){alert("Geben Sie bitte die Postleitzahl Ihres Wohnortes ein!");document.frmDetail.plz.focus();return false;}
   if(document.frmDetail.ort.value == ""){alert("Geben Sie bitte Ihren Wohnort ein!");document.frmDetail.ort.focus();return false;}

   if (document.frmDetail.vermittlung[0].checked == false &&
       document.frmDetail.vermittlung[1].checked == false &&
       document.frmDetail.vermittlung[2].checked == false &&
       document.frmDetail.vermittlung[3].checked == false &&
       document.frmDetail.vermittlung[4].checked == false &&
       document.frmDetail.vermittlung[5].checked == false)
       {alert("Bitte teilen Sie uns mit wie Sie uns gefunden haben!");return false;}

if (document.frmDetail.vermittlung[1].checked == true)
    if (document.frmDetail.empfehlung.value == ""){alert("Wer hat uns empfohlen?");document.frmDetail.empfehlung.focus();return false;}
if (document.frmDetail.vermittlung[2].checked == true)
    if (document.frmDetail.anzeige.value == ""){alert("Wo haben Sie die Anzeige gelesen?");document.frmDetail.anzeige.focus();return false;}
if (document.frmDetail.vermittlung[6].checked == true)
    if (document.frmDetail.anzeige.value == ""){alert("Wie?");document.frmDetail.anzeige.focus();return false;}

if(document.frmDetail.email.value == "")
   {
       check = confirm("Wollen Sie Ihre Email-Adresse eingeben?\n\nEmailadresse angeben --> 'OK' klicken\nKeine Emailadresse angeben --> 'Abbrechen' klicken");
       if (check == true) {document.frmDetail.email.focus();return false;} else {document.frmDetail.email.value = "keine Angabe";return true;}
   }

}


function chkFormular()
{
   if(document.frmDetail.vorname.value == ""){alert("Geben Sie bitte Ihren Vornamen ein!");document.frmDetail.vorname.focus();return false;}
   if(document.frmDetail.nachname.value == ""){alert("Geben Sie bitte Ihren Nachnamen ein!");document.frmDetail.nachname.focus();return false;}
   if(document.frmDetail.strasse.value == ""){alert("Geben Sie bitte Ihren Adresse ein!");document.frmDetail.strasse.focus();return false;}
   if(document.frmDetail.plz.value == ""){alert("Geben Sie bitte die Postleitzahl Ihres Wohnortes ein!");document.frmDetail.plz.focus();return false;}
   if(document.frmDetail.ort.value == ""){alert("Geben Sie bitte Ihren Wohnort ein!");document.frmDetail.ort.focus();return false;}


if(document.frmDetail.email.value == "")
   {
       check = confirm("Wollen Sie Ihre Email-Adresse eingeben?\n\nEmailadresse angeben --> 'OK' klicken\nKeine Emailadresse angeben --> 'Abbrechen' klicken");
       if (check == true) {document.frmDetail.email.focus();return false;} else {document.frmDetail.email.value = "keine Angabe";return true;}
   }

}


function checkMail(Adresse)
{
        var x = Adresse
        var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
        if (filter.test(x)) return true;
        else return false;
}



function checkReise()
  {
  //alert(document.formular.land.selectedIndex);
  if (document.formular.reisebedingungen.checked == false){alert("Sie m&uuml;ssen die Ckeckbox aktivieren, wenn Sie den Reisebedingungen zustimmen!");document.formular.reisebedingungen.focus();return false;}
  if (document.formular.tour.selectedIndex < 2){alert("W&auml;hlen Sie bitte Ihre gew&uuml;nschte Tour aus!");document.formular.tour.focus();return false;}
  if (document.formular.name.value == ""){alert("Geben Sie bitte Ihren Nachnamen ein!");document.formular.name.focus();return false;}
  if (document.formular.vorname.value == ""){alert("Geben Sie Bitte Ihren Vornamen ein!");document.formular.vorname.focus();return false;}
  if (document.formular.plz.value == ""){alert("Bitte geben Sie ihre Postleitzahl ein!");document.formular.plz.focus();return false;}
  if (document.formular.ort.value == ""){alert("Bitte geben Sie ihren Wohnort ein!");document.formular.ort.focus();return false;}
  if (document.formular.strasse.value == ""){alert("Bitte geben Sie ihre Adresse ein!");document.formular.strasse.focus();return false;}
  if (document.formular.telpriv.value == ""){alert("Bitte geben Sie ihre private Telefonnummer ein!");document.formular.telpriv.focus();return false;}
  if (document.formular.land.selectedIndex == 0 || document.formular.land.selectedIndex == 1 || document.formular.land.selectedIndex == 5){alert("Bitte wählen Sie Ihr Land aus ein!");document.formular.land.focus();return false;}
  if (document.formular.notfall.value == "" ){alert("Bitte geben Sie die Kontaktperson für den Notfall ein!!");document.formular.notfall.focus();return false;}

  
  }


function checkReiseE()
  {if (document.formular.reisebedingungen.checked == false){alert("Activate Checkbox if you agree with our Booking Conditions!");document.formular.reisebedingungen.focus();return false;}
  if (document.formular.tour.selectedIndex < 2){alert("Please choose your trip!");document.formular.tour.focus();return false;}
  if (document.formular.name.value == ""){alert("Your Name please!");document.formular.name.focus();return false;}
  if (document.formular.vorname.value == ""){alert("Your First Name please!");document.formular.vorname.focus();return false;}
  if (document.formular.plz.value == ""){alert("Zipcode is missing!");document.formular.plz.focus();return false;}
  if (document.formular.ort.value == ""){alert("Town is missing!");document.formular.ort.focus();return false;}
  if (document.formular.strasse.value == ""){alert("Your adress is missing!");document.formular.strasse.focus();return false;}
  if (document.formular.telpriv.value == ""){alert("Your phone number is missing!!");document.formular.telpriv.focus();return false;}
  if (document.formular.land.selectedIndex == 0 || document.formular.land.selectedIndex == 1 || document.formular.land.selectedIndex == 5){alert("Please select your country!");document.formular.land.focus();return false;}
  if (document.formular.notfall.value == "" ){alert("Contact person in case of emergency is missing!");document.formular.notfall.focus();return false;}
}


function checkBuying()
  {
        if (document.buy_info.paying_method_IdIn.value == "0013c4bdb1c641c9")
        {
                document.getElementById("zeige1").style.visibility = "visible";
                document.getElementById("zeige2").style.visibility = "visible";
                document.getElementById("zeige3").style.visibility = "visible";
        }
        else
        {
                document.getElementById("zeige1").style.visibility = "hidden";
                document.getElementById("zeige2").style.visibility = "hidden";
                document.getElementById("zeige3").style.visibility = "hidden";
        }

  }

function checkOrder()
  {
          if (document.buy_info.first_name.value == ""){alert("Geben Sie Bitte Ihren Vornamen ein!");document.buy_info.first_name.focus();return false;}
          if (document.buy_info.last_name.value == ""){alert("Geben Sie bitte Ihren Nachnamen ein!");document.buy_info.last_name.focus();return false;}
          if (document.buy_info.street_address.value == ""){alert("Bitte geben Sie Ihre Adresse ein!");document.buy_info.street_address.focus();return false;}
          if (document.buy_info.zip.value == ""){alert("Bitte geben Sie Ihre Postleitzahl ein!");document.buy_info.zip.focus();return false;}
          if (document.buy_info.city.value == ""){alert("Bitte geben Sie Ihren Wohnort ein!");document.buy_info.city.focus();return false;}
          if (document.buy_info.in_country.value == ""){alert("Bitte geben Sie Ihr Land an!");document.buy_info.in_country.focus();return false;}
          if (document.buy_info.email.value == ""){alert("Bitte geben Sie Ihre Email-Adresse ein!");document.buy_info.email.focus();return false;}
        if (document.buy_info.paying_method_IdIn.value == "0013c4bdb1c641c9")
        {
                if (document.buy_info.bank_name.value == ""){alert("Bitte geben Sie den Namen Ihrer Bank ein!");document.buy_info.bank_name.focus();return false;}
                if (document.buy_info.bank_code.value == ""){alert("Bitte geben Sie die Bankleitzahl ein!");document.buy_info.bank_code.focus();return false;}
                if (document.buy_info.bank_account.value == ""){alert("Bitte geben Sie Ihre Kontonummer ein  ein!");document.buy_info.bank_account.focus();return false;}

        }


  }

function bild(img_url, img_title, img_width, img_height)
{
        h_offset = 64;
        w_offset = 32;
          wnd = window.open("http://www.amical.de/amical/leer.html","Bild" + ZFZ(),"width=" + (img_width + w_offset) + ",height=" + (img_height + h_offset) +",innerWidth=" + (img_width + w_offset) + ",innerHeight=" + (img_height + h_offset) +",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,dependent=1");
//          wnd = window.open("http://www.kajotteff.de/amical/leer.html","Bild" + ZFZ(),"width=" + (img_width + w_offset) + ",height=" + (img_height + h_offset) +",innerWidth=" + (img_width + w_offset) + ",innerHeight=" + (img_height + h_offset) +",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,dependent=1");

        img_src = img_url;
        img_dim = "width=\"" + img_width + "\" height=\"" + img_height + "\" alt=\"" + img_title + "\"";

        with(wnd.document)
  {
        open("text/html");
        writeln("<html><head><title>AMICAL alpin</title>");
        writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.amicalalpin.de/scripts/amcss.css\">");
        writeln("<style type=\"text/css\"><!--");
        writeln("#bild{align:center; top:16px; left:16px; position:absolute; visibility:visible; z-index:2;}");
        writeln("#bald{align:center; top:50px; left:80px; position:absolute; visibility:visible; z-index:1;}");
        writeln("--></style>");
        writeln("</head><body background=\"http://www.amicalalpin.de/images/graphics/right.jpg\">");
        writeln("<div id=\"bald\"><img src=\"http://www.amicalalpin.de/images/graphics/bildladen.gif\" width=\"245\" height=\"84\" border=\"0\"></div>");
        writeln("<div id=\"bild\">");
        writeln("<table border=\"0\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"" + img_width + "\" height=\"" + img_height + "\">");
        writeln("<tr><td align=\"center\" valign=\"middle\">");
        writeln("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" background=\"" + img_src + "\" align=\"center\">");
        writeln("<tr><td><img src=\"http://www.amicalalpin.de/images/graphics/bild.gif\" " + img_dim + " border=\"0\"></td></tr></table></td></tr>");
        writeln("<tr><td class=\"footer\">" + img_title + "</td></tr>");
        writeln("<tr><td align=\"right\" valign=bottom height=\"30\"><form><input type=\"button\" value=\"Fenster schlie&szlig;en\" onclick=\"self.close()\"></form></td></tr>");
        writeln("</table></div></body></html>");
        close();
  }
  wnd.focus();
}

function ZFZ()
{
         zz = new Date();
         zfz = zz.getTime();
         return zfz;
}