/* permet d'afficher la liste des département en fonction du pays séléctionné */
function affichageRegionDepartement(p_pays,p_region,p_departement) {
		if (p_pays == 'France') {
				afficherRegionFrance(p_region,p_departement);					
		} else if (p_pays == 'Belgique') {
				afficherRegionBelgique(p_region,p_departement);					
		} else{
			 var retourReg = "<input type='hidden' value='' name='region'>N/C";
				document.getElementById('reg').innerHTML=retourReg;
				var retourDept = "<input type='hidden' value='' name='departement'>N/C";
				document.getElementById('dept').innerHTML=retourDept;
		}
}


/*
 *
 *  FRANCE
 *
 */


/* permet d'afficher les régions de la france */
function afficherRegionFrance(p_region,p_departement) {
	  var retour = '<select name="region" onchange="javascript:afficherDepartementFrance(this.value,\''+p_departement+'\');"><option value="">S&eacute;lectionnez</option>;';
	  retour+='<option value="Alsace"'; if(p_region=='Alsace') retour+='selected'; retour+='>Alsace</option>';
	  retour+='<option value="Aquitaine"'; if(p_region=='Aquitaine') retour+='selected'; retour+='>Aquitaine</option>';
	  retour+='<option value="Auvergne"'; if(p_region=='Auvergne') retour+='selected'; retour+='>Auvergne</option>';
	  retour+='<option value="Basse Normandie"'; if(p_region=='Basse Normandie') retour+='selected'; retour+='>Basse Normandie</option>';
	  retour+='<option value="Bourgogne"'; if(p_region=='Bourgogne') retour+='selected'; retour+='>Bourgogne</option>';
	  retour+='<option value="Bretagne"'; if(p_region=='Bretagne') retour+='selected'; retour+='>Bretagne</option>';
	  retour+='<option value="Centre"'; if(p_region=='Centre') retour+='selected'; retour+='>Centre</option>';
	  retour+='<option value="Champagne - Ardenne"'; if(p_region=='Champagne - Ardenne') retour+='selected'; retour+='>Champagne - Ardenne</option>';
	  retour+='<option value="Corse"'; if(p_region=='Corse') retour+='selected'; retour+='>Corse</option>';
	  retour+='<option value="Franche Comté"'; if(p_region=='Franche Comté') retour+='selected'; retour+='>Franche Comté</option>';
	  retour+='<option value="Haute Normandie"'; if(p_region=='Haute Normandie') retour+='selected'; retour+='>Haute Normandie</option>';
	  retour+='<option value="Ile de France"'; if(p_region=='Ile de France') retour+='selected'; retour+='>Ile de France</option>';
	  retour+='<option value="Languedoc Roussillon"'; if(p_region=='Languedoc Roussillon') retour+='selected'; retour+='>Languedoc Roussillon</option>';
	  retour+='<option value="Limousin"'; if(p_region=='Limousin') retour+='selected'; retour+='>Limousin</option>';
	  retour+='<option value="Lorraine"'; if(p_region=='Lorraine') retour+='selected'; retour+='>Lorraine</option>';
	  retour+='<option value="Midi Pyrénées"'; if(p_region=='Midi Pyrénées') retour+='selected'; retour+='>Midi Pyrénées</option>';
	  retour+='<option value="Nord - Pas de Calais"'; if(p_region=='Nord - Pas de Calais') retour+='selected'; retour+='>Nord - Pas de Calais</option>';
	  retour+='<option value="Pays de la Loire"'; if(p_region=='Pays de la Loire') retour+='selected'; retour+='>Pays de la Loire</option>';
	  retour+='<option value="Picardie"'; if(p_region=='Picardie') retour+='selected'; retour+='>Picardie</option>';
		retour+='<option value="Poitou - Charente"'; if(p_region=='Poitou - Charente') retour+='selected'; retour+='>Poitou - Charente</option>';
		retour+='<option value="Provence Alpes Cote d\'azur"'; if(p_region=='Provence Alpes Cote d\'azur') retour+='selected'; retour+='>Provence Alpes Cote d\'azur</option>';
		retour+='<option value="Rhone Alpes"'; if(p_region=='Rhone Alpes') retour+='selected'; retour+='>Rhone Alpes</option>';
		retour+='<option value="Dom Tom"'; if(p_region=='Dom Tom') retour+='selected'; retour+='>Dom Tom</option>';
		retour+='</select>';
	  document.getElementById('reg').innerHTML=retour;
}


/* permet d'afficher les département de la france */
function afficherDepartementFrance(p_region, p_departement) {
	  var retour = '<select name="departement"><option value="">S&eacute;lectionnez</option>;';
	
		if (p_region == "Alsace") {
				retour+='<option value="67"'; if(p_departement=='67') retour+='selected'; retour+='>67 - Bas-Rhin</option>';
				retour+='<option value="68"'; if(p_departement=='68') retour+='selected'; retour+='>68 - Haut-Rhin</option>';			
		} else if (p_region == "Aquitaine") { 
			  retour+='<option value="24"'; if(p_departement=='24') retour+='selected'; retour+='>24 - Dordogne</option>';
			  retour+='<option value="33"'; if(p_departement=='33') retour+='selected'; retour+='>33 - Gironde</option>';
			  retour+='<option value="40"'; if(p_departement=='40') retour+='selected'; retour+='>40 - Landes</option>';
			  retour+='<option value="47"'; if(p_departement=='47') retour+='selected'; retour+='>47 - Lot-et-Garonne</option>';
			  retour+='<option value="64"'; if(p_departement=='64') retour+='selected'; retour+='>64 - Pyrénées-Atlantiques</option>';
	 } else if (p_region == "Auvergne") { 
	 		  retour+='<option value="03"'; if(p_departement=='03') retour+='selected'; retour+='>03 - Allier</option>';
	 	  	retour+='<option value="15"'; if(p_departement=='15') retour+='selected'; retour+='>15 - Cantal</option>';
	 			retour+='<option value="43"'; if(p_departement=='43') retour+='selected'; retour+='>43 - Haute-Loire</option>';
	 			retour+='<option value="63"'; if(p_departement=='63') retour+='selected'; retour+='>63 - Puy-de-Dôme</option>';
	 } else if (p_region == "Basse Normandie") {
	 			retour+='<option value="14"'; if(p_departement=='14') retour+='selected'; retour+='>14 - Calvados</option>';
	 			retour+='<option value="50"'; if(p_departement=='50') retour+='selected'; retour+='>50 - Manche</option>';
	 	    retour+='<option value="61"'; if(p_departement=='61') retour+='selected'; retour+='>61 - Orne</option>';
	 } else if (p_region == "Bourgogne") {
	 	    retour+='<option value="21"'; if(p_departement=='21') retour+='selected'; retour+='>21 - Côte-d\'Or</option>';
	 	    retour+='<option value="58"'; if(p_departement=='58') retour+='selected'; retour+='>58 - Nièvre</option>';
	 			retour+='<option value="71"'; if(p_departement=='71') retour+='selected'; retour+='>71 - Saône-et-Loire</option>';
	 			retour+='<option value="89"'; if(p_departement=='89') retour+='selected'; retour+='>89 - Yonne</option>';
	 } else if (p_region == "Bretagne") {
	 			retour+='<option value="22"'; if(p_departement=='22') retour+='selected'; retour+='>22 - Côte-d\'Armor</option>';
	 			retour+='<option value="29"'; if(p_departement=='29') retour+='selected'; retour+='>29 - Finistère</option>';
	 			retour+='<option value="35"'; if(p_departement=='35') retour+='selected'; retour+='>35 - Ille-et-Vilaine</option>';
	 			retour+='<option value="56"'; if(p_departement=='56') retour+='selected'; retour+='>56 - Morbihan</option>';
	 } else if (p_region == "Centre") {
	 			retour+='<option value="18"'; if(p_departement=='18') retour+='selected'; retour+='>18 - Cher</option>';
	 		  retour+='<option value="28"'; if(p_departement=='28') retour+='selected'; retour+='>28 - Eure-et-Loir</option>';
	 		  retour+='<option value="36"'; if(p_departement=='36') retour+='selected'; retour+='>36 - Indre</option>';
	 		  retour+='<option value="37"'; if(p_departement=='37') retour+='selected'; retour+='>37 - Indre-et-Loire</option>';
	 		  retour+='<option value="41"'; if(p_departement=='41') retour+='selected'; retour+='>41 - Loir-et-Cher</option>';
	 		  retour+='<option value="45"'; if(p_departement=='45') retour+='selected'; retour+='>45 - Loiret</option>';
	 } else if (p_region == "Champagne - Ardenne") {
	 			retour+='<option value="08"'; if(p_departement=='08') retour+='selected'; retour+='>08 - Ardennes</option>';
	 			retour+='<option value="10"'; if(p_departement=='10') retour+='selected'; retour+='>10 - Aube</option>';
	 			retour+='<option value="51"'; if(p_departement=='51') retour+='selected'; retour+='>51 - Marne</option>';
				retour+='<option value="52"'; if(p_departement=='52') retour+='selected'; retour+='>52 - Haute-Marne</option>';
	 } else if (p_region == "Corse") {
	  	  retour+='<option value="20"'; if(p_departement=='20') retour+='selected'; retour+='>20 - Corse</option>';
	 } else if (p_region == "Franche Comté") {
	 	    retour+='<option value="25"'; if(p_departement=='25') retour+='selected'; retour+='>25 - Doubs</option>';
	 	    retour+='<option value="39"'; if(p_departement=='39') retour+='selected'; retour+='>39 - Jura</option>';
	 	    retour+='<option value="70"'; if(p_departement=='70') retour+='selected'; retour+='>70 - Haute-Saône</option>';
	 	    retour+='<option value="90"'; if(p_departement=='90') retour+='selected'; retour+='>90 - Territoire-de-Belfort</option>';
	 } else if (p_region == "Haute Normandie") {
	 			retour+='<option value="27"'; if(p_departement=='27') retour+='selected'; retour+='>27 - Eure</option>';
	 			retour+='<option value="76"'; if(p_departement=='76') retour+='selected'; retour+='>76 - Seine-Maritime</option>';
	 } else if (p_region == "Ile de France") {
	 			retour+='<option value="75"'; if(p_departement=='75') retour+='selected'; retour+='>75 - Paris</option>';
				retour+='<option value="77"'; if(p_departement=='77') retour+='selected'; retour+='>77 - Seine-et-Marne</option>';
	 			retour+='<option value="78"'; if(p_departement=='78') retour+='selected'; retour+='>78 - Yvelines</option>';
	 			retour+='<option value="91"'; if(p_departement=='91') retour+='selected'; retour+='>91 - Essonne</option>';
				retour+='<option value="92"'; if(p_departement=='92') retour+='selected'; retour+='>92 - Hauts-de-Seine</option>';
				retour+='<option value="93"'; if(p_departement=='93') retour+='selected'; retour+='>93 - Seine-Saint-Denis</option>';
				retour+='<option value="94"'; if(p_departement=='94') retour+='selected'; retour+='>94 - Val-de-Marne</option>';
				retour+='<option value="95"'; if(p_departement=='95') retour+='selected'; retour+='>95 - Val-d\'Oise</option>';
	 } else if (p_region == "Languedoc Roussillon") {
	 		  retour+='<option value="11"'; if(p_departement=='11') retour+='selected'; retour+='>11 - Aude</option>';
	 		  retour+='<option value="30"'; if(p_departement=='30') retour+='selected'; retour+='>30 - Gard</option>';
	 			retour+='<option value="34"'; if(p_departement=='34') retour+='selected'; retour+='>34 - Hérault</option>';
	 			retour+='<option value="48"'; if(p_departement=='48') retour+='selected'; retour+='>48 - Lozère</option>';
	 			retour+='<option value="66"'; if(p_departement=='66') retour+='selected'; retour+='>66 - Pyrénées-Orientales</option>';
	 } else if (p_region == "Limousin") {
	 			retour+='<option value="19"'; if(p_departement=='19') retour+='selected'; retour+='>19 - Corrèze</option>';
	 			retour+='<option value="23"'; if(p_departement=='23') retour+='selected'; retour+='>23 - Creuse</option>';
	 			retour+='<option value="87"'; if(p_departement=='87') retour+='selected'; retour+='>87 - Haute-Vienne</option>';
	 } else if (p_region == "Lorraine") {
	 			retour+='<option value="54"'; if(p_departement=='54') retour+='selected'; retour+='>54 - Meurthe-et-Moselle</option>';
				retour+='<option value="55"'; if(p_departement=='55') retour+='selected'; retour+='>55 - Meuse</option>';
				retour+='<option value="57"'; if(p_departement=='57') retour+='selected'; retour+='>57 - Moselle</option>';
				retour+='<option value="88"'; if(p_departement=='88') retour+='selected'; retour+='>88 - Vosges</option>';
	 } else if (p_region == "Midi Pyrénées") {		
				retour+='<option value="09"'; if(p_departement=='09') retour+='selected'; retour+='>09 - Ariège</option>';
				retour+='<option value="12"'; if(p_departement=='12') retour+='selected'; retour+='>12 - Aveyron</option>';
				retour+='<option value="31"'; if(p_departement=='31') retour+='selected'; retour+='>31 - Haute-Garonne</option>';
				retour+='<option value="32"'; if(p_departement=='32') retour+='selected'; retour+='>32 - Gers</option>';
				retour+='<option value="46"'; if(p_departement=='46') retour+='selected'; retour+='>46 - Lot</option>';
				retour+='<option value="65"'; if(p_departement=='65') retour+='selected'; retour+='>65 - Hautes-Pyrénées</option>';
				retour+='<option value="81"'; if(p_departement=='81') retour+='selected'; retour+='>81 - Tarn</option>';
				retour+='<option value="82"'; if(p_departement=='82') retour+='selected'; retour+='>82 - Tarn-et-Garonne</option>';
	 } else if (p_region == "Nord - Pas de Calais") {
				retour+='<option value="59"'; if(p_departement=='59') retour+='selected'; retour+='>59 - Nord</option>';
				retour+='<option value="62"'; if(p_departement=='62') retour+='selected'; retour+='>62 - Pas-de-Calais</option>';
	 } else if (p_region == "Pays de la Loire") {
				retour+='<option value="44"'; if(p_departement=='44') retour+='selected'; retour+='>44 - Loire-Atlantique</option>';
				retour+='<option value="49"'; if(p_departement=='49') retour+='selected'; retour+='>49 - Maine-et-Loire</option>';
				retour+='<option value="53"'; if(p_departement=='53') retour+='selected'; retour+='>53 - Mayenne</option>';
				retour+='<option value="72"'; if(p_departement=='72') retour+='selected'; retour+='>72 - Sarthe</option>';
				retour+='<option value="85"'; if(p_departement=='85') retour+='selected'; retour+='>85 - Vendée</option>';
	 } else if (p_region == "Picardie") {
	 			retour+='<option value="02"'; if(p_departement=='02') retour+='selected'; retour+='>02 - Aisne</option>';
	 			retour+='<option value="60"'; if(p_departement=='60') retour+='selected'; retour+='>60 - Oise</option>';
	 			retour+='<option value="80"'; if(p_departement=='80') retour+='selected'; retour+='>80 - Somme</option>';
	 } else if (p_region == "Poitou - Charente") { 
	 			retour+='<option value="16"'; if(p_departement=='16') retour+='selected'; retour+='>16 - Charente</option>';
				retour+='<option value="17"'; if(p_departement=='17') retour+='selected'; retour+='>17 - Charente-Maritime</option>';
				retour+='<option value="79"'; if(p_departement=='79') retour+='selected'; retour+='>79 - Deux-Sèvres</option>';
	 			retour+='<option value="86"'; if(p_departement=='86') retour+='selected'; retour+='>86 - Vienne</option>';
	 } else if (p_region == "Provence Alpes Cote d\'azur") {
	 			retour+='<option value="04"'; if(p_departement=='04') retour+='selected'; retour+='>04 - Alpes-de-Haute-Provence</option>';
				retour+='<option value="05"'; if(p_departement=='05') retour+='selected'; retour+='>05 - Hautes-Alpes</option>';
				retour+='<option value="06"'; if(p_departement=='06') retour+='selected'; retour+='>06 - Alpes-Maritimes</option>';
				retour+='<option value="13"'; if(p_departement=='13') retour+='selected'; retour+='>13 - Bouches-du-Rhône</option>';
	 			retour+='<option value="83"'; if(p_departement=='83') retour+='selected'; retour+='>83 - Var</option>';
				retour+='<option value="84"'; if(p_departement=='84') retour+='selected'; retour+='>84 - Vaucluse</option>';
	 } else if (p_region == "Rhone Alpes") {
	 			retour+='<option value="01"'; if(p_departement=='01') retour+='selected'; retour+='>01 - Ain</option>';
	 			retour+='<option value="07"'; if(p_departement=='07') retour+='selected'; retour+='>07 - Ardèche</option>';
	 			retour+='<option value="26"'; if(p_departement=='26') retour+='selected'; retour+='>26 - Drôme</option>';
	 		  retour+='<option value="38"'; if(p_departement=='38') retour+='selected'; retour+='>38 - Isère</option>';
				retour+='<option value="42"'; if(p_departement=='42') retour+='selected'; retour+='>42 - Loire</option>';
				retour+='<option value="69"'; if(p_departement=='69') retour+='selected'; retour+='>69 - Rhône</option>';
				retour+='<option value="73"'; if(p_departement=='73') retour+='selected'; retour+='>73 - Savoie</option>';
				retour+='<option value="74"'; if(p_departement=='74') retour+='selected'; retour+='>74 - Haute-Savoie</option>';
	 } else if (p_region == "Dom Tom") {		
				retour+='<option value="971"'; if(p_departement=='971') retour+='selected'; retour+='>971 - Guadeloupe</option>';
				retour+='<option value="972"'; if(p_departement=='972') retour+='selected'; retour+='>972 - Martinique</option>';
				retour+='<option value="973"'; if(p_departement=='973') retour+='selected'; retour+='>973 - Guyane</option>';
				retour+='<option value="974"'; if(p_departement=='974') retour+='selected'; retour+='>974 - La Réunion</option>';
				retour+='<option value="975"'; if(p_departement=='975') retour+='selected'; retour+='>975 - Saint-Pierre-et-Miquelon</option>';
				retour+='<option value="976"'; if(p_departement=='976') retour+='selected'; retour+='>976 - Mayotte</option>';
				retour+='<option value="984"'; if(p_departement=='984') retour+='selected'; retour+='>984 - Terres Australes et Antarctiques</option>';
				retour+='<option value="986"'; if(p_departement=='986') retour+='selected'; retour+='>986 - Wallis et Futuna</option>';
				retour+='<option value="987"'; if(p_departement=='987') retour+='selected'; retour+='>987 - Polynésie Française</option>';
				retour+='<option value="988"'; if(p_departement=='988') retour+='selected'; retour+='>988 - Nouvelle-Calédonie</option>';	
	 }
	 
	 retour+='</select>';
	 document.getElementById('dept').innerHTML=retour;
}


/*
 *
 *  BELGIQUE
 *
 */

/* permet d'afficher les régions de la belgique */
function afficherRegionBelgique(p_region,p_departement) {
	  var retour = '<select name="region" onchange="javascript:afficherDepartementBelgique(this.value,\''+p_departement+'\');"><option value="">S&eacute;lectionnez</option>;';
	  retour+='<option value="Flamande"'; if(p_region=='Flamande') retour+='selected'; retour+='>Flamande</option>';
	  retour+='<option value="Wallonne"'; if(p_region=='Wallonne') retour+='selected'; retour+='>Wallonne</option>';
	  retour+='<option value="Bruxelles"'; if(p_region=='Bruxelles') retour+='selected'; retour+='>Bruxelles</option>';
		retour+='</select>';
	  document.getElementById('reg').innerHTML=retour;
}


/* permet d'afficher les provinces de la belgique */
function afficherDepartementBelgique(p_region, p_departement) {
	  var retour = '<select name="departement"><option value="">S&eacute;lectionnez</option>;';
	
		if (p_region == "Flamande") {
				retour+='<option value="VWV"'; if(p_departement=='VWV') retour+='selected'; retour+='>VWV - Flandre  Occidentale</option>';
				retour+='<option value="VOV"'; if(p_departement=='VOV') retour+='selected'; retour+='>VOV - Flandre Orientale</option>';		
	 	  		retour+='<option value="VAN"'; if(p_departement=='VAN') retour+='selected'; retour+='>VAN - Anvers</option>';
	 			retour+='<option value="VLI"'; if(p_departement=='VLI') retour+='selected'; retour+='>VLI - Limbourg</option>';
	 			retour+='<option value="VBR"'; if(p_departement=='VBR') retour+='selected'; retour+='>VBR - Brabant Flamant</option>';					
		} else if (p_region == "Wallonne") { 
			  retour+='<option value="WHT"'; if(p_departement=='WHT') retour+='selected'; retour+='>WHT - Hainaut</option>';
			  retour+='<option value="WBR"'; if(p_departement=='WBR') retour+='selected'; retour+='>WBR - Brabant Wallon</option>';
			  retour+='<option value="WNA"'; if(p_departement=='WNA') retour+='selected'; retour+='>WNA - Namur</option>';
			  retour+='<option value="WLX"'; if(p_departement=='WLX') retour+='selected'; retour+='>WLX - Luxembourg</option>';
			  retour+='<option value="WLG"'; if(p_departement=='WLG') retour+='selected'; retour+='>WLG - Liège</option>';
	 } else if (p_region == "Bruxelles") { 
	 		  retour+='<option value="BBB"'; if(p_departement=='BBB') retour+='selected'; retour+='>BBB - Bruxelles</option>';
	 }
	 
	 retour+='</select>';
	 document.getElementById('dept').innerHTML=retour;
}



