////////
// Traitement des incidents
////////

ouverture_incident = true;

function jvsPOPUPincident(field)
{
	if(ouverture_incident == true)
	{
		var positiontop = document.body.clientHeight/4;
		var positionleft = document.body.clientWidth-600;
		window.open(commun_url + "popup/popincident.php?v=" + field,"popinfo","width=510,height=450,status=no,scrollbars=no,resizable=no,top=" + positiontop + ",left=" + positionleft);
	}
}
////////
// Retour a une étape
////////
function valide_form_new(kre)
{
	ouverture_incident = false;
	
	ap_showWaitMessage(true);
	document.form_quot.etape.value = kre;	
	document.form_quot.submit();
}
////////
// Recherche code postal par nom de commune
////////
function recherche_cp()
{
	var positiontop=document.body.clientHeight/2;
	var positionleft=document.body.clientWidth-600;
	winopened = window.open(commun_url + "popup/poprech_cp.php","poprech_cp","width=600,height=220,status=yes,scrollbars=yes,resizable=yes,top=" + positiontop + ",left=" + positionleft);
	winopened.focus();
}
////////
// Sauvegarde des données
////////

function change_donnee(id_c,nv,vv) {
	obj = MM_findObj(nv);
	if(obj.type == 'checkbox' && !obj.checked) { vv = ''; }
	obj = MM_findObj("PrgF");
	obj.src = commun_url + "Progs_http/Prog_catch.php?id_c=" + id_c + "&nv=" + nv + "&vv=" +  encodeURI(vv);
}