
function ShowPersonalData() { 
  $('panePersonalData').style.display="block"; 
  myFx = new Fx.Scroll(window,{offset:{'x': 0,'y': -100}}).toElement('panePersonalData');
} 


function HidePersonalData() { 
  $('panePersonalData').style.display="none"; 
  $("paneFinal").style.display="none";
  $("paneSubmitted").style.display="none";
} 

function CheckPersonalDataForm() { 
   if (form_submit(document.getElementById("personaldataformulier"))) {
      ShowFinalPane()
   } 
   else {
      HideFinalPane()
   } 
}

function HideFinalPane() {
   $("paneFinal").style.display="none";
   HideSubmittedPane();
}


function ShowFinalPane() {
   $("paneFinal").style.display="block";
   myFx = new Fx.Scroll(window,{offset:{'x': 0,'y': -100}}).toElement('paneFinal');
   if ($('personen').value == "")
      $('personen').value = $('prefPersonen').value
   BerekenTotaalbedrag();      
   $('finalArrName').innerHTML = selectedArrName + " - "+schema.actualDuration.getValue()+" uur";
   //$('finalArrDuration').innerHTML = schema.actualDuration.getValue();
   $('finalArrPrice').innerHTML = "&euro;"+schema.actualPrice.getValueAsString();

   if (selectedExtras.extras.getLength() > 0) {
      extraList ="";  
      selectedExtras.extras.each(function(extra,ndx) { 
         extraList += extra.name+"<br/>";
      });
      $('finalExtras').innerHTML = extraList; 

   } 
   else {
      $('finalExtras').innerHTML = "geen"; 
   } 
   $('finalTotalPricepp').innerHTML = "&euro;"+AsValutaStr(schema.actualPrice.getValue() + extrasPrice.getValue());
   
   myFx = new Fx.Scroll(window,{offset:{'x': 0,'y': -100}}).toElement('paneFinal');
}

function BerekenTotaalbedrag() { 
   if (parseInt($('personen').value) > 0)
      $('finalTotalPrice').innerHTML = "&euro;"+AsValutaStr(parseInt($('personen').value) * (schema.actualPrice.getValue() + extrasPrice.getValue()))
   else 
      $('finalTotalPrice').innerHTML = "&euro;";
} 


function HideSubmittedPane() {
   $("paneSubmitted").style.display="none";
}

function ShowSubmittedPane() {
   $("paneSubmitted").style.display="block";
   myFx = new Fx.Scroll(window,{offset:{'x': 0,'y': -100}}).toElement('paneSubmitted');

}

