
//bloque certains champs selon le choix
function activity_change(value) {
	document.form.idactivity.disabled=true;
	switch (value){
		case '0': document.form.idactivity.disabled=false; break;
	}
}
function appliarea_change(value) {
	document.form.idappliarea.disabled=true;
	switch (value){
		case '0': document.form.idappliarea.disabled=false; break;
	}
}

//Affiche/masque 
function show(value){
	document.getElementById(value).style.display ='block';
	document.getElementById("btn"+value).style.borderBottom = 'solid white 1px';
	document.getElementById("btn"+value).style.background = 'white';
	switch (value){
		case '2010': 
			document.getElementById('2011').style.display ='none';
			document.getElementById("btn2011").style.borderBottom = 'solid grey 1px';
			document.getElementById("btn2011").style.background = 'lightgrey';
			//document.getElementById(value).style.color = 'white';
			break;
		case '2011': 
			document.getElementById('2010').style.display ='none';
			document.getElementById("btn2010").style.borderBottom = 'solid grey 1px';
			document.getElementById("btn2010").style.background = 'lightgrey';
			break;
	}	
}

//duplique la saisie dans les champs identiques
function duplicate(id) {
	//document.getElementById("invoice_"+id).value=document.getElementById("main_"+id).value;
}
function duplicate1(id) {
	//document.getElementById("invoice_"+id).value=document.getElementById(id).value;
}
function duplicate2(id) {
	if (document.getElementById(id+'01').value==""){
		document.getElementById(id+'01').value=document.getElementById("main_"+id).value;
	}
}

//calcule le coût total d'inscription au training
function calcul_training() {
	var total;
	//calcul du montant total
/*	var nb=document.form.nb_inscription.value;
	if (document.form.company_type.value=='Industrial') {
		total=nb*500;
		document.form.total_workshop.value=total;
	}
	if (document.form.company_type.value=='Academic') {
		total=nb*300;
		document.form.total_workshop.value=total;
	}
*/
	
	//cas particulier : un workshop gratuit
/*	if (document.form.workshop.value=='Munchen-2010-11-18') {
		total='0 (FREE)';
		document.form.total_workshop.value=total;
	}
*/
	
	//cas particulier : tous les workshops gratuits
	total='0 (FREE)';
	document.form.total_workshop.value=total;

}

