
Ajax.getUrl = function(url, callback) {
	var pos = url.lastIndexOf('#');
	var id = null;

	if (pos != -1) {
		id = url.substring(pos+1, url.length);
		url = url.substring(0, pos);
	}

	new Ajax.Request(url, {
		method: 'get',
		encoding: 'iso-8859-1',
		evalJS: false,
		onSuccess: function(transport) {
			var match = /<body[^>]*>((?:.|\s)*)<\/body>/i.exec(transport.responseText);
			if (match) transport.responseText = match[1];

			var aux = new Element('div');
			aux.innerHTML = transport.responseText;
			if (id && (match = aux.down(id))) aux.update(match);

			if (callback) callback(aux.firstDescendant());
		}
	});
}