/*----------------------------------------------*/
/*         JAVASCRIPT DISCRET	 */
/*----------------------------------------------*/
// Fonction javascript discret :  Initialise tous les événements javascript
function initEvents()
{
	//Pour l'id "pays", j'atache un "change" qui lancera "change_affichage"
	addEvent( document.getElementById('pays_mag'), 'change', change_affichage, false);
}


/*----------------------------------------------*/
/*  Fonctions propres au cas proposés */
/*----------------------------------------------*/
// Fonctions lancée aprés le retour de la réponse XMLHTTPRequest
function showMagasin(reponse_ajax,xml_txt)
{
	document.getElementById('contenu_international').innerHTML = reponse_ajax;
}


// Fonctions qui lance l'appel AJAX
function change_affichage()
{
	// On lance la procédure Ajax en faisant appel à l'url créant le fichier HTML
	ajax('recup_magasin_international.php?pays_mag='+ document.getElementById('pays_mag').options[document.getElementById('pays_mag').selectedIndex].value , null, showMagasin);
}
// Fonctions qui lance l'appel AJAX
function change_affichage_post(pays_mag)
{
	// On lance la procédure Ajax en faisant appel à l'url créant le fichier HTML
	ajax('recup_magasin_international.php?pays_mag='+ pays_mag , null, showMagasin);
}

/*----------------------------------------------*/
/*         JAVASCRIPT DISCRET					*/
/*----------------------------------------------*/
addEvent( window, 'load', initEvents, false); /*appel des élément javascript à lancer*/