// function called by flash animation when loaded :
function doSetConfig2()
{
  
  // This will hold the DOM ID of the flash
  var swfId = "AutoPromo_Container";
  // Get a reference to the SWF object
  var swf = getSwf(swfId);
  // Please note that the jsFuncParams is an argument list -> parameters should be separated by a comma, parameters should not be enclosed in quotes
  var xmlString = '<settings><timer>3000</timer>';
 
  // javascript function [redirectNavigationAutoPromo] declared in index_rhnavmenu.html -> see parameters
    
  //xmlString+='<img><param name="'+pathRessources+'/flash/autoPromo/img/surimi V1.jpg" jsFuncName="redirectNavigationAutoPromo" jsFuncParams="product_details" ></param></img>';
  
  xmlString+='<img><param name="'+pathRessources+'/flash/autoPromo/img/Menus.jpg" jsFuncName="redirectNavigationAutoPromo" jsFuncParams="nutrition_aide_menu" ></param></img>';
  xmlString+='<img><param name="'+pathRessources+'/flash/autoPromo/img/Aide au menu.jpg" jsFuncName="redirectNavigationAutoPromo" jsFuncParams="nutrition_aide_menu" ></param></img>';
  xmlString+='<img><param name="'+pathRessources+'/flash/autoPromo/img/PROMO JANVIER.jpg" jsFuncName="redirectNavigationAutoPromo" jsFuncParams="catalog" ></param></img>';
  xmlString+='<img><param name="'+pathRessources+'/flash/autoPromo/img/VAE.jpg" jsFuncName="redirectNavigationAutoPromo" jsFuncParams="liste_evenementiel" ></param></img>';
  xmlString+='<img><param name="'+pathRessources+'/flash/autoPromo/img/VAE bandeau 2.jpg" jsFuncName="redirectNavigationAutoPromo" jsFuncParams="catalog_cartes" ></param></img>';
  xmlString+='</settings>';
	//  The SWF callback is named 'setConfig', this callback method is waiting an XML structure serialized as a string
	swf.setConfig(xmlString);
	
}

/***
 * Helper function that get a reference to a SWF object by its DOM ID
 * Note: the DOM ID in this example is set by SWFObject library, it is the ID of container the SWF should written into
 */
function getSwf(movieName) {
   if (navigator.appName.indexOf("Microsoft") != -1)
   {
       return window[movieName];
   }
   else
   {
       return document[movieName];
   }
}

/***
 * Helper function called by the Flash App
 *
 * Please note that 'alert' is a bad example :
 * Flash maximum external script execution delay is 15 seconds by default,
 * a dialog box may stay open more that 15 seconds, this will raise an exception that is actually unhandled by the provided SWF application ...
 */
function customAlert (p1, p2)
{
	alert("Flash said the following\n:"+p1+"\n:"+p2);
}
