<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
function format_number(nbr)
{
nbr = fct_round(nbr, -2)
if (nbr.length)
{
	dec = nbr.substring(0,nbr.indexOf('.'));
	dec_length = dec.length ;
	if (dec_length > 3)
	 dec = dec.substring(0,dec_length-3)+' '+dec.substring(dec_length-3,dec_length);  
	 
	return dec +','+ nbr.substring(nbr.indexOf('.')+1,nbr.length)

}
else
return nbr ;
}
function fct_round(nombre, nbchiffres)
{
if (nbchiffres == 1) return Math.round(nombre);

if (typeof(nombre) == "string") 
	if (nombre.indexOf(",") != -1) 
		nombre = nombre.substring(0,nombre.indexOf(",")) + "." + nombre.substring(nombre.indexOf(",") + 1,nombre.length)

nombre = Math.round(nombre/Math.pow(10,nbchiffres))* Math.pow(10,nbchiffres);

nombre = nombre + "";
if (nombre.indexOf(".")!= -1) 
	if (nombre.length - nombre.indexOf(".") > Math.abs(nbchiffres) + 1)
		nombre = nombre.substring(0,nombre.indexOf(".") + Math.abs(nbchiffres) + 1);

if (nbchiffres < 0)
{
	if (nombre.indexOf(".") == -1) nombre = nombre + ".";
	if (nombre.indexOf(".") == 0) nombre = "0" + nombre;
	while (Math.abs(nbchiffres) - (nombre.length - nombre.indexOf(".")) > -1)
		nombre = nombre + "0";
}
return nombre;
}

function fct_total(Lst_fi_1,Lst_fi_2,Lst_fi_3,Lst_fi_4,Lst_dinner_1,Lst_dinner_2,Lst_dinner_3,Lst_dinner_4,radio_hotel,Lst_jour,Lst_h_s_1,Lst_h_d_1,Lst_h_s_2,Lst_h_d_2,Lst_h_s_3,Lst_h_d_3,Lst_h_s_4,Lst_h_d_4,Lst_h_s_5,Lst_h_d_5,Lst_h_s_6,Lst_h_d_6,Lst_h_s_7,Lst_h_d_7,Lst_h_s_8,Lst_h_d_8,Lst_h_s_9,Lst_h_d_9,radio_circuit,radio_circuit_2,Lst_cir_s_1,Lst_cir_s_2,Lst_cir_s_3,Lst_cir_s_4,Lst_cir_s_5,Lst_cir_s_6,Lst_cir_s_7,Lst_cir_db_1,Lst_cir_sg_1,Lst_cir_db_2,Lst_cir_sg_2,Lst_cir_db_3,Lst_cir_sg_3,Lst_cir_db_4,Lst_cir_sg_4,Lst_cir_db_5,Lst_cir_sg_5,Lst_cir_db_6,Lst_cir_sg_6,Lst_cir_db_7,Lst_cir_sg_7,Lst_cir_db_8,Lst_cir_sg_8,Lst_cir_db_9,Lst_cir_sg_9)
{
frais_insc = 0;
frais_insc_shop = 0;
hot = 0;
hot_cc = 0;
cir = 0;
exc = 0;
total = 0; 
circuit_1= 0; 
circuit_2= 0; 

nbr_members_type_1 = parseInt(Lst_fi_1[Lst_fi_1.selectedIndex].value);
nbr_members_type_2 = parseInt(Lst_fi_2[Lst_fi_2.selectedIndex].value);
nbr_members_type_3 = parseInt(Lst_fi_3[Lst_fi_3.selectedIndex].value);
nbr_members_type_4 = parseInt(Lst_fi_4[Lst_fi_4.selectedIndex].value);

nbr_dinner_1 = parseInt(Lst_dinner_1[Lst_dinner_1.selectedIndex].value);
nbr_dinner_2 = parseInt(Lst_dinner_2[Lst_dinner_2.selectedIndex].value);
nbr_dinner_3 = parseInt(Lst_dinner_3[Lst_dinner_3.selectedIndex].value);
nbr_dinner_4 = parseInt(Lst_dinner_4[Lst_dinner_4.selectedIndex].value);

prix_frais_insc_1 = 150;
prix_frais_insc_2 = 200;
prix_frais_insc_3 = 100;

prix_frais_insc_4 = 100;
prix_frais_insc_gala = 70;
nbr_dinner = nbr_dinner_1 + nbr_dinner_2 + nbr_dinner_3 + nbr_dinner_4 

//African members 
if (nbr_dinner >= 0)
	{
	frais_insc_diner = (nbr_dinner * 70);
	}
if (nbr_members_type_1 >= 0)
	{
	frais_insc_1 = (nbr_members_type_1 * prix_frais_insc_1);
	}
if (nbr_members_type_2 >= 0)
	{
	frais_insc_2 = (nbr_members_type_2 * prix_frais_insc_2);
	}
if (nbr_members_type_3 >= 0)
	{
	frais_insc_3 = (nbr_members_type_3 * prix_frais_insc_3);
	}
if (nbr_members_type_4 >= 0)
	{
	frais_insc_4 = (nbr_members_type_4 * prix_frais_insc_4);
	}
	
frais_insc = frais_insc_diner + frais_insc_1 + frais_insc_2 + frais_insc_3 + frais_insc_4;

nb_nuit 	= parseInt(Lst_jour[Lst_jour.selectedIndex].value);
for(i=0;i<9;i++)
	{
		if (document.fr_wv.radio_hotel[i].checked)
		{
			ID_HOTEL = document.fr_wv.radio_hotel[i].value;
			
			if (ID_HOTEL == 'T3105')
			{
				nb_ch_dbl = parseInt(Lst_h_d_1[Lst_h_d_1.selectedIndex].value);
				nb_ch_sgl = parseInt(Lst_h_s_1[Lst_h_s_1.selectedIndex].value);
				hot = hot + (90.00 * nb_nuit * nb_ch_dbl);
				hot = hot + (65.00 * nb_nuit * nb_ch_sgl);			
			}

			if (ID_HOTEL == 'T3095')
			{
				nb_ch_db2 = parseInt(Lst_h_d_2[Lst_h_d_2.selectedIndex].value);
				nb_ch_sg2 = parseInt(Lst_h_s_2[Lst_h_s_2.selectedIndex].value);
				hot = hot + (80.00 * nb_nuit * nb_ch_db2);
				hot = hot + (55.00 * nb_nuit * nb_ch_sg2);			
			}

			if (ID_HOTEL == 'T3096')
			{
				nb_ch_db3 = parseInt(Lst_h_d_3[Lst_h_d_3.selectedIndex].value);
				nb_ch_sg3 = parseInt(Lst_h_s_3[Lst_h_s_3.selectedIndex].value);
				hot = hot + (76.00 * nb_nuit * nb_ch_db3);
				hot = hot + (52.00 * nb_nuit * nb_ch_sg3);			
			}

			if (ID_HOTEL == 'T3098')
			{
				nb_ch_db4 = parseInt(Lst_h_d_4[Lst_h_d_4.selectedIndex].value);
				nb_ch_sg4 = parseInt(Lst_h_s_4[Lst_h_s_4.selectedIndex].value);
				hot = hot + (90.00 * nb_nuit * nb_ch_db4);
				hot = hot + (60.00 * nb_nuit * nb_ch_sg4);			
			}

			if (ID_HOTEL == 'T3099')
			{
				nb_ch_db5 = parseInt(Lst_h_d_5[Lst_h_d_5.selectedIndex].value);
				nb_ch_sg5 = parseInt(Lst_h_s_5[Lst_h_s_5.selectedIndex].value);
				hot = hot + (90.00 * nb_nuit * nb_ch_db5);
				hot = hot + (60.00 * nb_nuit * nb_ch_sg5);			
			}

			if (ID_HOTEL == 'T3158')
			{
				nb_ch_db6 = parseInt(Lst_h_d_6[Lst_h_d_6.selectedIndex].value);
				nb_ch_sg6 = parseInt(Lst_h_s_6[Lst_h_s_6.selectedIndex].value);
				hot = hot + (68.00 * nb_nuit * nb_ch_db6);
				hot = hot + (45.00 * nb_nuit * nb_ch_sg6);			
			}

			if (ID_HOTEL == 'T3100')
			{
				nb_ch_db7 = parseInt(Lst_h_d_7[Lst_h_d_7.selectedIndex].value);
				nb_ch_sg7 = parseInt(Lst_h_s_7[Lst_h_s_7.selectedIndex].value);
				hot = hot + (60.00 * nb_nuit * nb_ch_db7);
				hot = hot + (40.00 * nb_nuit * nb_ch_sg7);			
			}

			if (ID_HOTEL == 'T3101')
			{
				nb_ch_db8 = parseInt(Lst_h_d_8[Lst_h_d_8.selectedIndex].value);
				nb_ch_sg8 = parseInt(Lst_h_s_8[Lst_h_s_8.selectedIndex].value);
				hot = hot + (70.00 * nb_nuit * nb_ch_db8);
				hot = hot + (45.00 * nb_nuit * nb_ch_sg8);			
			}

			if (ID_HOTEL == 'T3102')
			{
				nb_ch_db9 = parseInt(Lst_h_d_9[Lst_h_d_9.selectedIndex].value);
				nb_ch_sg9 = parseInt(Lst_h_s_9[Lst_h_s_9.selectedIndex].value);
				hot = hot + (70.00 * nb_nuit * nb_ch_db9);
				hot = hot + (45.00 * nb_nuit * nb_ch_sg9);			
			}

		}
	}
	
for(j=0;j<7;j++)
	{
		if (document.fr_wv.radio_circuit[j].checked)
		{
			ID_CIRCUIT_1 = document.fr_wv.radio_circuit[j].value;
			
			if (ID_CIRCUIT_1 == 'T3071')
			{
				nb_ch_sl = parseInt(Lst_cir_s_1[Lst_cir_s_1.selectedIndex].value);
				circuit_1 = (25.00 * nb_ch_sl);
			}
			
			if (ID_CIRCUIT_1 == 'T3072')
			{
				nb_ch_s2 = parseInt(Lst_cir_s_2[Lst_cir_s_2.selectedIndex].value);
				circuit_1 = (25.00 * nb_ch_s2);
			}
			
			if (ID_CIRCUIT_1 == 'T3075')
			{
				nb_ch_s3 = parseInt(Lst_cir_s_3[Lst_cir_s_3.selectedIndex].value);
				circuit_1 = (38.00 * nb_ch_s3);
			}
			
			if (ID_CIRCUIT_1 == 'T3076')
			{
				nb_ch_s4 = parseInt(Lst_cir_s_4[Lst_cir_s_4.selectedIndex].value);
				circuit_1 = (35.00 * nb_ch_s4);
			}
			
			if (ID_CIRCUIT_1 == 'T3077')
			{
				nb_ch_s5 = parseInt(Lst_cir_s_5[Lst_cir_s_5.selectedIndex].value);
				circuit_1 = (64.00 * nb_ch_s5);
			}
			
			if (ID_CIRCUIT_1 == 'T3078')
			{
				nb_ch_s6 = parseInt(Lst_cir_s_6[Lst_cir_s_6.selectedIndex].value);
				circuit_1 = (35.00 * nb_ch_s6);
			}
			
			if (ID_CIRCUIT_1 == 'T3079')
			{
				nb_ch_s7 = parseInt(Lst_cir_s_7[Lst_cir_s_7.selectedIndex].value);
				circuit_1 = (40.00 * nb_ch_s7);
			}
		}
	}
for(k=0;k<9;k++)
	{
	if (document.fr_wv.radio_circuit_2[k].checked)
		{
			ID_CIRCUIT_2 = document.fr_wv.radio_circuit_2[k].value;
			
			if (ID_CIRCUIT_2 == 'T3080')
			{
				nb_cir_db_l = parseInt(Lst_cir_db_1[Lst_cir_db_1.selectedIndex].value);
				nb_cir_sg_1 = parseInt(Lst_cir_sg_1[Lst_cir_sg_1.selectedIndex].value);
				circuit_2 = (115.00 * nb_cir_db_l) + (135.00 * nb_cir_sg_1);
			}
			
			if (ID_CIRCUIT_2 == 'T3081')
			{
				nb_cir_db_2 = parseInt(Lst_cir_db_2[Lst_cir_db_2.selectedIndex].value);
				nb_cir_sg_2 = parseInt(Lst_cir_sg_2[Lst_cir_sg_2.selectedIndex].value);
				circuit_2 = (120.00 * nb_cir_db_2) + (135.00 * nb_cir_sg_2);
			}
			
			if (ID_CIRCUIT_2 == 'T3082')
			{
				nb_cir_db_3 = parseInt(Lst_cir_db_3[Lst_cir_db_3.selectedIndex].value);
				nb_cir_sg_3 = parseInt(Lst_cir_sg_3[Lst_cir_sg_3.selectedIndex].value);
				circuit_2 = (180.00 * nb_cir_db_3) + (206.00 * nb_cir_sg_3);
			}
			
			if (ID_CIRCUIT_2 == 'T3083')
			{
				nb_cir_db_4 = parseInt(Lst_cir_db_4[Lst_cir_db_4.selectedIndex].value);
				nb_cir_sg_4 = parseInt(Lst_cir_sg_4[Lst_cir_sg_4.selectedIndex].value);
				circuit_2 = (505.00 * nb_cir_db_4) + (555.00 * nb_cir_sg_4);
			}
			
			if (ID_CIRCUIT_2 == 'T3084')
			{
				nb_cir_db_5 = parseInt(Lst_cir_db_5[Lst_cir_db_5.selectedIndex].value);
				nb_cir_sg_5 = parseInt(Lst_cir_sg_5[Lst_cir_sg_5.selectedIndex].value);
				circuit_2 = (240.00 * nb_cir_db_5) + (290.00 * nb_cir_sg_5);
			}
			
			if (ID_CIRCUIT_2 == 'T3085')
			{
				nb_cir_db_6 = parseInt(Lst_cir_db_6[Lst_cir_db_6.selectedIndex].value);
				nb_cir_sg_6 = parseInt(Lst_cir_sg_6[Lst_cir_sg_6.selectedIndex].value);
				circuit_2 = (380.00 * nb_cir_db_6) + (440.00 * nb_cir_sg_6);
			}
			
			if (ID_CIRCUIT_2 == 'T3086')
			{
				nb_cir_db_7 = parseInt(Lst_cir_db_7[Lst_cir_db_7.selectedIndex].value);
				nb_cir_sg_7 = parseInt(Lst_cir_sg_7[Lst_cir_sg_7.selectedIndex].value);
				circuit_2 = (545.00 * nb_cir_db_7) + (627.00 * nb_cir_sg_7);
			}
			
			if (ID_CIRCUIT_2 == 'T3087')
			{
				nb_cir_db_8 = parseInt(Lst_cir_db_8[Lst_cir_db_8.selectedIndex].value);
				nb_cir_sg_8 = parseInt(Lst_cir_sg_8[Lst_cir_sg_8.selectedIndex].value);
				circuit_2 = (600.00 * nb_cir_db_8) + (690.00 * nb_cir_sg_8);
			}
			
			if (ID_CIRCUIT_2 == 'T3088')
			{
				nb_cir_db_9 = parseInt(Lst_cir_db_9[Lst_cir_db_9.selectedIndex].value);
				nb_cir_sg_9 = parseInt(Lst_cir_sg_9[Lst_cir_sg_9.selectedIndex].value);
				circuit_2 = (710.00 * nb_cir_db_9) + (812.00 * nb_cir_sg_9);
			}
			
		}
	}

total = frais_insc + hot + circuit_1 + circuit_2;


hot = hot_cc + hot;
hot = format_number(hot);
total = format_number(total);
frais_insc = format_number(frais_insc);
frais_insc_shop = format_number(frais_insc_shop);
cir = format_number(circuit_1);
exc = format_number(circuit_2);

MM_setTextOfLayer('inscri','',frais_insc+' €');
MM_setTextOfLayer('inscri_shop','',frais_insc_shop+' €');
MM_setTextOfLayer('hotel','',hot+' €');
MM_setTextOfLayer('circuit','',cir+' €');
MM_setTextOfLayer('excursion','',exc+' €');
MM_setTextOfLayer('totale','',total+' €');
}


function fct_controle(Lst_fi_1,Lst_fi_2,Lst_fi_3,Lst_fi_4,Lst_dinner_1,Lst_dinner_2,Lst_dinner_3,Lst_dinner_4,radio_hotel,Lst_jour,Lst_h_s_1,Lst_h_d_1,Lst_h_s_2,Lst_h_d_2,Lst_h_s_3,Lst_h_d_3,Lst_h_s_4,Lst_h_d_4,Lst_h_s_5,Lst_h_d_5,Lst_h_s_6,Lst_h_d_6,Lst_h_s_7,Lst_h_d_7,Lst_h_s_8,Lst_h_d_8,Lst_h_s_9,Lst_h_d_9,radio_circuit,radio_circuit_2,Lst_cir_s_1,Lst_cir_s_2,Lst_cir_s_3,Lst_cir_s_4,Lst_cir_s_5,Lst_cir_s_6,Lst_cir_s_7,Lst_cir_db_1,Lst_cir_sg_1,Lst_cir_db_2,Lst_cir_sg_2,Lst_cir_db_3,Lst_cir_sg_3,Lst_cir_db_4,Lst_cir_sg_4,Lst_cir_db_5,Lst_cir_sg_5,Lst_cir_db_6,Lst_cir_sg_6,Lst_cir_db_7,Lst_cir_sg_7,Lst_cir_db_8,Lst_cir_sg_8,Lst_cir_db_9,Lst_cir_sg_9)
{

	if (fr_wv.surname.value == "")
		{
		alert ("You have to fill this field : Surname")
		fr_wv.surname.focus()
		}
	else	
	if (fr_wv.FirstName.value == "")
		{
		alert ("You have to fill this field : First Name")
		fr_wv.FirstName.focus()
		}
	else 
	if ((document.fr_wv.title[0].checked == false) && (document.fr_wv.title[1].checked == false) && (document.fr_wv.title[2].checked == false) && (document.fr_wv.title[3].checked == false) && (document.fr_wv.title[4].checked == false) )
		{
		alert ("You have to fill this field : Title")
		}
	else 
	if (fr_wv.MailingAdress.value == "")
		{
		alert ("You have to fill this field : Mailing Adress")
		fr_wv.MailingAdress.focus()
		}
	else 
	if (fr_wv.institute.value == "")
		{
		alert ("You have to fill this field : Institute")
		fr_wv.institute.focus()
		}
	else 
	if (fr_wv.numero.value == "")
		{
		alert ("You have to fill this field : Numero")
		fr_wv.numero.focus()
		}
	else 
	if (fr_wv.Street.value == "")
		{
		alert ("You have to fill this field : Street")
		fr_wv.Street.focus()
		}
	else 
	if (fr_wv.City.value == "")
		{
		alert ("You have to fill this field : City")
		fr_wv.City.focus()
		}
	else 
	if (fr_wv.PostalCode.value == "")
		{
		alert ("You have to fill this field : Postal Code")
		fr_wv.PostalCode.focus()
		}
	else 
	if (fr_wv.Country.value == "")
		{
		alert ("You have to fill this field : Country")
		fr_wv.Country.focus()
		}
	else 
	if (fr_wv.Phone_Number.value == "")
		{
		alert ("You have to fill this field : Phone Number")
		fr_wv.Phone_Number.focus()
		}
	else 
	if (fr_wv.Fax_Number.value == "")
		{
		alert ("You have to fill this field : Fax Number")
		fr_wv.Fax_Number.focus()
		}
	else 
	if (fr_wv.email.value == "")
		{
		alert ("You have to fill this field : Email")
		fr_wv.email.focus()
		}
	else 
	if (fr_wv.password.value == "")
		{
		alert ("You have to fill this field : Password")
		fr_wv.password.focus()
		}
	else
	if (((document.fr_wv.radio_circuit[0].checked == true) || (document.fr_wv.radio_circuit[1].checked == true) || (document.fr_wv.radio_circuit[2].checked == true) || (document.fr_wv.radio_circuit[3].checked == true) || (document.fr_wv.radio_circuit[4].checked == true) || (document.fr_wv.radio_circuit[5].checked == true) || (document.fr_wv.radio_circuit[6].checked == true) ) && (fr_wv.Lst_date_arr_1.value == 0))
		{
		alert ("Choose your date for your Daily tours")
		fr_wv.Lst_date_arr_1.focus()
		}
	else	
	if (((document.fr_wv.radio_circuit_2[0].checked == true) || (document.fr_wv.radio_circuit_2[1].checked == true) || (document.fr_wv.radio_circuit_2[2].checked == true) || (document.fr_wv.radio_circuit_2[3].checked == true) || (document.fr_wv.radio_circuit_2[4].checked == true) || (document.fr_wv.radio_circuit_2[5].checked == true) || (document.fr_wv.radio_circuit_2[6].checked == true)  || (document.fr_wv.radio_circuit_2[7].checked == true)  || (document.fr_wv.radio_circuit_2[8].checked == true) ) && (fr_wv.Lst_date_arr_2.value == 0))
		{
		alert ("Choose your date for your Pre and post congress")
		fr_wv.Lst_date_arr_2.focus()
		}
	else
		{
		//alert("ok");
		document.fr_wv.submit();
		}
}

function resete()
{
document.fr_wv.reset()
MM_setTextOfLayer('inscri','',0+' €');
MM_setTextOfLayer('inscri_shop','',0+' €');
MM_setTextOfLayer('hotel','',0+' €');
MM_setTextOfLayer('circuit','',0+' €');
MM_setTextOfLayer('excursion','',0+' €');
MM_setTextOfLayer('totale','',0+' €');
}