Event.observe(window,'load',setup_ajax);
function setup_ajax() {
	var ajax_container = document.createElement('div');
	ajax_container.setAttribute('id','ajax_container');
	var ajax_content = document.createElement('div');
	ajax_content.setAttribute('id','ajax_content');
	var ajax_close = document.createElement('a');
	ajax_close.setAttribute('id','ajax_close');
	ajax_close.setAttribute('href','#');
	ajax_close.appendChild(document.createTextNode('Close'));
	ajax_container.appendChild(ajax_content);
	ajax_container.appendChild(ajax_close);
	ajax_container.style.display = 'none';
	$('container').appendChild(ajax_container);
	Event.observe('ajax_close','click',function(){Effect.toggle('ajax_container','appear',{duration: 1.0}); return false;});
}

function fetch_ajax(href) {
	var ajax = new Ajax.Updater('ajax_content', href, {
		method: 'post', 
		parameters: 'ajax=true', 
		onComplete: function(){Effect.toggle('ajax_container','appear',{duration: 1.0})}
	});
}