	function mk_envir(v_name_cookie, v_cookie_data_separator){
	this.cookId				=	v_name_cookie;
	this.cookSep	=	v_cookie_data_separator;
	}
	
	function mk_envir_form(v_name_form){
	this.nf = document.forms[v_name_form];
	this.nb_field_in_form = this.nf.length;
	this.o_form_name = v_name_form;
		
		var o_txtFld_name = "";
		var o_nb_txtFLD = 0;
		for(var cnt=0;cnt < this.nf.length;cnt++){
			if(this.nf[cnt].type == "text"){
			o_txtFld_name += "# " + cnt + " : " + this.nf[cnt].name + "\n";
			eval("this."+ this.nf[cnt].name + "=\""+ this.nf[cnt].name +"\";");
			o_nb_txtFLD++;
			}
		}
	this.num_txtfld = o_nb_txtFLD;
	this.name_txtfld = o_txtFld_name;
	
		
	}
	
	function read_cookie(v_name_cookie, v_cookie_data_separator){
		// secu : on s'assure que le cookie existe
		if(getCookie(v_name_cookie) != null) {
		
		this.cook_id=v_name_cookie;
		this.cook_data_sep = v_cookie_data_separator;
		
		
		o_TAB_CookieDetail = new Array();
		o_TAB_CookieDetail = getCookie(v_name_cookie).split(v_cookie_data_separator);
		this.display_all_detail = "## contenu du cookie '"+ v_name_cookie +"' ##\n";
		
			for(var cntArg = 0; cntArg < (o_TAB_CookieDetail.length);cntArg++){
				if(o_TAB_CookieDetail[cntArg] != 'undefined'){
				eval("this.cookData_"+ cntArg + "=\""+ o_TAB_CookieDetail[cntArg] +"\";");
				}
			this.display_all_detail += "#"+ cntArg + " : " + o_TAB_CookieDetail[cntArg] +"\n";
			}
		
		this.sizeOf_tab = o_TAB_CookieDetail.length;
		
		}else{
		this.etat = false;
		}
	}
	
	function display_debug_info(v_diplayed_object){
	var s_HTML_constructor = "<textarea cols=40 rows=20>";
		s_HTML_constructor += v_diplayed_object;
		s_HTML_constructor += "</textarea>";
	document.write (" " + s_HTML_constructor + "");
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
/**
* USAGES et TESTS
* nb : 'furniture2' et f'urniture3' sont des cookies
**/
function test(){  
furn2 = new read_cookie('furniture2','?');
/* debug : alert(furn2.display_all_detail); */

furn3 = new read_cookie('furniture3','?');
/* debug : alert(furn3.display_all_detail); */

o_form = new mk_envir_form("form");
var nameF = o_form.nf;
nameF.nom.value			= furn2.cookData_1;// le nom est contenu dans un autre cookie

nameF.num_Compte.value	= furn3.cookData_3;
nameF.societe.value		= furn3.cookData_0;

nameF.email.value		= furn3.cookData_5;
nameF.codePostal.value	= furn3.cookData_2;
nameF.ville.value		= furn3.cookData_1;
nameF.tel.value			= furn3.cookData_4;



//alert("nb total de champs dans le formulaire '"+ o_form.o_form_name +"' : " + o_form.nb_field_in_form + "\n nb de champs 'text' : " + o_form.num_txtfld);
//alert("nom des champs texte : \n" + o_form.name_txtfld);
//alert("nom societe : \n" + o_form.societe);
//display_debug_info(o_form.name_txtfld);

}
