function createRequestObject(){
	var request_o; //declare the variable to hold the object.
	var browser = navigator.appName; //find the browser name
	if(browser == "Microsoft Internet Explorer"){
		/* Create the object using MSIE's method */
		request_o = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		/* Create the object using other browser's method */
		request_o = new XMLHttpRequest();
	}
	return request_o; //return the object
}

/* You can get more specific with version information by using 
	parseInt(navigator.appVersion)
	Which will extract an integer value containing the version 
	of the browser being used.
*/

/* The variable http will hold our new XMLHttpRequest object. */
var http = createRequestObject(); 

function getBreederURL(breederId)
{
	http.open('get', '/internal_request.php?action=getBreederUrl&id='+breederId);
	http.onreadystatechange = handleBreederUrl;
	http.send(null);
	
}


function handleBreederUrl(){
	if(http.readyState == 4){ //Finished loading the response
		/* We have got the response from the server-side script,
			let's see just what it was. using the responseText property of 
			the XMLHttpRequest object. */
		var response = http.responseText;
		var urlDiv = document.getElementById('breederUrlDiv');
		urlDiv.innerHTML = response;
		//setTimeout("urlDiv.innerText='Delayed Insert';",1500);
		//urlDiv.innerText="Hello there...";
	}
		
}
