

function writeTodynamicContent2(divTarget,content) {
	findObj(divTarget).innerHTML += content	
	}

function writeTodynamicContent_members_a_to_z(chairman_str,viceChairmen_str,membersColumn1_str,membersColumn2_str,secretaryGeneral_str) {
	
//	alert(chairman_str+" "+viceChairmen_str+" "+membersColumn1_str+" "+membersColumn2_str+" "+secretaryGeneral_str)
	findObj("content1").innerHTML= chairman_str
	findObj("content2").innerHTML= viceChairmen_str
	findObj("content3").innerHTML= membersColumn1_str
	findObj("content4").innerHTML= membersColumn2_str
	findObj("content5").innerHTML= secretaryGeneral_str
}

function openNews(url) {
  properties = "width=690,height=600"
  properties+= ",menubar=1,resizable=1,directories=0,scrollbars=1,status=0,titlebar=0,toolbar=0,location=1"
  newWindow = window.open(url,"wg_popUp",properties);
//  newWindow.focus();
}

function openWG(url) {
  properties = "width=690,height=600"
  properties+= ",menubar=1,resizable=1,directories=0,scrollbars=1,status=0,titlebar=0,toolbar=0,location=1"
  newWindow = window.open(url,"wg_popUp",properties);
//  newWindow.focus();
}





//------------------------------------------MENU--------------------------------------------------------------
//Est-ce que la souris est au-dessus d'un menu?
isMouseOverMenus = 0
cycleBeforReInitiateMenus = 5

// Example: obj = findObj("image1");
function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}

// Accepts a variable number of arguments, in triplets as follows:
// arg 1: simple name of a layer object, such as "Layer1"
// arg 2: ignored (for backward compatibility)
// arg 3: 'hide' or 'show'
// repeat...
//
// Example: showHideLayers(Layer1,'','show',Layer2,'','hide');

function showHideLayers()
{ 
  var i, visStr, obj, args = showHideLayers.arguments;
  

  
  for (i=0; i<(args.length-2); i+=3)
  {
    if ((obj = findObj(args[i])) != null)
    {
	
      visStr = args[i+2];
      if (obj.style)
      {
        obj = obj.style;
        if(visStr == 'show') visStr = 'inline';
        else if(visStr == 'hide') visStr = 'none';
      }

      obj.display = visStr;
    }
  }
}
//Cache ou montre les sous-menus du menu
function showHideSubMenu(menu_id,visStr)
{
	//Faut-il afficher ou cacher les div?
	if(visStr == 'show') visStr = 'inline';
	else if(visStr == 'hide') visStr = 'none';	

	ii=1

	//tant que l'objet enfant n°ii existe...
	while ( (currentMenuChild_div = findObj(menu_id+"_"+ii)) !=null)
	{
		//affiche ou cache le div
		currentMenuChild_div.style.display = visStr
		ii++
	}
}

function applyCssStyleOn(obj)
{
	if (findObj(obj)) {
	oldClassName = findObj(obj).className
	newClassName = oldClassName.replace("off","on")
	findObj(obj).className = newClassName
	}
}

function applyCssStyleOff(obj)
{
	oldClassName = findObj(obj).className
	newClassName = oldClassName.replace("on","off")
	findObj(obj).className = newClassName
}

function controlIfMouseIsOverMenus()
{
	//If the mouse is over a menu
	if (isMouseOverMenus==1)
	{
		cycleBeforReInitiateMenus = 5
	}
	else
	{
	//CountDown for automatic reinitiate menu by default
		cycleBeforReInitiateMenus = cycleBeforReInitiateMenus - 1
		if (cycleBeforReInitiateMenus==0) {initiateMenus()}
	}
	timerID = setTimeout("controlIfMouseIsOverMenus()", 150)
}


//Initiate the menus to default value
function initiateMenus()
{
	applyCssStyleOff("menu_"+menuLevel_0_Selected)	//Deselect the current menu
	applyCssStyleOn("menu_"+menuLevel_0_SelectedByDefault)	//Select the default menu
	showHideSubMenu("menu_"+menuLevel_0_Selected,"hide")	//Hide the sub menu of the current menu
	showHideSubMenu("menu_"+menuLevel_0_SelectedByDefault,"show")	//Show the sub menu of the current menu by default
	applyCssStyleOn("menu_"+menuLevel_0_SelectedByDefault+"_"+menuLevel_1_SelectedByDefault)	//Select the current sub menu
	menuLevel_0_Selected = menuLevel_0_SelectedByDefault
}

//Initialise l'interactivité des menus
function addInteractivityToMenus() {
	//Menu et sous-menu actuellement sélectionnés
	menuLevel_0_Selected = menuLevel_0_SelectedByDefault
	menuLevel_1_Selected = menuLevel_1_SelectedByDefault

	ii=1
	menu_id = "menu"
	//tant que l'objet enfant n°ii existe...
	while ( (currentMenuChild_div = findObj(menu_id+"_"+ii)) !=null)
	{
		//Quand la souris survol un menu
		currentMenuChild_div.ii = ii
		currentMenuChild_div.onmouseover = function () {
			isMouseOverMenus = 1
			showHideSubMenu("menu_"+menuLevel_0_Selected,"hide") //Efface les sous-menus sélectionné
			showHideSubMenu("menu_"+this.ii,"show") //Affiche les sous-menus par défaut
			menuLevel_0_Selected = this.ii //Retient le menu actuellement sélectionné
		}
	
		//Quand la souris ne survole plus un menu
		currentMenuChild_div.onmouseout  = function () {
			isMouseOverMenus = 0
		}
		
		//Initialise l'interactivité des sous-menu
		iii=1
		subMenu_id = "menu_"+ii
		//tant que l'objet enfant n°iii existe...
	
		while ( (currentSubMenu = findObj(subMenu_id+"_"+iii)) !=null)
		{
		currentSubMenu.onmouseover = function () {isMouseOverMenus = 1}
		currentSubMenu.onmouseout = function () {isMouseOverMenus = 0}
		iii++
		}
		
		ii++
	}
	initiateMenus();
	controlIfMouseIsOverMenus();
}

function popUpDocNotAvailableOnLine() {
	url = "document_not_available.htm"
  popUp_i ++
  properties = "width=200,height=240"
  properties+= ",menubar=0,resizable=0,directories=0,scrollbars=1,status=0,titlebar=0,toolbar=0,location=0"
  newWindow = window.open(url,"popUp_"+popUp_i,properties);
}


popUp_i = 0
function popUp(url,width,height) {
  popUp_i ++
  if (!width)  {width="200"}
  if (!height) {height="220"}
  properties = "width="+width+",height="+height
  properties+= ",menubar=0,resizable=0,directories=0,scrollbars=1,status=0,titlebar=0,toolbar=0,location=0"
  newWindow = window.open(url,"popUp_"+popUp_i,properties);
//  newWindow.focus();
}



