var http11 = createRequestObject();

function handleHttpResponse11() {
  if (http11.readyState == 4) {
    response = http11.responseText;
	arrValori = response.split("||");
          document.getElementById("compl").options.length=1;       
          for(i=0;i<arrValori.length;i++)
          {
			  if (arrValori[i].split("|")[1] != '' && arrValori[i].split("|")[0] != '') {
         document.getElementById("compl").options[document.getElementById("compl").options.length] = new Option(arrValori[i].split("|")[1],arrValori[i].split("|")[0]);
			  }
          }
   }
}

function complesso_ajax(value) {
  http11.open('POST', '_lib/complesso_ajax.php', true);
  http11.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  http11.onreadystatechange = handleHttpResponse11;
  http11.send("tipolo="+value);
}
