	function Ajax_send_get(url,id) {
		var xhr_object = null;
		var position = id;
		
		if (window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
		else if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
	
		xhr_object.open("GET", url, true);
		xhr_object.onreadystatechange = function() {
			if ( xhr_object.readyState == 4 ) {
				document.getElementById(position).innerHTML = xhr_object.responseText; // on affiche le retour
			}
		}
		xhr_object.send(null);
	}		

	function Ajax_send_get1(url,id) {
		var xhr_object1 = null;
		var position1 = id;
		
		if (window.XMLHttpRequest) xhr_object1 = new XMLHttpRequest();
		else if (window.ActiveXObject) xhr_object1 = new ActiveXObject("Microsoft.XMLHTTP"); 
	
		xhr_object1.open("GET", url, true);
		xhr_object1.onreadystatechange = function() {
			if ( xhr_object1.readyState == 4 ) {
				document.getElementById(position1).innerHTML = xhr_object1.responseText; // on affiche le retour
			}
		}
		xhr_object1.send(null);
	}		

	function Ajax_send_get2(url,id) {
		var xhr_object2 = null;
		var position2 = id;
		
		if (window.XMLHttpRequest) xhr_object2 = new XMLHttpRequest();
		else if (window.ActiveXObject) xhr_object2 = new ActiveXObject("Microsoft.XMLHTTP"); 
	
		xhr_object2.open("GET", url, true);
		xhr_object2.onreadystatechange = function() {
			if ( xhr_object2.readyState == 4 ) {
				document.getElementById(position2).innerHTML = xhr_object2.responseText; // on affiche le retour
			}
		}
		xhr_object2.send(null);
	}		

	function Ajax_send_get3(url,id) {
		var xhr_object3 = null;
		var position3 = id;
		
		if (window.XMLHttpRequest) xhr_object3 = new XMLHttpRequest();
		else if (window.ActiveXObject) xhr_object3 = new ActiveXObject("Microsoft.XMLHTTP"); 
	
		xhr_object3.open("GET", url, true);
		xhr_object3.onreadystatechange = function() {
			if ( xhr_object3.readyState == 4 ) {
				document.getElementById(position3).innerHTML = xhr_object3.responseText; // on affiche le retour
			}
		}
		xhr_object3.send(null);
	}		
	
	function Ajax_send_get4(url,id) {
		var xhr_object = null;
		var position = id;
		
		if (window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
		else if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
	
		xhr_object.open("GET", url, true);
		xhr_object.onreadystatechange = function() {
			if ( xhr_object.readyState == 4 ) {
				document.getElementById(position).innerHTML = xhr_object.responseText; // on affiche le retour
				Ajax_send_get1("aquarium-action.php?sAqua="+ encodeURI('plantation') +"&bac="+ encodeURI( document.getElementById('bac').value )+"&alert="+ encodeURI( document.getElementById('alert').value ),"aquarium_plantation");				
				Ajax_send_get2("aquarium-action.php?sAqua="+ encodeURI('population') +"&bac="+ encodeURI( document.getElementById('bac').value )+"&alert="+ encodeURI( document.getElementById('alert').value ),"aquarium_population");				
			}
		}
		xhr_object.send(null);
	}			
	
	function Ajax_send_get5(url,id,action_type) {
		var xhr_object = null;
		var position = id;
		
		if (window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
		else if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
	
		xhr_object.open("GET", url, true);
		xhr_object.onreadystatechange = function() {
			if ( xhr_object.readyState == 4 ) {
				document.getElementById(position).innerHTML = xhr_object.responseText; // on affiche le retour
				print_values();
			}
		}
		xhr_object.send(null);
	}		



			function chg_autologin() {
				st = document.getElementById('al').value;
				if (st == 1) {
					document.getElementById('img1').src = "/img/cross.jpg";
					document.getElementById('al').value = 0;
				} else {
					document.getElementById('img1').src = "/img/vu.jpg";
					document.getElementById('al').value = 1;
				}
			}
			
			function showPopUp(file,w,h,referer) {
			
				var popup = document.all ? document.all["popup"] : document.getElementById ? document.getElementById("popup") : "";
				popup.style.backgroundImage = "url('/img/contentbg.jpg')";
				popup.style.borderColor = "black";
			
				popupOn(0,w,h);
				Ajax_send_get("/" + file + ".php?referer="+referer,"popup");
			
			}			

			function showPopUpActions(file,w,h) {
			
				var popup = document.all ? document.all["popup"] : document.getElementById ? document.getElementById("popup") : "";
				popup.style.backgroundImage = "url('/img/contentbg.jpg')";
				popup.style.borderColor = "black";
			
				popupOn(0,w,h);
				Ajax_send_get("/" + file,"popup");
			
			}			

			function closePopUp() {
				if (w3c||ie){
					var alpha = document.all ? document.all['alpha'] : document.getElementById ? document.getElementById('alpha') : "";
					alpha.style.display = 'none'; // on cache le filtre alpha
					var popup = document.all ? document.all['popup'] : document.getElementById ? document.getElementById('popup') : "";
					popup.style.visibility = 'hidden'; // on cache la popup
				}	
			}
			
			function sendContact() {
				var poststr = 'sujet=' + encodeURI( document.getElementById('sujet').value ) +
											'&nom2=' + encodeURI( document.getElementById('nom2').value ) +
											'&email=' + encodeURI( document.getElementById('email').value ) +
											'&http=' + encodeURI( document.getElementById('http').value ) +
											'&msg=' + encodeURI( document.getElementById('msg').value );
				makePOSTRequest('/contact.php', poststr, 'popup');
			}					

			function sendFriends() {
				var poststr = '&nom2=' + encodeURI( document.getElementById('nom2').value ) +
											'&nom3=' + encodeURI( document.getElementById('nom3').value ) +
											'&referer=' + encodeURI( document.getElementById('referer').value ) +
											'&email=' + encodeURI( document.getElementById('email').value ) +
											'&email2=' + encodeURI( document.getElementById('email2').value );
				makePOSTRequest('/friends.php', poststr, 'popup');
			}				

			function sendBug() {
				var poststr = '&agent=' + encodeURI( document.getElementById('agent').value ) +
											'&referer=' + encodeURI( document.getElementById('referer').value ) +
											'&email=' + encodeURI( document.getElementById('email').value ) +
											'&msg=' + encodeURI( document.getElementById('msg').value );
				makePOSTRequest('/bug.php', poststr, 'popup');
			}	
			
						
	
			function GMaps(address) {
				
				popupOn(0,600,500);				
				
				var xhr_object = null;
				var position = 'popup';
				
				if (window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
				else if (window.ActiveXObject) xhr_object = new ActiveXObject('Microsoft.XMLHTTP'); 
			
				xhr_object.open('GET', 'googlemaps.php', true);
				xhr_object.onreadystatechange = function() {
					if ( xhr_object.readyState == 4 ) {
						document.getElementById(position).innerHTML = xhr_object.responseText; // on affiche le retour
						showGmaps(address);
					}
				}
				xhr_object.send(null);
			}			
			
			function showGmaps(address) {
				//<![CDATA[
				/* Variable qui va correspondre  l'affichage de la carte dans la div */
				var map = new GMap2(document.getElementById('map'));
				/* Centre la carte aux coordonnes indiques et ralise un zoom de niveau 5 */
				var point = new GLatLng(49.41483, 2.817895);
				map.setCenter(point, 15);
				
				map.addControl(new GLargeMapControl());
				
				/* Cration de l'objet GClientGeocoder */
				var geocoder = new GClientGeocoder();
		
				if (geocoder) {
					geocoder.getLatLng(address, function(point) {
						/* Centrer la carte sur le point */
						map.setCenter(point, 15);
						/* Cration d'un marqueur */
						var marker = new GMarker(point);
						/* Afficher le marqueur */
						map.addOverlay(marker);
					});
				}
			 } //]]>

	var w3c = document.getElementById && !document.all;
	var ie = document.all;


