/* auteur: La Capitale, assurances generales inc. */
/* Date de création: 2005-07-06 */


var bandeauPath = pathImages + "common/coquille/bandeau/";

if ( typeof(menuSel) == 'undefined' ){
		menuSel = -1;
}
if ( typeof(sMenuSel) == 'undefined' ){
		sMenuSel = -1;
}
if (typeof(idx3eNiveau) == "undefined"){
	idx3eNiveau = -1;
}	
if (typeof(idxAriane) == "undefined"){
	idxAriane = -1;
}


creerSousMenu();
creerFil();

//Initialisation ( onload )
var sSrc = "";
function initialisation( pIndex ){
	
	for ( i = 0; i < tabEtatMenu.length; i++ ){
		actionMenu('init', i );
	}

	if ( menuSel >= 0 ){
			
		if (document.getElementById( "menuGauche" ) != null) {
			document.getElementById( "menuGauche" ).innerHTML = sLiensPertinents;		
		}
	}	
	
	if (document.getElementById( "filAriane" ) != null) {
		document.getElementById( "filAriane" ).innerHTML = sFilAriane;
	}
	
  /* Hack pour activer les flash sans avoir a clicker dessus 2 fois dans IE */
	if (pIndex == 'index') {
    theObjects = document.getElementsByTagName("object");
    for (var i = 0; i < theObjects.length; i++) {
    theObjects[i].outerHTML = theObjects[i].outerHTML;
    }
  }
  
  clickMenuItem();  
  
}



function toggleLangue() {
	
	URL = document.location.toString();
	
	if (URL.indexOf("lang=en") != -1) {
		URL = URL.replace("lang=en", "lang=fr");
		
	} else if (URL.indexOf("lang=fr") != -1) {
		URL =  URL.replace("lang=fr", "lang=en");
		
	} else if (URL.indexOf("/fr/") != -1) {
		URL =  URL.replace("/fr/", "/en/");
		
	} else if (URL.indexOf("/en/") != -1) {
		URL =  URL.replace("/en/", "/fr/");
		
	} else {
		
		if (URL.indexOf("?") != -1) {
			URL += "&lang=en";
		} else {
			URL += "?lang=en";
		}
	}		
	document.location = URL;	
}

