 function goTo(liste)
        {
        	
        	var val = eval("document.form1." + liste + ".options[document.form1." + liste + ".selectedIndex].value;");
        	
        	switch(val)
        	{  
        		case "1": 
        		 url = "contact/ContactQuestion.do?sujet=" + val
        		break; 
        		
        		case "2":
        		  url = "contact/ContactQuestion.do?sujet=" + val
        		break;
        		
        		case "3":
        		  url = "contact/ContactQuestion.do?sujet=" + val
        		break;
        		
        		case "4":
        		  url = "contact/ContactQuestion.do?sujet=" + val
        		break;
        		
        		case "5":
        		  url = "contact/ContactQuestion.do?sujet=" + val
        		break;   
        		
        		case "6":
        		  url = "contact/ContactQuestion.do?sujet=" + val
        		break;   
        		
        		case "7":
        		  url = "contact/ContactQuestion.do?sujet=" + val
        		break;   
        		
        		case "8":
        		  url = "contact/ContactQuestion.do?sujet=" + val
        		break;   
        		        		
        		case "9":
        		  url = "contact/ContactQuestion.do?sujet=" + val
        		break;
        		
        		case "10":
        		   url = "contact/ContactQuestion.do?sujet=" + val
        		break;  
        		
        		case "11":
        		   url = "contact/ContactChangementAdresse.do";
        		break; 
        		
        		case "12":
        		  url = "contact/ContactChangementBanque.do";
        		break; 
        		
        		case "13":
        		 url = "contact/ContactChangementNom.do";
        		break; 
        		
        		case "14":
        		  url = "contact/ContactDaccord.do";
        		break;  
        		
        		case "15":
        		  url = "contact/ContactQuestion.do?sujet=" + val;
        		break; 
        		
        		case "16":
        		  url = "contact/ContactChangementEmail.do";
        		break; 
        		
        		case "17":
        		  url = "contact/ContactChangementTelephone.do";
        		break;   
        		
        		case "51": 
        		 url = "contact/ContactCarte.do?carte=masterCard";
        		break;  
        		
        		case "52": 
        		 url = "contact/ContactCarte.do?carte=visa";
        		break;  
        		
        		default :
        		   url = "contact.do";
        		break;
        	
        	}
        	
        	
        	window.location = url;
        }  
        
        
        function myOpen(liste)
        {    
        	
        	var valeur =  eval("document.form1." + liste + ".options[document.form1." + liste + ".selectedIndex].value;"); 
        	
        	if(valeur != "")
        	{   
        	            
        	if( valeur == "COFINOGA PLUS GALERIES LAFAYETTE" || valeur == "COFINOGA PLUS NOUVELLES GALERIES")
        	{
        		ouvrePopUpab ('./jsp/pages/satelites/contact/telephone.jsp?carte=' + escape(valeur),'Telephone',275); 
        	}
        	else
        	{  
        		ouvrePopUpab ('./jsp/pages/satelites/contact/telephone.jsp?carte=' + escape(valeur),'Telephone',255);
        	}
        	}
        	else
        	{ 
        	
        	return;
        	}
        	
        	
        }  
        
        
        function ouvrePopUpab (adr,windowName,hauty) { 
        
		x=screen.width/2;
		y=screen.height/2;
		largx=240;
		posx=x-largx;
		param=eval("'top="+y+",left="+posx+",width="+largx+",height="+hauty+",menubar=0, status=no, locationbar=0,toolbar=0,scrollbars=0,resizable=no'");
		
		window.open(adr,windowName,param);
		}
		
		
		
		
		/* contact question */

function toggle2() {
  changeValeur(document.forms[0].select_renseignements1);
}



function changeValeur(pChamp) {

	 if ( pChamp.options[pChamp.selectedIndex].value == "perte_ou_vol" ) {
	    document.forms[0].objet.value = "Question sur mon Assurance Perte & Vol";
	    
		document.forms[0].autre.value =	"assurancecredit@cofinoga.fr";
	 } else if ( pChamp.options[pChamp.selectedIndex].value == "cr?dit" ) {
		 	    document.forms[0].objet.value = "Question sur mon Assurance Cr?dit"; 
				document.forms[0].autre.value = "assurancecredit@cofinoga.fr";
				
	        }
			else if ( pChamp.options[pChamp.selectedIndex].value == "vie_prevoyance" ) {
				    document.forms[0].objet.value = "Question sur mon Assurance Vie et Pr?voyance";
					document.forms[0].autre.value = "jnieto@e-contact.fr";
					
			     }
				 else if ( pChamp.options[pChamp.selectedIndex].value == "autres_assurances" ) { 
					    document.forms[0].objet.value = "Question sur mes Assurances";
						document.forms[0].autre.value = "jnieto@e-contact.fr";
						
                 }
  }

/* end contact question */

/* fonction pour  formulaire changement adresse*/
function myClear(formName){

document.forms[formName].adresse1.value = "";
document.forms[formName].adresse2.value = "";
document.forms[formName].codePostal.value = "";
document.forms[formName].ville.value = "";

}


function myCheck(formName){
	
	if( !valider_champ_divers(document.forms[formName].nom) )
		return;
	
	if( !valider_champ_divers(document.forms[formName].prenom) )
		return;
	
	if( !valider_type_carte(document.forms[formName].carte) )
    	    return;

	if ( document.forms[formName].carte.options[document.forms[formName].carte.selectedIndex].value != "Vous n'avez pas de carte" ) 
			{	
			total = testnumero(document.forms[formName].numCarte,document.forms[formName].prefixNumCarte);
			if (total==0)
			{
			}
			else
			{
				alert ("Le num?ro de la carte n'est pas correcte");
				document.forms[formName].numCarte.select();
				document.forms[formName].numCarte.focus();
				return ;
			}
			}
	if( !valider_email(document.forms[formName].email) )
		return;	
		if( document.forms[formName].telephone.value == "" ){
			
			        if( !valider_telephone(document.forms[formName].telPortable.value) ){
			        temp = "";
			        return;
				}
			
		}
		else{
			if( document.forms[formName].telPortable.value == "" ){
				
			        if( !valider_telephone(document.forms[formName].telephone.value) ){
			        temp = "";
			        return;
				}
			
			}
			else
			{
				 if( !valider_telephone(document.forms[formName].telPortable.value) ){
		        		temp = "";
		        		return;
				}
				 if( !valider_telephone(document.forms[formName].telephone.value) ){
		        		temp = "";
		        		return;
				}	
			}
		}
        
        if( !valider_champ_divers(document.forms[formName].adresse) )
		return;
		
	 if( !valider_code_postal(document.forms[formName].codePostal) )
	 	return;
	 		
	if( !valider_champ_divers(document.forms[formName].ville) )
		return;
		
	if( !valider_champ_divers(document.forms[formName].votreQuestion) )
		return;
	
	document.forms[formName].submit();
}


function myCheckChgtAdresse(formName){
	
	if( !valider_champ_divers(document.forms[formName].nom) )
		return;
	
	if( !valider_champ_divers(document.forms[formName].prenom) )
		return;
	
	if( !valider_type_carte(document.forms[formName].carte) )
    	    return;

	if ( document.forms[formName].carte.options[document.forms[formName].carte.selectedIndex].value != "Vous n'avez pas de carte" ) 
			{	
			total = testnumero(document.forms[formName].numCarte,document.forms[formName].prefixNumCarte);
			if (total==0)
			{
			}
			else
			{
				alert ("Le num?ro de la carte n'est pas correcte");
				document.forms[formName].numCarte.select();
				document.forms[formName].numCarte.focus();
				return ;
			}
			}
	if( !valider_email(document.forms[formName].email) )
		return;	
		if( document.forms[formName].telephone.value == "" ){
			
			        if( !valider_telephone(document.forms[formName].telPortable.value) ){
			        temp = "";
			        return;
				}
			
		}
		else{
			if( document.forms[formName].telPortable.value == "" ){
				
			        if( !valider_telephone(document.forms[formName].telephone.value) ){
			        temp = "";
			        return;
				}
			
			}
			else
			{
				 if( !valider_telephone(document.forms[formName].telPortable.value) ){
		        		temp = "";
		        		return;
				}
				 if( !valider_telephone(document.forms[formName].telephone.value) ){
		        		temp = "";
		        		return;
				}	
			}
		}
        
        if( !valider_champ_divers(document.forms[formName].adresse1) )
		return;
		
	 if( !valider_code_postal(document.forms[formName].codePostal) )
	 	return;
	 		
	if( !valider_champ_divers(document.forms[formName].ville) )
		return;
		
	if( !valider_champ_divers(document.forms[formName].oldAdresse1) )
		return;
	
	document.forms[formName].submit();
}




function myCheckSof(formName){
	
	if( !valider_champ_divers(document.forms[formName].nom) )
		return;
	
	if( !valider_champ_divers(document.forms[formName].prenom) )
		return;
	
	if( !valider_type_carte(document.forms[formName].carte) )
    	    return;

	if( !valider_email(document.forms[formName].email) )
		return;	
		if( document.forms[formName].telephone.value == "" ){
			
			        if( !valider_telephone(document.forms[formName].telPortable.value) ){
			        temp = "";
			        return;
				}
			
		}
		else{
			if( document.forms[formName].telPortable.value == "" ){
				
			        if( !valider_telephone(document.forms[formName].telephone.value) ){
			        temp = "";
			        return;
				}
			
			}
			else
			{
				 if( !valider_telephone(document.forms[formName].telPortable.value) ){
		        		temp = "";
		        		return;
				}
				 if( !valider_telephone(document.forms[formName].telephone.value) ){
		        		temp = "";
		        		return;
				}	
			}
		}
        
        if( !valider_champ_divers(document.forms[formName].adresse) )
		return;
		
	 if( !valider_code_postal(document.forms[formName].codePostal) )
	 	return;
	 		
	if( !valider_champ_divers(document.forms[formName].ville) )
		return;
		
	if( !valider_champ_divers(document.forms[formName].votreQuestion) )
		return;
	
	document.forms[formName].submit();
}


/** pour le formulaire changement d'adresse **/

function myCheckSofChgtAdresse(formName){
	
	if( !valider_champ_divers(document.forms[formName].nom) )
		return;
	
	if( !valider_champ_divers(document.forms[formName].prenom) )
		return;
	
	if( !valider_type_carte(document.forms[formName].carte) )
    	    return;

	if( !valider_email(document.forms[formName].email) )
		return;	
		if( document.forms[formName].telephone.value == "" ){
			
			        if( !valider_telephone(document.forms[formName].telPortable.value) ){
			        temp = "";
			        return;
				}
			
		}
		else{
			if( document.forms[formName].telPortable.value == "" ){
				
			        if( !valider_telephone(document.forms[formName].telephone.value) ){
			        temp = "";
			        return;
				}
			
			}
			else
			{
				 if( !valider_telephone(document.forms[formName].telPortable.value) ){
		        		temp = "";
		        		return;
				}
				 if( !valider_telephone(document.forms[formName].telephone.value) ){
		        		temp = "";
		        		return;
				}	
			}
		}
        
        if( !valider_champ_divers(document.forms[formName].adresse1) )
		return;
		
	 if( !valider_code_postal(document.forms[formName].codePostal) )
	 	return;
	 		
	if( !valider_champ_divers(document.forms[formName].ville) )
		return;
		
	if( !valider_champ_divers(document.forms[formName].oldAdresse1) )
		return;
	
	document.forms[formName].submit();
}


var contacts = new Array();

var contact1 = new Array();
contact1[0] = "du Lundi au vendredi de 8h30 &agrave; 19h samedi de 9h00 &agrave; 14h00";
contact1[1] = "05 56 55 47 50";
contact1[2] = "cartegalerieslafayette_form@cofinoga.fr"; 
contact1[3] = "Centre de conseil et de gestion Cofinoga<br>Galeries Lafayette<br>UG 10<br>33696 M&eacute;rignac";
contacts["GALERIES LAFAYETTE"] = contact1;

var contact2 = new Array();
contact2[0] = "du lundi au vendredi de 8h30 &agrave; 19h samedi de 9h00 &agrave; 14h00";
contact2[1] = "05 56 55 21 21";
contact2[2] = "cartebhv_form@cofinoga.fr"; 
contact2[3] = "Centre de conseil et de gestion Cofinoga<br>BHV<br>UG 12<br>33696 M&eacute;rignac";
contacts["BHV"] = contact2;

var contact3 = new Array();
contact3[0]="du lundi au vendredi de 8h30 &agrave; 19h00 samedi de 09h00 &agrave; 14h00";
contact3[1]="05 56 55 72 20";
contact3[2]="relationclientele@banque-casino.fr";
contact3[3]="";
contacts["G&eacute;ANT"] = contact3;

var contact4 = new Array();
contact4[0]="du lundi au vendredi de 8h30 &agrave; 19h samedi de 9h00 &agrave; 14h00";
contact4[1]="Paris : 01 44 54 44 20 <br>Province : 05 56 55 75 30";
contact4[2]="cartecofinogaplusbhv_form@cofinoga.fr"; 
contact4[3]="Centre de conseil et de gestion Cofinoga<br>BHV<br>UG 6<br>33696 M&eacute;rignac";
contacts["COFINOGA PLUS BHV"] = contact4;

var contact5 = new Array();
contact5[0]="du Lundi au vendredi de 8h30 &agrave; 19h samedi de 9h00 &agrave; 14h00";
contact5[1]="05 56 55 47 50";
contact5[2]="cartenouvellesgaleries_form@cofinoga.fr";
contact5[3]="Centre de conseil et de gestion Cofinoga<br>Nouvelles Galeries<br>UG 10<br>33696 M&eacute;rignac";
contacts["NOUVELLES GALERIES"] = contact5;

var contact6 = new Array();	
contact6[0]="du lundi au vendredi de 8h30 &agrave; 19h00 samedi de 9h00 &agrave; 13h00";
contact6[1]="05 56 55 25 35";
contact6[2]="cartemonoprix_form@cofinoga.fr";
contact6[3]="Centre de conseil et de gestion Cofinoga<br>Monoprix<br>UG 16<br>33696 M&eacute;rignac";
contacts["MONOPRIX"] = contact6;
	
var contact7 = new Array();	
contact7[0]="du lundi au vendredi de 8h30 &agrave; 19h00 samedi de 9h00 &agrave; 14h00";
contact7[1]="05 56 55 72 20";
contact7[2]="relationclientele@banque-casino.fr";
contact7[3]="";
contacts["CASINO"] = contact7;
	
var contact8 = new Array();	
contact8[0]="du Lundi au vendredi de 8h30 &agrave; 19h";
contact8[1]="05 56 55 76 00";
contact8[2]="cartereseaucofinoga_form@cofinoga.fr"; 
contact8[3]="Centre de conseil et de gestion Cofinoga<br>R&eacute;seau Cofinoga<br>UG 13<br>33696 M&eacute;rignac";
contacts["AUTRES CARTES" ]= contact8;
	
var contact9 = new Array();	
contact9[0]="du lundi au vendredi de 8h30 &agrave; 19h00 samedi de 9h00 &agrave; 14h00";
contact9[1]="Paris : 01 44 54 44 30 <br>Province : 05 56 55 75 40";
contact9[2]="carteplusgalerieslafayette_form@cofinoga.fr";
contact9[3]="Centre de conseil et de gestion Cofinoga<br>Cofinoga Plus Galeries Lafayette<br>UG 5<br>33696 M&eacute;rignac";
contacts["COFINOGA PLUS GALERIES LAFAYETTE" ]= contact9;
	
var contact10 = new Array();	
contact10[0]="du lundi au vendredi de 8h30 &agrave; 19h00 samedi de 9h00 &agrave; 14h00";
contact10[1]="Paris : 01 44 54 44 30 <br>Province : 05 56 55 75 40";
contact10[2]="carteplusnouvellesgaleries_form@cofinoga.fr";
contact10[3]="Centre de conseil et de gestion Cofinoga<br>Nouvelles Galeries<br>UG 10<br>33696 M&eacute;rignac";
contacts["COFINOGA PLUS NOUVELLES GALERIES"] = contact10;
	
var contact11 = new Array();	
contact11[0]="du Lundi au vendredi de 8h30 &agrave; 19h samedi de 9h00 &agrave; 14h00";
contact11[1]="01 44 54 44 54 ";
contact11[2]="carteglhaussmann_form@cofinoga.fr";
contact11[3]="Centre de conseil et de gestion Cofinoga<br>Galeries Lafayette Haussmann<br>UG 10<br>33696 M&eacute;rignac";
contacts["GALERIES LAFAYETTE HAUSSMANN"] = contact11;
	
var contact12 = new Array();	
contact12[0]="du Lundi au vendredi de 8h30 &agrave; 19h";
contact12[1]="05 56 55 76 00";
contact12[2]="cartereseaucofinoga_form@cofinoga.fr";
contact12[3]="Centre de conseil et de gestion Cofinoga<br>UG 13<br>33696 M&eacute;rignac";
contacts["MASTERCARD"] = contact12;
	
var contact13 = new Array();	
contact13[0]="du Lundi au vendredi de 8h30 &agrave; 19h";
contact13[1]="05 56 55 76 00";
contact13[2]="cartereseaucofinoga_form@cofinoga.fr";
contact13[3]="Centre de conseil et de gestion Cofinoga<br>UG 13<br>33696 M&eacute;rignac";
contacts["VISA"] = contact13;

var contact14 = new Array();	
contact14[0]="du Lundi au vendredi de 8h30 &agrave; 19h";
contact14[1]="05 56 55 76 00";
contact14[2]="cartereseaucofinoga_form@cofinoga.fr"; 
contact14[3]="Centre de conseil et de gestion Cofinoga<br>R&eacute;seau Cofinoga<br>UG 13<br>33696 M&eacute;rignac";
contacts["RUEDUCOMMERCE" ]= contact14;

function displayContact(){

	var selectedContactId = document.getElementById('prtlphn-crrr').value;
	var selectedContact;
	
	if(selectedContactId != ''){
		
		selectedContact = contacts[selectedContactId];
	
		document.getElementById('idContactHoraire').innerHTML = selectedContact[0];
		document.getElementById('idContactTel').innerHTML = selectedContact[1];
		/*
		if ((selectedContactId=="MASTERCARD")||(selectedContactId=="VISA"))
		{
		afficheZone("#mailContact","block");
		document.getElementById('idContactEmail').innerHTML = selectedContact[2];
		}
		else afficheZone("#mailContact","none");
		*/
		afficheZone("#mailContact","none");
		document.getElementById('idContactAdresse').innerHTML = selectedContact[3];
		
		return true;
	} else {
		return false;
	}
}



	function setMail(){
	if ((null !=document.getElementById('emailCoord'))&&(document.getElementById('emailCoord').value !="")){
		var isSet = false;
		var leMail = document.getElementById('emailCoord').value.split("@")
		document.getElementById('prefix').value= leMail[0];
		document.getElementById('prefix2').value= leMail[0];
		for (i=0;i<document.getElementById('FAI_select').options.length;i++)
			{
			if (document.getElementById('FAI_select').options[i].value == leMail[1])
			{
			document.getElementById('FAI_select').options[i].selected="true";
			isSet = true;
			}
			if (document.getElementById('FAI_select2').options[i].value == leMail[1])
			{
			document.getElementById('FAI_select2').options[i].selected="true";
			isSet = true;
			}
		}
		if (isSet == false)
			{
			document.getElementById('FAI_select').style.display="none";
			document.getElementById('FAI_autre').style.display="inline";
			document.getElementById('FAI_autre').style.height="100%";
	
	
			document.getElementById('FAI_select2').style.display="none";
			document.getElementById('FAI_autre2').style.display="inline";
			document.getElementById('FAI_autre2').style.height="100%";
			
			document.getElementById('FAI_autre').value=leMail[1];
			document.getElementById('FAI_autre2').value=leMail[1];
			}	
		}
	}
	loads.push(setMail);
		
	function FAISelect(){
		var leSelect = document.getElementById('FAI_select');
		if (leSelect.selectedIndex == leSelect.options.length-1)
		{
			document.getElementById('FAI_select').style.display="none";
			document.getElementById('FAI_autre').style.display="inline";
			document.getElementById('FAI_autre').style.height="100%";
			document.getElementById('FAI_autre').focus();
		}
	}
		
	function FAISelect2(){
		var leSelect = document.getElementById('FAI_select2');
		if (leSelect.selectedIndex == leSelect.options.length-1)
		{
			document.getElementById('FAI_select2').style.display="none";
			document.getElementById('FAI_autre2').style.display="inline";
			document.getElementById('FAI_autre2').style.height="100%";
			document.getElementById('FAI_autre2').focus();
		}
	}
	
	function concatMail()
	{
		if (document.getElementById('FAI_select').style.display != "none")
		document.getElementById('emailCoord').value=document.getElementById('prefix').value+"@"+document.getElementById('FAI_select').value;
		else document.getElementById('emailCoord').value=document.getElementById('prefix').value+"@"+document.getElementById('FAI_autre').value;
		
		if (document.getElementById('FAI_select2').style.display != "none")
		document.getElementById('emailCoord2').value=document.getElementById('prefix2').value+"@"+document.getElementById('FAI_select2').value;
		else document.getElementById('emailCoord2').value=document.getElementById('prefix2').value+"@"+document.getElementById('FAI_autre2').value;
		return false;
	}


/* fin scripts pour formulaire chgt adresse */
