﻿
function AjaxRequest(url,successCallBack) {
	new Ajax.Request(url,
	  {
		method:'get',
		onSuccess: successCallBack,
		onFailure: throwFailure,
		onException: throwExp,
		asynchronous: false
	  });	
}

function throwExp(req,exception) {
	alert('The request had a fatal exception thrown.\n' + exception);
	return true;
}

function throwFailure(req){
	alert('Error: ' + req.status + "\n" + req.statusText); 
	return true;
}