			function numeric(num) { 
				if (num.value.search(/[A-Za-z]/) != -1){
					alert("la chaîne contient un caractère alphabétique");
					num.value = "";
					}
			}
			
			function show() {
				var calcul = window.document.getElementById('calcul');
				var aff = window.document.getElementById('aff');
				var cac = window.document.getElementById('cac');
				calcul.style.visibility = "visible";
				calcul.style.display = "block";
				aff.style.visibility = "hidden";
				aff.style.display = "none";
				cac.style.visibility = "visible";
				cac.style.display = "block";
			}
			function hide() {
				var calcul = window.document.getElementById('calcul');
				var aff = window.document.getElementById('aff');
				var cac = window.document.getElementById('cac');
				calcul.style.visibility = "hidden";
				calcul.style.display = "none";
				cac.style.visibility = "hidden";
				cac.style.display = "none";
				aff.style.visibility = "visible";
				aff.style.display = "block";
			}
			
			function envoieRequete(url,id)
			{
				var xhr_object = null;
				var position = id;
				var Np2 = window.document.getElementById('Np').value;
				var sigma2 = window.document.getElementById('sigma').value;
				var ly2 = window.document.getElementById('ly').value;
				var lz2 = window.document.getElementById('lz').value;
				var profile2 = window.document.getElementById('profile').value;
				
				if ((sigma2.length>0)&&(ly2.length>0)&&(lz2.length>0))
				{
				if(window.XMLHttpRequest) // Firefox et autres
				   xhr_object = new XMLHttpRequest(); 
				else if(window.ActiveXObject){ // Internet Explorer 
					try {
				        xhr_object = new ActiveXObject("Msxml2.XMLHTTP");
				    } catch (e) {
				        xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
				    }
				} else { // XMLHttpRequest non supporté par le navigateur 
				   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
				   xhr_object = false; 
				}
				
					// On ouvre la requete vers la page désirée
					xhr_object.open("POST", 'resultats.php', true);
					
					xhr_object.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
					//xhr_object.setRequestHeader("Content-Type", "text/html; charset=iso-8859-1");
					xhr_object.onreadystatechange = function(){
					if ( xhr_object.readyState == 4 )
					{
						// j'affiche dans la DIV spécifiées le contenu retourné par le fichier
						document.getElementById(position).innerHTML = xhr_object.responseText;
						window.document.getElementById('load').style.visibility = "hidden";
						window.document.getElementById('load').style.display = "none";
						return hide();
					}
					else
					{
					   // attendre...
						window.document.getElementById('load').style.visibility = "visible";
						window.document.getElementById('load').style.display = "block";
					}
				}
				// dans le cas du post envoi des variables
				xhr_object.send("Np="+Np2+"&sigma="+sigma2+"&ly="+ly2+"&lz="+lz2+"&profile="+profile2);
				
			}
				
			}
			
			