// JavaScript Document
function ajaxFunction(a,s)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
else
  {
  alert("Your browser does not support XMLHTTP!");
  }
xmlhttp.onreadystatechange=function()
{

if(xmlhttp.readyState==4)
  {

  arr=eval(xmlhttp.responseText);
  drop(arr,s)	

  }
}
xmlhttp.open("GET","prise_de.php?id="+a ,true);
xmlhttp.send(null);
}

function opremove(selectbox)
{
var selectboxId	=	document.getElementById(selectbox);
var i;
var f=selectboxId.options.length;
for(i=0;i<f-1;i++)
{
selectboxId.remove(1);
}
}

    function drop(arr,s)
	{
		for(i=0;i<arr.length;i++)
		{
			var selectBox = document.getElementById(s);
			var option = document.createElement('option');
			option.text = arr[i+1];
			option.value=arr[i];
			i++
			try 
			{
			selectBox.add(option,null); 
			} 
			catch (e) {
			selectBox.add(option);      
			}
		}    
	}


