function updateVisibleAmount() {
	
	var f = document.paypalform;
	var emplacement = f.emplacement.options[f.emplacement.selectedIndex].value;	
	var adultes = f.adultes.options[f.adultes.selectedIndex].value;
	var enfants = f.enfants.options[f.enfants.selectedIndex].value;
	var duree = f.duree.options[f.duree.selectedIndex].value;
	var locationMHB = f.locationMHB.options[f.locationMHB.selectedIndex].value;
	var semaines = f.semaines.options[f.semaines.selectedIndex].value;
	
	var tarif = 0.00; var total = 0.00; var tarif2 = 0.00; var total2 = 0.00; var bigtotal = 0.00;

	if (emplacement == 'Camping1velo') { tarif =  9.50 + (adultes * 5.20) + (enfants * 3.80); } 
	if (emplacement == 'Camping1auto') { tarif = 11.00 + (adultes * 5.20) + (enfants * 3.80); } 
	if (emplacement == 'Camping2velo') { tarif = 12.00 + (adultes * 5.20) + (enfants * 3.80); } 
	if (emplacement == 'Camping2auto') { tarif = 14.00 + (adultes * 5.20) + (enfants * 3.80); } 
	
	total = duree * tarif;
	
	if (total > 0)  { total = total + 10.00; } // assurance annulation
	
	//f.tarif.value = tarif;
	//f.total.value = total;
		
	if (locationMHB == 'Mobilehome') { tarif2 = 150.00 + 10.00; } 
	if (locationMHB == 'Bengali')    { tarif2 = 100.00 + 10.00; }
	
	total2 = semaines * tarif2;
	
	//f.tarif2.value = tarif2;
	//f.total2.value = total2;
	
	bigtotal = total + total2;
	if (bigtotal < 30.00 & bigtotal >0 ) { bigtotal = 30.00; }
	
	f.visibleamount.value = bigtotal;
	
	f.os0.value = emplacement  + ': ' + duree + ' jours à partir du ' + f.jour.value + ' ' + f.mois.value + ' Adultes: ' + f.adultes.value + ' Enfants: ' + f.enfants.value;
	f.os1.value = locationMHB + ': ' + semaines + ' semaines à partir du ' + f.jour.value + ' ' + f.mois.value;
}

function preprocess() {
	 
	var f = document.paypalform;
	var name = "contact"; var at = "@"; var url = "restaurantcamping"; var url2= ".com"; 
		
	f.business.value = name + at + url + url2; 
	f.amount.value = f.visibleamount.value;
}