	var preceed=null;
	var style_prec_color=null;
	var style_prec_bg=null;
	var style_color_sel_prec=null;
	var style_bg_sel_prec=null;
	function selrow(sel,target){
		var row =document.getElementById(sel);
		var target_input = document.getElementById(target);
		
		
		if(preceed!=null&&preceed!=row){
			preceed.style.backgroundColor=this.style_bg_sel_prec;
			preceed.style.color=this.style_color_sel_prec;
			
		}
		if(preceed!=row){
			this.style_bg_sel_prec = this.style_prec_bg;
			this.style_color_sel_prec = this.style_prec_color;
			window.status=""+this.style_bg_sel_prec;
		}
		else window.status = '';
		
		row.style.backgroundColor='blue';
		row.style.color='white';

		this.preceed=row;
		if(target != "NULL")target_input.value = sel;
		
		//document.recherche.id_adresse.value = sel;
		//document.write(target_input.value);
	}
	
	function mouseOver(sel){
		var row =document.getElementById(sel);
		if(this.preceed!=row){
			
			this.style_prec_color = row.style.color
			this.style_prec_bg = row.style.backgroundColor
			window.status =""+this.style_prec_bg;
			row.style.backgroundColor='#0099FF';
			row.style.color='white';
		}
	}
	function mouseOut(sel){
		var row =document.getElementById(sel);
		if(this.preceed!=row){
			row.style.backgroundColor = this.style_prec_bg;
			row.style.color=this.style_prec_color;
			//row.style.backgroundColor="#CCCCCC";
			//row.style.color="black";
		}
	}
	
	function checkEnter(e,source){ //e is event object passed from function invocation
		var characterCode;

		if(e && e.which){ //if which property of event object is supported (NN4)
			e = e;
			characterCode = e.which; //character code is contained in NN4's which property
		}
		else{
			e = event;
			characterCode = e.keyCode; //character code is contained in IE's keyCode property
		}

		if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
			var cp_nom = document.getElementById('cp_nom');
			
			//document.writeln("clicked but ="+but.id);
			cp_nom.value = source;
			document.forms[0].submit();
		return false; 
		}
		else{
			return true ;
		}
	}
	function submitFormSeul(but){
		var but_clicked = document.getElementById('but_clicked');
		but_clicked.value= but;
		document.forms[0].submit();
	}
	function submitForm(source){
		var cp_nom = document.getElementById('cp_nom');
		cp_nom.value = source;
		document.forms[0].submit();
	}
	
	function popupYesNo(action,target){
		if(document.getElementById(target).value!=""){
			var newWind = window.open('popupYesNo.php','mywindow','width=450,height=120,scrollbars=no,location=no,menubar=no,status=no');
			newWind.opener = self;
			document.getElementById("action").value = action;
		}
	}
	function updateAction(val){ 
		document.getElementById('action').value = val;
		document.forms[0].submit();
	}
	
	