// Javascript Document //

function CapOutajaxFunction(dowhat) {
	dowhat = '/files/documents/about/fas/current-college-projects/fas-capital-outlay-output.php?'+dowhat;

	var xmlHttp;
	try {
	// Firefox, Opera 8.0+, Safari
	xmlHttp=new XMLHttpRequest();
	}
	catch (e) {
	// Internet Explorer
		try {
		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
			alert("Your browser does not support AJAX!");
			return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			var myTxt = xmlHttp.responseText;
			document.getElementById("cap-out-cont").innerHTML = myTxt;
		}
		else if(document.getElementById("capital-outlay") && document.getElementById("fas-loading-gif")) {
			if(document.getElementById("projecttext")) {
				document.getElementById("capital-outlay").removeChild(document.getElementById("projecttext"));
			}
			document.getElementById("capital-outlay").style.backgroundImage = "url('"+document.getElementById("fas-loading-gif").src+"')";
		}
	}
	xmlHttp.open("GET",dowhat,true);
	xmlHttp.send(null);
	return true;
}

function changeproject(what) {
	var wa = what.split('?');
	what = wa.pop();
	//alert(what);
	CapOutajaxFunction(what);
	return false;
}