/**
 *
 * Ajax Function
 *
 * @author 			David Maack
 * @copyright		Copyright 2009, MEN AT WORK         		
 * @link  			http://www.men-at-work.de
 * 
 */
 
 
function initDownloadLink(){
return true;
}
 
function parseAjaxReference(url){

	var myElement = new Element('div',{
		'id': 'content',
		'class': 'content'
	});

	var req = new Request({
			method: 'get',
			url: url,
			onComplete: function(response) {
				var div = new Element('div').set('html', response);
				$('navReference').getElements('div.slider').destroy();
				$('ce_reference').empty().adopt(div.getElement('div.ce_reference').getChildren());
				initReferenceSlider();

			}
		}).send();
};


function parseAjaxRequest(url){
	
	var myElement = new Element('div',{
		'id': 'content',
		'class': 'content'
	});

	var req = new Request({
			method: 'get',
			url: url,
			data: { 'request' : 'main' },
			onComplete: function(response) {
				var div = new Element('div').set('html', response);
				
				/* replacing the content divs */
				if ($('main')){
					$('main').empty().adopt(div.getElement('.main .inside'),
					new Element('div',{'id':'clear'}));
				}
				if ($('right')){
					$('right').empty().adopt(div.getElement('.right .inside'));
				}
				$$('body').removeClass('referenzdetail');
				initDownloadLink();
			}
		}).send();

};

