﻿	//vider une liste
	//document.getElementById('soc_activite1').innerHTML = "";
	//ajout ddans une liste
	//Ajout_Option(10,'azerty','soc_activite1');
	
	//Permet d'ajouter une option a une liste
	function Ajout_Option(val1,val2,elmt) {
		eval("document.getElementById('"+elmt+"').options[document.getElementById('"+elmt+"').options.length]= new Option('"+val2.replace("'","\\'")+"','"+val1+"')");
	}
	
	function Modif_Option(val1,val2,elmt) {
		eval("document.getElementById('"+elmt+"').options[document.getElementById('"+elmt+"').options.length]= new Option('"+val2.replace("'","\\'")+"','"+val1+"')");
	}
	
	function Delete_Option(val1,val2,elmt) {
		eval("document.getElementById('"+elmt+"').options[document.getElementById('"+elmt+"').options.length]= new Option('"+val2.replace("'","\\'")+"','"+val1+"')");
	}
	function AJAX_Call(fichier, is_xml)
	{
		if(window.XMLHttpRequest) // FIREFOX
			xhr_object = new XMLHttpRequest();
		else if(window.ActiveXObject) // IE
			xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
		else
			return(false);
		
		xhr_object.open("GET", fichier, false);
		xhr_object.send(null);
		
		if(xhr_object.readyState == 4) 
		  if(is_xml == "") {
			return(xhr_object.responseText);
			} else {
				return(xhr_object.responseXML);
			}
		else return(false);
	}





function contacteznous_menu4_refresh(id,cp)
{

	if(id == "" || id==0) { return; }
	
	if(doc = AJAX_Call("../ajax/contacteznous_menu4.php?id="+id+"&cp="+cp, ''))
	{
		s = document.getElementById("monactivite_div");
		s.innerHTML = doc;
	}
}

function contacteznous_menu3_refresh(id, cp)
{

	if(id == "" || id==0) { return; }
	
	if(doc = AJAX_Call("../ajax/contacteznous_menu3.php?id="+id+"&cp="+cp, ''))
	{
		s = document.getElementById("jemassurepour_div");
		s.innerHTML = doc;
	}
}

function contacteznous_check_societaire_covea(societaire, covea)
{
	if(doc = AJAX_Call("../ajax/contacteznous_check_societaire_covea.php?societaire="+societaire+"&covea="+covea, ''))
	{
			return doc;
	}
	return "ko";
	
}

function faqav_choixmenu_in_session(lid) {
	AJAX_Call("../ajax/faqav_choixmenu.php?choix="+lid, '');
}

function my_ucfirst(mot) {
	var m=mot.charAt(0).toUpperCase() +
	mot.substring(1).toLowerCase();
return m;
}

