// ###########################
//
// Javascipt di www.web2net.it
//
// versione:        1.0
// data:        18.01.2007
// autore:        Lukas Obletter
//
// info@web2net.it
//
// ############################

// barra di stato



function weitere_person_hinzufuegen()
{
      document.personen.warenkorb_weitere_person.value = 'p';
      document.personen.action = document.personen.action + 'page=1';
      pass_vars_javascript_to_php("p");
}

function datum_aendern()
{
      //alert("TESTTTT");
      document.personen.warenkorb_weitere_person.value = 'd';
      document.personen.action = document.personen.action + 'page=1';
      pass_vars_javascript_to_php("d");
}

//check if at least one boot, helmet or ski has been selected in all active persons
function check_helm_and_boots(){
var i=1;
  for(i=1;i<=10;i++){
    if((eval("document.personen.warenkorb_schuhe_" + i + ".checked") == true) || (eval("document.personen.warenkorb_helm_" + i + ".checked") == true) || document.personen.ski1.src != "http://www.gardena-ski.com/_my/ski_rent/include/products/img/ski_auswaehlen.gif"){
      return true;
    } else {
      return false;
    }
  }
}

function weiter_zur_bestaetigung(error_text)
{
    //continue only if at least one boot or helmet or ski has been selected
    if(check_helm_and_boots() == true) //default image
    {
      document.personen.warenkorb_weitere_person.value = 'w';
      document.personen.action = document.personen.action + 'page=2';
      pass_vars_javascript_to_php("w");
    } else
    {
      alert(error_text);
      
    }

}


function zurueck_zum_warenkorb()
{
    document.personen.warenkorb_weitere_person.value = 'z';
    document.personen.action = document.personen.action + 'page=1';
    document.personen.submit();

}



function weiter_zur_bezahlung()
{
    document.personen.warenkorb_weitere_person.value = 'b';
    document.personen.action = document.personen.action + 'page=3';
    document.personen.submit();

}

function zurueck_zur_bestaetigung()
{
    document.personen.warenkorb_weitere_person.value = 'w';
    document.personen.action = document.personen.action + 'page=2';
    pass_vars_javascript_to_php("w");

}

function person_loeschen(pers)
{
    document.personen.warenkorb_weitere_person.value = pers;
    document.personen.action = document.personen.action + 'page=1';
    pass_vars_javascript_to_php(pers);

}

function person_loeschen_vor_bestaetigung(pers)
{
    document.personen.warenkorb_weitere_person.value = pers;
    document.personen.action = document.personen.action + 'page=2';
    pass_vars_javascript_to_php(pers);

}

