//---------------------------------------------------------------------
function useHttpResponsechangeProtection() {
  if (http.readyState == 4) {
		var myText = http.responseText;	
		if (dom) { 
			document.getElementById("childrenprotection").innerHTML = myText;} 
		else if (iex) { 
			document.all["childrenprotection"].innerHTML = myText;} 
		else if (nn4) { 
			document.layers["childrenprotection"].innerHTML = myText;
		} 

		window.location.reload();
  } // Fin ready state
}
//---------------------------------------------------------------------



//---------------------------------------------------------------------
// Change the status of the children protection
//---------------------------------------------------------------------
function changeProtection(valChild){ 
		if(window.XMLHttpRequest) // Firefox et autres
		   http = new XMLHttpRequest(); 
		else if(window.ActiveXObject){ // Internet Explorer 
		   try {
					http = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e) {
					http = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}
		
		http.open("GET", "changechildren.php?childvalue=" + valChild , true);
		http.onreadystatechange = useHttpResponsechangeProtection;
		http.send(null);
}
//---------------------------------------------------------------------