function ajaxload(url){
	fading($('loading'),0,0.6);
	//fading($('ajaxcontainer'),1,0);
	
	new Ajax(url, {
	    //loaded content would be updated inside this division
		update: 'ajaxcontainer',
		//this should be true if you want to execute JS inside the loaded content
		evalScripts: true,
	    /*
		onComplete:function(r){
    		//It sets the type property of the script tag, 
    		//then puts the script body inside of the element (between the opening and closing script tags),
    		//then injects into the head of the page
			
			var script = new Element('script')
    		script.setProperty('type','text/javascript');
    		script.setHTML(r);	
    		},
			*/
		
	    onSuccess:function(){
			fading($('loading'),0.6,0);
			//fading($('ajaxcontainer'),0,1);
			//$('ajaxcontainer').style.opacity=1;
        	//The ajaxlinks function is being called here,I defined this function in footer
        	ajaxLinks();
    		}
		}).request();
	}



function fading(div,inicio,fin){
	//if(inicio == 0) $('ajaxcontainer').style.opacity=0;
	FadingFx = new Fx.Style(div, 'opacity', { duration: 1500, transition: Fx.Transitions.quartInOut });
	div.style.display="block";
	FadingFx.start.pass([inicio,fin], FadingFx).delay(0);
	//if(fin == 0) $('ajaxcontainer').style.opacity=1;
}