//Basic AJAX script to assign the proper producer to selected project	
	function getXMLHTTPRequest() {
		var xRequest=null;
		if (window.XMLHttpRequest) {
			xRequest=new XMLHttpRequest();
		}else if (typeof ActiveXObject != "undefined"){
			xRequest=new ActiveXObject("Microsoft.XMLHTTP");
		}
		return xRequest;
	}	
	
	var http = getXMLHTTPRequest();	
		
	function sendRequest(id){	
	   http.open('get', '/integrator/ajax.php?id=' + id);
	   http.setRequestHeader("Content-type", "text/xml; charset=utf-8");	
	   http.onreadystatechange = handleRes;
	   http.send(null);    
	}
	
	function handleRes(){
		var update = new Array();
		if(http.readyState == 4){	    		    	
	    	var res = http.responseText;
	    	if(res.indexOf('<br>' != -1)){
            update = res.split('<br>');
         }
         emptyList();
        	updElem = document.getElementById('slctSpecificSource');    
         for(x=0;x<update.length-1;x++){
        		var elOptNew = document.createElement('option');
        		split = update[x].split(", ");
        		elOptNew.value = split[0];
    			elOptNew.text = split[1];		
    			if(update[x] != ""){	    				
	    			try {
				    updElem.add(elOptNew, null); // standards compliant; doesn't work in IE
				  	}
				  	catch(ex) {
				    updElem.add(elOptNew); // IE only
				  	}
				}
      	}
	   }	
	}
	
	function emptyList(){
		//Empy out the select box, start fresh each time
		var list = document.getElementById('slctSpecificSource');
		list.options.length=1;
	}	