function pageheight() {
	//This function is used to determine how many ads can be served on the page
	var y = 0;
	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight
	if (test1 > test2) // all but Explorer Mac
	{
		y = document.body.scrollHeight;
	}
	else // Explorer Mac;
		 //would also work in Explorer 6 Strict, Mozilla and Safari
	{
		y = document.body.offsetHeight;
	}
	return (y - 550);
}

function get_ads() {
	//Start the AJAX Connection
	var xmlhttp = false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
		}
	}
	if (!xmlhttp && typeof XMLHttpRequest != 'undefinded') { xmlhttp = new XMLHttpRequest(); }
			
	//Do the inquiry and update the DIV	
	var server_page = "inc_left_ads.php?height="+pageheight();
	var obj = document.getElementById("ads");
	xmlhttp.open("GET",server_page);
	xmlhttp.onreadystatechange = function() {
		obj.innerHTML = xmlhttp.responseText;
		if (xmlhttp.readyState == 4) {
			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
}