<!-- Begin
var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
function getRef(id) {
if (isDOM) return document.getElementById(id);
if (isIE4) return document.all[id];
if (isNS4) return document.layers[id];
}
function getSty(id) {
return (isNS4 ? getRef(id) : getRef(id).style);
} 
// Hide timeout.
var popTimer = 0;
// Array showing highlighted menu items.
var litNow = new Array();
function popOver(menuNum, itemNum) {
clearTimeout(popTimer);
hideAllBut(menuNum);
litNow = getTree(menuNum, itemNum);
changeCol(litNow, true);
targetNum = menu[menuNum][itemNum].target;
if (targetNum > 0) {
thisX = parseInt(menu[menuNum][0].ref.left) + parseInt(menu[menuNum][itemNum].ref.left);
thisY = parseInt(menu[menuNum][0].ref.top) + parseInt(menu[menuNum][itemNum].ref.top);
with (menu[targetNum][0].ref) {
left = parseInt(thisX + menu[targetNum][0].x);
top = parseInt(thisY + menu[targetNum][0].y);
visibility = 'visible';
      }
   }
}
function popOut(menuNum, itemNum) {
if ((menuNum == 0) && !menu[menuNum][itemNum].target)
hideAllBut(0)
else
popTimer = setTimeout('hideAllBut(0)', 500);
}
function getTree(menuNum, itemNum) {

// Array index is the menu number. The contents are null (if that menu is not a parent)
// or the item number in that menu that is an ancestor (to light it up).
itemArray = new Array(menu.length);

while(1) {
itemArray[menuNum] = itemNum;
// If we've reached the top of the hierarchy, return.
if (menuNum == 0) return itemArray;
itemNum = menu[menuNum][0].parentItem;
menuNum = menu[menuNum][0].parentMenu;
   }
}

// Pass an array and a boolean to specify colour change, true = over colour.
function changeCol(changeArray, isOver) {
for (menuCount = 0; menuCount < changeArray.length; menuCount++) {
if (changeArray[menuCount]) {
newCol = isOver ? menu[menuCount][0].overCol : menu[menuCount][0].backCol;
// Change the colours of the div/layer background.
with (menu[menuCount][changeArray[menuCount]].ref) {
if (isNS4) bgColor = newCol;
else backgroundColor = newCol;
         }
      }
   }
}
function hideAllBut(menuNum) {
var keepMenus = getTree(menuNum, 1);
for (count = 0; count < menu.length; count++)
if (!keepMenus[count])
menu[count][0].ref.visibility = 'hidden';
changeCol(litNow, false);
}

// *** MENU CONSTRUCTION FUNCTIONS ***

function Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass) {
// True or false - a vertical menu?
this.isVert = isVert;
// The popout indicator used (if any) for this menu.
this.popInd = popInd
// Position and size settings.
this.x = x;
this.y = y;
this.width = width;
// Colours of menu and items.
this.overCol = overCol;
this.backCol = backCol;
// The stylesheet class used for item borders and the text within items.
this.borderClass = borderClass;
this.textClass = textClass;
// Parent menu and item numbers, indexed later.
this.parentMenu = null;
this.parentItem = null;
// Reference to the object's style properties (set later).
this.ref = null;
}

function Item(text, href, frame, length, spacing, target) {
this.text = text;
this.href = href;
this.frame = frame;
this.length = length;
this.spacing = spacing;
this.target = target;
// Reference to the object's style properties (set later).
this.ref = null;
}

function writeMenus() {
if (!isDOM && !isIE4 && !isNS4) return;

for (currMenu = 0; currMenu < menu.length; currMenu++) with (menu[currMenu][0]) {
// Variable for holding HTML for items and positions of next item.
var str = '', itemX = 0, itemY = 0;

// Remember, items start from 1 in the array (0 is menu object itself, above).
// Also use properties of each item nested in the other with() for construction.
for (currItem = 1; currItem < menu[currMenu].length; currItem++) with (menu[currMenu][currItem]) {
var itemID = 'menu' + currMenu + 'item' + currItem;

// The width and height of the menu item - dependent on orientation!
var w = (isVert ? width : length);
var h = (isVert ? length : width);


if (isDOM || isIE4) {
str += '<div id="' + itemID + '" style="position: absolute; left: ' + itemX + '; top: ' + itemY + '; width: ' + w + '; height: ' + h + '; visibility: inherit; ';
if (backCol) str += 'background: ' + backCol + '; ';
str += '" ';
}
if (isNS4) {
str += '<layer id="' + itemID + '" left="' + itemX + '" top="' + itemY + '" width="' +  w + '" height="' + h + '" visibility="inherit" ';
if (backCol) str += 'bgcolor="' + backCol + '" ';
}
if (borderClass) str += 'class="' + borderClass + '" ';

// Add mouseover handlers and finish div/layer.
str += 'onMouseOver="popOver(' + currMenu + ',' + currItem + ')" onMouseOut="popOut(' + currMenu + ',' + currItem + ')">';

// Add contents of item (default: table with link inside).
// In IE/NS6+, add padding if there's a border to emulate NS4's layer padding.
// If a target frame is specified, also add that to the <a> tag.

str += '<table width="' + (w - 8) + '" border="0" cellspacing="0" cellpadding="' + (!isNS4 && borderClass ? 3 : 0) + '"><tr><td align="left" height="' + (h - 7) + '">' + '<a class="' + textClass + '" href="' + href + '"' + (frame ? ' target="' + frame + '">' : '>') + text + '</a></td>';
if (target > 0) {

// Set target's parents to this menu item.
menu[target][0].parentMenu = currMenu;
menu[target][0].parentItem = currItem;

// Add a popout indicator.
if (popInd) str += '<td class="' + textClass + '" align="right">' + popInd + '</td>';
}
str += '</tr></table>' + (isNS4 ? '</layer>' : '</div>');
if (isVert) itemY += length + spacing;
else itemX += length + spacing;
}
if (isDOM) {
var newDiv = document.createElement('div');
document.getElementsByTagName('body').item(0).appendChild(newDiv);
newDiv.innerHTML = str;
ref = newDiv.style;
ref.position = 'absolute';
ref.visibility = 'hidden';
}

// Insert a div tag to the end of the BODY with menu HTML in place for IE4.
if (isIE4) {
document.body.insertAdjacentHTML('beforeEnd', '<div id="menu' + currMenu + 'div" ' + 'style="position: absolute; visibility: hidden">' + str + '</div>');
ref = getSty('menu' + currMenu + 'div');
}

// In NS4, create a reference to a new layer and write the items to it.
if (isNS4) {
ref = new Layer(0);
ref.document.write(str);
ref.document.close();
}

for (currItem = 1; currItem < menu[currMenu].length; currItem++) {
itemName = 'menu' + currMenu + 'item' + currItem;
if (isDOM || isIE4) menu[currMenu][currItem].ref = getSty(itemName);
if (isNS4) menu[currMenu][currItem].ref = ref.document[itemName];
   }
}
with(menu[0][0]) {
ref.left = x;
ref.top = y;
ref.visibility = 'visible';
   }
}


var menu = new Array();

// Default colours passed to most menu constructors (just passed to functions, not
// a global variable - makes things easier to change later in bulk).
var defOver = '#C1CCE5', defBack = '#DBEAE8';

// Default 'length' of menu items - item height if menu is vertical, width if horizontal.
var defLength = 20;

// Menu 0 is the special, 'root' menu from which everything else arises.
menu[0] = new Array();
// A non-vertical menu with a few different colours and no popout indicator, as an example.
// *** MOVE ROOT MENU AROUND HERE ***  it's positioned at (5, 0) and is 17px high now.
menu[0][0] = new Menu(false, '', 240, 68, 10, '#DBEAE8', '#DBEAE8', '', 'itemText');
// Notice how the targets are all set to nonzero values...
menu[0][1] = new Item('Le SIG', '../waivis/SIG.htm', '', 50, 1, 1);
menu[0][2] = new Item('Données des bas-fonds', '../waivis/BDcaract.htm', '', 125, 1, 2);
menu[0][3] = new Item('Données documentaires', '../waivis/BDDoc.htm', '', 128, 1, 3);
menu[0][4] = new Item('Applications', '#', '', 70, 1, 4);
menu[0][5] = new Item('Contacts', '../waivis/contacts.htm', '', 60, 1, 0);
menu[0][6] = new Item('CBF-IVC', '../cbf-ivc/index.htm', 'target="_blank"', 55, 1, 0);
menu[0][7] = new Item('Accueil', '../waivis/index.htm', '', 45, 1, 0);
//menu[0][6] = new Item('Contacts', 'contacts.htm', '', 45, 10,0);
//menu[0][7] = new Item('Home', 'index.htm', '', 50, 10,0);

// File menu.
menu[1] = new Array();
// The File menu is positioned 0px across and 22 down from its trigger, and is 80 wide.
// All text in this menu has the stylesheet class 'item' -- see the <style> section above.
// We've passed a 'greater-than' sign '>' as a popout indicator. Try an image...?
menu[1][0] = new Menu(true, '>', 0, 17, 110, defOver, defBack, 'itemBorder', 'itemText');
menu[1][1] = new Item('Macro', '../IVIS/SVG/macro/ecozone/index.html', 'target="_blank"', defLength, 0, 0);
menu[1][2] = new Item('Reconnaissance', '../waivis/SIGREC.HTM', '', defLength, 0, 5);
menu[1][3] = new Item('Semi-détaillée', '../waivis/sigsemd.htm', '', defLength, 0, 6);
menu[1][4] = new Item('Détaillée', '../waivis/SIGDET.htm', '', defLength, 0, 7);

// Help menu
menu[2] = new Array();
menu[2][0] = new Menu(true, '>', 0, 17, 110, defOver, defBack, 'itemBorder', 'itemText');
menu[2][1] = new Item('Etats de l\'Art', '#', '', 20, 0, 8);
menu[2][2] = new Item('Les sites clés', '../IVIS/Bd/sitecles.htm', 'target="_blank"', 20, 0, 0);


// Edit menu.
menu[3] = new Array();
menu[3][0] = new Menu(true, '>', 0, 17, 135, defOver, defBack, 'itemBorder', 'itemText');
menu[3][1] = new Item('Recherche', '../waivis/recherchedoc.htm', '',  defLength, 0, 0);
menu[3][2] = new Item('Etats de l\'Art', '../waivis/etatdeart.htm', '', 20, 0, 0);
menu[3][3] = new Item('Ateliers scientifiques', '#', '', 20, 0, 9);
menu[3][4] = new Item('Rapports annuels', '../waivis/rapportsannuels.htm', '', 20, 0, 11);



// Edit menu.
menu[4] = new Array();
menu[4][0] = new Menu(true, '>', 0, 17, 100, defOver, defBack, 'itemBorder', 'itemText');
menu[4][1] = new Item('Lowland Project', '../IVIS/Applic/lowland/index.html', 'target="_blank"',  defLength, 0, 0);
menu[4][2] = new Item('BANKOSI', '../IVIS/Applic/zref/bankossi/index.html', 'target="_blank"', 20, 0, 0);
menu[4][3] = new Item('KUMASI', '../IVIS/Applic/zref/kumassi/index.html', 'target="_blank"', 20, 0, 0);
menu[4][4] = new Item('ZOUMONO', '../IVIS/Applic/zref/zoumono/index.html', 'target="_blank"', 20, 0, 0);

// Reopen menu
menu[5] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[5][0] = new Menu(true, '>', 109, 0, 100, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[5][1] = new Item('Benin', '../IVIS/SVG/reconn/Benin/socio/index.html', 'target="_blank"', 20, 0, 0);
menu[5][2] = new Item('Burkina Faso', '../IVIS/SVG/reconn/Benin/socio/index.html', 'target="_blank"', 20, 0, 0);
menu[5][3] = new Item('Cameroun', '../waivis/RECCAM.HTM', '', 20, 0, 13);
menu[5][4] = new Item('Cote dIvoire', '../IVIS/SVG/reconn/Civoire/socio/index.html', 'target="_blank"', 20, 0, 0);
menu[5][5] = new Item('Ghana', '../IVIS/SVG/reconn/Ghana/socio/index.html', 'target="_blank"', 20, 0, 0);
menu[5][6] = new Item('Guinée', '../IVIS/SVG/reconn/Guinee/socio/index.html', 'target="_blank"', 20, 0, 0);
menu[5][7] = new Item('Mali', '../IVIS/SVG/reconn/Mali/socio/index.html', 'target="_blank"', 20, 0, 0);
menu[5][8] = new Item('Nigeria', '../IVIS/SVG/reconn/Nigeria/socio/index.html', 'target="_blank"', 20, 0, 0);
menu[5][9] = new Item('Sierra Leone', '../IVIS/SVG/reconn/sleone/socio/index.html', 'target="_blank"', 20, 0, 0);
menu[5][10] = new Item('Togo', '../IVIS/SVG/reconn/Togo/socio/index.html', 'target="_blank"', 20, 0, 0);


// Reopen menu
menu[6] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[6][0] = new Menu(true, '>', 109, 0, 140, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[6][1] = new Item('Benin', '../waivis/semdbe.htm', '', 20, 0, 0);
menu[6][2] = new Item('Burkina Faso-Thion', '../IVIS/SVG/semidet/Bfaso/Thion/thionsd.htm', 'target="_blank"', 20, 0, 0);
menu[6][3] = new Item('Burkina Faso-Kangoura', '../IVIS/SVG/semidet/Bfaso/kangoura/index.html', 'target="_blank"', 20, 0, 0);
menu[6][4] = new Item('Cameroun', '../waivis/semdcam.htm', '', 20, 0, 0);
menu[6][5] = new Item('Cote dIvoire', '../waivis/semdciv.htm', '', 20, 0, 0);
menu[6][6] = new Item('Ghana-Jolo-Kwala', '../IVIS/SVG/semidet/Ghana/Jolo/index.html', 'target="_blank"', 20, 0, 0);
menu[6][7] = new Item('Ghana-Mankran', '../IVIS/SVG/semidet/Ghana/Mankran/index.html', 'target="_blank"', 20, 0, 0);
menu[6][8] = new Item('Guinée', '../waivis/semdgui.htm', '', 20, 0, 0);
menu[6][9] = new Item('Mali', '../waivis/semdmali.htm', '', 20, 0, 0);
menu[6][10] = new Item('Nigeria', '../waivis/semdnig.htm', '', 20, 0, 0);
menu[6][11] = new Item('Sierra Leone', '../IVIS/SVG/semidet/sleone/newton/index.html', 'target="_blank"', 20, 0, 0);
menu[6][12] = new Item('Togo', '../waivis/semdtogo.htm', '', 20, 0, 14);

// Reopen menu
menu[7] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[7][0] = new Menu(true, '>', 109, 0, 100, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[7][1] = new Item('Benin', '../waivis/detbe.htm', '', 20, 0, 16);
menu[7][2] = new Item('Burkina Faso', '../waivis/detbfaso.htm', '', 20, 0, 0);
menu[7][3] = new Item('Cameroun', '../waivis/detcam.htm', '', 20, 0, 0);
menu[7][4] = new Item('Cote dIvoire', '../IVIS/SVG/Detail/Civoire/boundiali/index.html', 'target="_blank"', 20, 0, 0);
menu[7][5] = new Item('Ghana', '../IVIS/SVG/Detail/Ghana/Mankran/index.html', 'target="_blank"', 20, 0, 0);
menu[7][6] = new Item('Guinée', '../waivis/detgui.htm', '', 20, 0, 0);
menu[7][7] = new Item('Mali', '../waivis/detmali.htm', '', 20, 0, 0);
menu[7][8] = new Item('Nigeria', '../waivis/detnig.htm', '', 20, 0, 0);
menu[7][9] = new Item('Sierra Leone', '../IVIS/SVG/Detail/sleone/newton/index.html', 'target="_blank"', 20, 0, 0);
menu[7][10] = new Item('Togo', '#', '', 20, 0, 15);

// Reopen menu
menu[8] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[8][0] = new Menu(true, '>', 109, 0, 140, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[8][1] = new Item('Caracteristique generals', '../waivis/cargenerals.htm', '', 20, 0, 0);
menu[8][2] = new Item('Potentiel des bas-fonds', '../waivis/potentiel.htm', '', 20, 0, 0);
menu[8][3] = new Item('Agro-ecologiques', '../waivis/agroeco.htm', '', 20, 0, 0);
menu[8][4] = new Item('Typologie generale', '../waivis/typologie.htm', '', 20, 0, 0);
menu[8][5] = new Item('Principales constraintes', '../waivis/principales.htm', '', 20, 0, 0);

// Reopen menu
menu[9] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[9][0] = new Menu(true, '>', 134, 0, 150, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[9][1] = new Item('Caracteristique generals', '../waivis/carac.htm', '', 20, 0, 10);
menu[9][2] = new Item('Hydrologie', '../waivis/hydrologie.htm', '', 20, 0, 0);

// Reopen menu
menu[10] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[10][0] = new Menu(true, '>', 139, 0, 100, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[10][1] = new Item('Macro', '../waivis/rap_caract_macro.htm', '', 20, 0, 0);
menu[10][2] = new Item('Reconnaissance', '../waivis/rap_caract_reconn.htm', '', 20, 0, 0);
menu[10][3] = new Item('Semi-detaillée', '../waivis/rap_caract_semidet.htm', '', 20, 0, 0);
menu[10][4] = new Item('Detaillée', '../waivis/rap_caract_detail.htm', '', 20, 0, 0);
menu[10][5] = new Item('Thematique', '../waivis/rap_caract_themat.htm', '', 20, 0, 0);
menu[10][6] = new Item('Diversification', '../waivis/rap_caract_diversif.htm', '', 20, 0, 0);

// Reopen menu
menu[11] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[11][0] = new Menu(true, '>', 134, 0, 150, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[11][1] = new Item('Caractérisation', '../waivis/carac.htm', '', 20, 0, 12);
menu[11][2] = new Item('Améngagements', '../waivis/rap_amgt.htm', '', 20, 0, 0);
menu[11][3] = new Item('Transferts de technologie', '../waivis/transtech.htm', '', 20, 0, 0);

// Reopen menu
menu[12] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[12][0] = new Menu(true, '>', 139, 0, 100, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[12][1] = new Item('Macro', '../waivis/rap_caract_macro.htm', '', 20, 0, 0);
menu[12][2] = new Item('Reconnaissance', '../waivis/rap_caract_reconn.htm', '', 20, 0, 0);
menu[12][3] = new Item('Semi-detaillée', '../waivis/rap_caract_semidet.htm', '', 20, 0, 0);
menu[12][4] = new Item('Detaillée', '../waivis/rap_caract_detail.htm', '', 20, 0, 0);
menu[12][5] = new Item('Thematique', '../waivis/rap_caract_themat.htm', '', 20, 0, 0);
menu[12][6] = new Item('Diversification', '../waivis/rap_caract_diversif.htm', '', 20, 0, 0);


// Reopen menu
menu[13] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[13][0] = new Menu(true, '>', 99, 0, 120, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[13][1] = new Item('Administrative units', '../waivis/camadm.htm', '', 20, 0, 0);
menu[13][2] = new Item('Rainfall distribution', '../waivis/camrf.htm', '', 20, 0, 0);
menu[13][3] = new Item('Agro-ecological zones', '../waivis/camaez.htm', '', 20, 0, 0);
menu[13][4] = new Item('Drainage basins', '../waivis/camdb.htm', '', 20, 0, 0);
menu[13][5] = new Item('Climate', '../waivis/camclim.htm', '', 20, 0, 0);
menu[13][6] = new Item('Physics', '../waivis/camphys.htm', '', 20, 0, 0);
menu[13][7] = new Item('Soils', '../waivis/camsoil.htm', '', 20, 0, 0);
menu[13][8] = new Item('Geology', '../waivis/camgeol.htm', '', 20, 0, 0);
menu[13][9] = new Item('Vegetation', '../waivis/camveg.htm', '', 20, 0, 0);

// Reopen menu
menu[14] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[14][0] = new Menu(true, '>', 139, 0, 120, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[14][1] = new Item('Profil en travers', '../waivis/dettogo1.htm', '', 20, 0, 0);
menu[14][2] = new Item('Profil en long', '../waivis/dettogo2.htm', '', 20, 0, 0);


// Reopen menu
menu[15] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[15][0] = new Menu(true, '>', 99, 0, 120, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[15][1] = new Item('Profil en travers', '../waivis/dettogo1.htm', '', 20, 0, 0);
menu[15][2] = new Item('Profil en long', '../waivis/dettogo2.htm', '', 20, 0, 0);

// Reopen menu
menu[16] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[16][0] = new Menu(true, '>', 99, 0, 140, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[16][1] = new Item('Bas-fond de Gankpétin', '../waivis/detbegan.htm', '', 20, 0, 0);
menu[16][2] = new Item('Bas-fond de Gomé', '../waivis/detbegom.htm', '', 20, 0, 0);

// *** OPTIONAL CODE FROM HERE DOWN ***

// These two lines handle the window resize bug in NS4. See <body onResize="...">.
// I recommend you leave this here as otherwise when you resize NS4's width menus are hidden.

var popOldWidth = window.innerWidth;
nsResizeHandler = new Function('if (popOldWidth != window.innerWidth) location.reload()');


// This is a quick snippet that captures all clicks on the document and hides the menus
// every time you click. Use if you want.

if (isNS4) document.captureEvents(Event.CLICK);
document.onclick = clickHandle;

function clickHandle(evt)
{
 if (isNS4) document.routeEvent(evt);
 hideAllBut(0);
}


// This is just the moving command for the example.

function moveRoot()
{
 with(menu[0][0].ref) left = ((parseInt(left) < 100) ? 100 : 5);
}
//  End -->
