<!--
	
function controle(){
document.form1.confirmation.value="oui";
var yatiluncoemp = document.form1.quic.value

if ((document.form1.datenaissanceempj.value=='')&&(document.form1.datenaissanceempm.value=='')&&(document.form1.datenaissanceempa.value=='')){
alert("Veuillez saisir la date de naissance de l'emprunteur !");
}
else
{
document.form1.datenaissanceemp.value=document.form1.datenaissanceempj.value+'/'+document.form1.datenaissanceempm.value+'/'+document.form1.datenaissanceempa.value;
document.form1.datenaissancecoemp.value=document.form1.datenaissancecoempj.value+'/'+document.form1.datenaissancecoempm.value+'/'+document.form1.datenaissancecoempa.value;
document.form1.dateeffet.value=document.form1.dateeffetj.value+'/'+document.form1.dateeffetm.value+'/'+document.form1.dateeffeta.value;

}
// controle email
if ((document.form1.email.value.length)==0){
document.getElementById("email").style.backgroundColor='#83CD22';
document.form1.confirmation.value="non";
}
// tel
if ((document.form1.teldomicile.value=='')&&(document.form1.telportable.value==''))
		{
document.getElementById("teldomicile").style.backgroundColor='#83CD22';
document.getElementById("telportable").style.backgroundColor='#83CD22';
document.form1.confirmation.value="non";
		}
//controle champ nom emp

if(document.form1.nomemp.value==''){
	document.getElementById("nomemp").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
//controle champ prenom emp
	if(document.form1.prenomemp.value==''){
	document.getElementById("prenomemp").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}

//controle champ jour naissance emp
	if(document.form1.datenaissanceempj.value==''){
	document.getElementById("datenaissanceempj").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
//controle champ mois naissance emp
	if(document.form1.datenaissanceempm.value==''){
	document.getElementById("datenaissanceempm").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
	//controle champ annee naissance emp
	if(document.form1.datenaissanceempa.value==''){
	document.getElementById("datenaissanceempa").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
if (yatiluncoemp==2) {
	//controle champ nom coemp
	if(document.form1.nomcoemp.value==''){

	document.getElementById("nomcoemp").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}

	
//controle champ prenom coemp
	if(document.form1.prenomcoemp.value==''){
	document.getElementById("prenomcoemp").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
	//controle champ jour naissance coemp
	if(document.form1.datenaissancecoempj.value==''){
	document.getElementById("datenaissancecoempj").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
//controle champ mois naissance coemp
	if(document.form1.datenaissancecoempm.value==''){
	document.getElementById("datenaissancecoempm").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
	//controle champ annee naissance coemp
	if(document.form1.datenaissancecoempa.value==''){
	document.getElementById("datenaissancecoempa").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
}	
	
	//controle champ montantemprunt1 
	if(document.form1.montantemprunt1.value==''){
	document.getElementById("montantemprunt1").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	//controle champ tauxemprunt1
	if(document.form1.tauxemprunt1.value==''){
	document.getElementById("tauxemprunt1").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}

	//controle champ dureeannee1
	if(document.form1.dureeannee1.value==''){
	document.getElementById("dureeannee1").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
		
	//controle champ differe1
	if(document.form1.differe1.value==''){
	document.getElementById("differe1").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
	//controle champ dateeffetj
	if(document.form1.dateeffetj.value==''){
	document.getElementById("dateeffetj").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
	//controle champ dateeffetm
	if(document.form1.dateeffetm.value==''){
	document.getElementById("dateeffetm").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
		//controle champ etat avancement
	if(document.form1.etat_avancement.value==0){
	document.getElementById("etat_avancement").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
	
	if((document.form1.etat_avancement.value==2)){
		if(document.form1.cbanq.value==0){
			document.getElementById("cbanq").style.backgroundColor='#83CD22';
			document.form1.confirmation.value="non";
		}
		
		if(document.form1.acceptation_fin.value=="0"){ 
			document.getElementById("acceptation_fin").style.backgroundColor='#83CD22';
			document.form1.confirmation.value="non";
		}
		
	}
	
if((document.form1.etat_avancement.value==3)){
		if(document.form1.cbanq.value==0){
			document.getElementById("cbanq").style.backgroundColor='#83CD22';
			document.form1.confirmation.value="non";
		}
		if(document.form1.acceptation_fin.value=="0"){ 
			document.getElementById("acceptation_fin").style.backgroundColor='#83CD22';
			document.form1.confirmation.value="non";
		}
	}
	
	if((document.form1.etat_avancement.value==4)){
		if(document.form1.cbanq.value==0){
			document.getElementById("cbanq").style.backgroundColor='#83CD22';
			document.form1.confirmation.value="non";
		}
		if(document.form1.acceptation_fin.value=="0"){ 
			document.getElementById("acceptation_fin").style.backgroundColor='#83CD22';
			document.form1.confirmation.value="non";
		}
	}
	
	
	
	
	//controle champ dateeffeta
	if(document.form1.dateeffeta.value==''){
	document.getElementById("dateeffeta").style.backgroundColor='#83CD22';
	document.form1.confirmation.value="non";
	}
	
	
	if (document.form1.adresse1.value=='')
		{
		document.getElementById("adresse1").style.backgroundColor='#83CD22';
		document.form1.confirmation.value="non";
		}
		
	if (document.form1.codepostal.value=='')
		{
		document.getElementById("codepostal").style.backgroundColor='#83CD22';
		document.form1.confirmation.value="non";
		}
	
	if (document.form1.ville.value=='')
		{
		document.getElementById("ville").style.backgroundColor='#83CD22';
		document.form1.confirmation.value="non";
		}
	
	if (document.form1.nomemp.value=='')
		{
		document.getElementById("nomemp").style.backgroundColor='#83CD22';
		document.form1.confirmation.value="non";
		}
		
	if (document.form1.prenomemp.value=='')
		{
		document.getElementById("prenomemp").style.backgroundColor='#83CD22';
		document.form1.confirmation.value="non";
		}


	
	if (document.form1.confirmation.value=="non"){
	alert('Veuillez renseignez les champs de couleur verte ?');
	}
	else
	{
	termine();
        //email2();
	//document.form1.submit();
	} 
}
	
function email2()
	{
	adresse = document.form1.email.value;
	var place = adresse.indexOf("@",1);
	var point = adresse.indexOf(".",place+1);
	if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
//		completenombanque();
//		controle();
		}
	else
		{
		alert('Veuillez entrez une adresse E-mail valide!!');
		document.form1.email.focus();
		}
	}
	

	//----------- demande pret -------
	function credit(){
	if (((document.form1.offredepret[0].checked==false)&&(document.form1.offredepret[1].checked==false))){
	alert('Veuillez répondre par Oui ou par Non à la question : Souhaitez vous recevoir une offre de prêt');
	}
	else
	{
	pub();
	}
	}
	
	function pub(){
	if (((document.form1.compromis[0].checked==false)&&(document.form1.compromis[1].checked==false))){
	alert('Veuillez répondre par Oui ou par Non à la question : Souhaitez vous recevoir des offres commerciales ');
	}
	else
	{
		completenombanque();
	}
	}
	
	
	

	

function completenombanque(){

	
		document.form1.banque_nom.value=document.getElementById('cbanq').options[document.getElementById('cbanq').selectedIndex].text;

termine();

}
	
function termine(){
	
	if (document.form1.confirmation.value=="oui"){
	document.form1.submit();
	} 
	}
	
function fond(champ){
//alert(champ);
document.getElementById(champ).style.backgroundColor="#FFFFFF";
}	
	

	
//-->

