//Ajax Références

function getXhr(){
                              var xhr = null;
		if(window.XMLHttpRequest) // Firefox et autres
		   xhr = new XMLHttpRequest();
		else if(window.ActiveXObject){ // Internet Explorer
		   try {
	                xhr = new ActiveXObject("Msxml2.XMLHTTP");
	            } catch (e) {
	                xhr = new ActiveXObject("Microsoft.XMLHTTP");
	            }
		}
		else { // XMLHttpRequest non supporté par le navigateur
		   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
		   xhr = false;
		}
                              return xhr;
	}
	
	
function references(type){
	


 
				var xhr = getXhr()
				// On défini ce qu'on va faire quand on aura la réponse
				xhr.onreadystatechange = function(){
				
					// On ne fait quelque chose que si on a tout reÃ§u et que le serveur est ok
					
					if(xhr.readyState == 4 && xhr.status == 200){
	
	
   

				 	
					 						   
	document.getElementById('main_div_references').innerHTML=xhr.responseText;
	/*					
	 $('#comics').galleryView({
			panel_width: 656,
			panel_height: 451,
			frame_width: 201,
			frame_height: 91,	
			overlay_opacity: 0.85,
			pause_on_hover: true
		});
	
	$("#screenshots a").fancybox({
			'speedIn'		:	400, 
			'speedOut'		:	400, 
			'overlayShow'	:	false,
			'padding' : 8,
			'centerOnScroll' : true
	});
	
	$("#screenshots ul li").hover(function() {
		
		$("span", this).stop(true, true).fadeIn(300);
	}, function() {
		
		$("span", this).stop(true, true).fadeOut(300);
	});
	
	*/
	




$("#main_div_references ul li").hover(function() {

		$("span", this).stop(true, true).fadeIn(300);
	}, function() {
		
		$("span", this).stop(true, true).fadeOut(300);
	});

		
	
jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
    	wrap: 'first'
    });
});		

	
		






					}
				}
				
			
xhr.open("POST","http://smartfingersmedia.com/functions/loadfromdb.php?action=references&type="+type,true);
xhr.send(null);
				
				
}
