I'm having some trouble trying to make a function using the prototype.js library. I want the function to return a value based on an Ajax.Request object.

Code:
function isLoggedIn(){
	var isLogged;
	url = "../script/isLoggedIn.cfm";
	xhr = new Ajax.Request(url,{method:'get', onComplete:function(){return (text from the isLoggedIn.cfm page)}});
	if (text from page is true){return true;}else{return false;}
               
}
The problem I'm having is getting at the return value from the onComplete function while I'm outside of the function. I'm sure it's something stupid that I'm missing, but I can't find it.