/* Image w/ description tooltip- Copyright 2002 by Sharon Paine */
/* modified by Kakou cyr Leonce Anicet cyrkakou@yahoo.fr */

/* IMPORTANT: Put script after tooltip div or put tooltip div just before </BODY>. */

var dom = (document.getElementById) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie4 = (document.all && !dom) ? true : false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

// resize fix for ns4
var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

// avoid error of passing event object in older browsers
if (nodyn) { event = "nope" }

//////////////////////////////////////  CUSTOMIZE HERE ////////////////////////////////////
// settings for tooltip 
var tipFollowMouse= true;	// true if you want tip to move onmouseover link?
var tipWidth= 200; 	        // set tipWidth wide enough 
var offX= 20;			// how far from mouse to show tip
var offY= 12; 
var tipFontFamily= "Verdana, arial, helvetica, sans-serif";
var tipFontSize= "8pt";
var tipFontColor= "#000000"; 	// tooltip default text color 
var tipBgColor= "#DDECFF"; 	// tooltip default background color
var tipBorderColor= "#000080";
var tipBorderWidth= 1;
var tipBorderStyle= "ridge";
var tipPadding= 4;
/////////////////////////////////////////////////////////////////////////////////////////

// tooltip content goes here (image, description, optional bgColor, optional textcolor)
var messages = new Array();
// multi-dimensional arrays containing: 
// image and text for tooltip
// optional: bgColor and color to be sent to tooltip

/*

 





*/

//CarteCI message

messages[0]  = new Array('','','ECFEE7',"#000000");
messages[1]  = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Korhogo</font><br>Rue principale<br> - BP 66/Tél: 36 86 05 72<br>Fax: 36 86 29 61','ECFEE7',"#000000");
messages[2]  = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Ferkessedougou</font>:<br>Rue du Mali<br>- BP 138/Tél: 36 86 80 76','ECFEE7',"#000000");
messages[3]  = new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Touba</font>:<br>Rue de l'ancien marché<br> - BP 65 -<br>Tél: 33 70 70 06<br>Fax: 33 70 72 96",'ECFEE7',"#000000");
messages[4]  = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Bondoukou</font>:Rue Principale Face Maison PDCI<br>- BP 121 -<br>Tél: 35 91 50 80<br>Fax: 35 91 54 98','ECFEE7',"#000000");
messages[5]  = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Séguéla</font>:<br>Rue Principale<br>- BP 231 -<br>Tél: 32 74 01 43<br>Fax: 32 74 07 03','ECFEE7',"#000000");
messages[6]  = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Man</font>:<br>Rue centrale<br>- BP 406 -<br>Tél: 33 79 05 39<br>Fax: 33 79 28 57','ECFEE7',"#000000");
messages[7]  = new Array('','','ECFEE7',"#000000");
messages[8]  = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Bouaké</font>:<br>Bd de la mairie,<br>quartier Commerce<br>- BP 583, Bouaké -<br>Tél: 31 63 15 86 <br>Fax: 31 63 15 69','ECFEE7',"#000000");
messages[9]  = new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Daloa</font>:<br>Route d'Issia, Quartier commercial<br>-BP 1442, Daloa -<br>Tél: 32 78 35 71<BR>Fax: 32 78 01 19",'ECFEE7',"#000000");
messages[10] = new Array('',"<font size='2' face='Arial' color='#0000FF'>Direction Régionale Yamoussoukro</font>:<br>Route d'Abidjan<br> - BP 97 -<br>Tél: 30 64 01 38<br>Fax: 30 64 09 86",'ECFEE7',"#000000");
messages[11] = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Abengourou</font>:<br>Place du marché<br>- BP 139 -<br>Tél: 35 91 31 46<br>Fax: 35 91 37 00','ECFEE7',"#000000");
messages[12] = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Gagnoa</font>:<br>Rue du Commerce<br>- BP 587 -<br>Tél: 32 77 25 34<br>Fax: 32 77 24 85','ECFEE7',"#000000");
messages[13] = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Toumodi</font>:<br>Voie principale<br> - BP 905/Tél: 30 62 91 48','ECFEE7',"#000000");
messages[14] = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Soubré</font>:<br>Av. Principale<br> - BP 252 -<br>Tél: 34 72 21 31<br>Fax: 34 72 22 53 ','ECFEE7',"#000000");
/*messages[15] = new Array('','<font size="2" face="Arial" color="#0000FF">Adzopé</font>:Imm. Schroerder<br>- BP 342 -<br>Tél: 23 54 02 13<br>Fax: 23 54 05 39','ECFEE7',"#000000");
Tél: 34 72 21 31<br>Fax: 34 72 22 53','ECFEE7',"#000000");*/
messages[16] = new Array('','','ECFEE7',"#000000");
messages[17] = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Agboville</font>:Centre commercial<br>Tél: 23 54 71 93<br>Fax: 23 54 73 04','ECFEE7',"#000000");
messages[18] = new Array('','<font size="2" face="Arial" color="#0000FF">Agence Grand Béréby</font>:SOGB','ECFEE7',"#000000");
messages[19] = new Array('','<font size="2" face="Arial" color="#0000FF"> Direction Régionale  San Pedro</font><br>Bd de la République Quartier commercial<br>- BP 335 San Pedro -<br>Tél: 34 71 28 48<BR>Fax: 34 71 31 78','ECFEE7',"#000000");
messages[20] = new Array('',"<font size='2' face='Arial' color='#0000FF'>Cliquez ici pour plus d'infos</font>",'ECFEE7',"#000000");

//leftnavbar message

messages[21] = new Array('','<font size="2" face="Arial" color="#0000FF">La BICICI près de chez vous !</font><br>Toutes nos agences à travers le pays...',
'ECFEE7',"#000000");
messages[22] = new Array('','<font size="2" face="Arial" color="#0000FF">Les cartes BICICI Visa<br> Electron, Premier et Affaires</font><br>pour vous faciliter la vie...',
'ECFEE7',"#000000");
messages[23] = new Array('','<font size="2" face="Arial" color="#0000FF">Le dictionnaire bancaire</font><br>Plus de secret sur les termes techniques de la banque...',
'ECFEE7',"#000000");
messages[24] = new Array('','<font size="2" face="Arial" color="#0000FF">BICICI News</font><br>Stages, emplois, opérations prestigieuses...',
'ECFEE7',"#000000");
messages[25] = new Array('','<font size="2" face="Arial" color="#0000FF">BICICI NET</font><br>Suivez vos comptes via le web...',
'ECFEE7',"#000000");

//CarteAfrique message

messages[30]= new Array('','<font size="2" face="Arial" color="#0000FF">Gabon: BICIG</font><br>Siège social: Av du colonel Parant Libreville-BP: 2241-<br>Tél: (241) 76 26 13<br>Fax: (241) 74 40 34',"#ECFEE7","#000000");
messages[31]= new Array('','<font size="2" face="Arial" color="#0000FF">Mali: BICIM</font><br>Siège Social: Imm Nimagala ; bd du peuple-BPB : 72-<br>Tél:(223) 223 33 68/69/70<br>Fax: (223) 223 33 73',"#ECFEE7","#000000");
messages[32]= new Array('','<font size="2" face="Arial" color="#0000FF">Senegal: BICIS</font><br>Siège social: 2, Av Roume, DAKAR-BP: 392-<br>Tél: (221) 839 03 90<br>Fax: (221) 823 37 07',"#ECFEE7","#000000");
messages[33]= new Array('','<font size="2" face="Arial" color="#0000FF">Guinée: BICIGUI</font><br>Siège social: Av de la République, Conakry-BP: 1484-<br>Tél: (224) 44 50 11<br>Fax: (224) 44 39 62',"#ECFEE7","#000000");
messages[34]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Côte d'Ivoire: BICICI<br>-Cliquez pour plus d'infos-</font><br>Siège social: Av Franchet et d'Esperey, Abidjan-BP: 01 BP 1298 Abidjan 01-<br>Tél: (225) 20 20 16 00<br>Fax: (225) 20 20 17 00","#ECFEE7","#000000");
//messages[35]= new Array('','<font size="2" face="Arial" color="#0000FF">
messages[36]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Burkina Faso: BICIAB</font><br>Siège social: Av KWAME N'KRUMAH Ouagadougou-BP: 08 Ouagadougou 01-<br>Tél: (226) 32 62 26<br>Fax: (226) 31 19 55","#ECFEE7","#000000");

//CarteAbidjan message

messages[37]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Abobo</font><br>Quartier Amakébou<br>Tél: (225) 24 39 27 33","#ECFEE7","#000000");
messages[38]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Adjamé</font><br>Bd St Michel Adjamé<br>Tél: (225) 20 37 58 49","#ECFEE7","#000000");
messages[39]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Clozel</font><br>Bd Clozel, Résidence les Acacias<br>Tél: (225) 20 21 58 59","#ECFEE7","#000000");
messages[40]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Cocody Cité des arts</font><br>Tél: (225) 22 44 47 41","#ECFEE7","#000000");
messages[41]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Cocody Deux Plateaux</font><br>Centre Commercial du Vallon<br>Tél: (225) 22 41 33 69","#ECFEE7","#000000");
messages[42]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Cocody Riviera</font><br>Centre Commercial SICOGI<br>Tél: (225) 22 43 00 64","#ECFEE7","#000000");
messages[43]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Commerce</font><br>Av. Noguès - Résidence Nabil<br>Tél/Fax: (225) 20 32 67 30","#ECFEE7","#000000");
messages[44]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Latrille</font><br>Face commissariat Angré<br>Tél: (225) 22 52  28 81<br>Fax: (225) 22 42 07 49","#ECFEE7","#000000");
messages[45]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Yopougon</font><br>Rue principale<br>Tél: (225) 23 45 11 68<br>Fax: (225) : 23 45 73 69","#ECFEE7","#000000");
messages[46]= new Array('',"<font size='2' face='Arial' color='#0000FF'>SUCCURSALE ABIDJAN SUD</font><br>89, Bd de Marseille<br>01 BP 1413,  Abidjan 01<br>Tél: (225) 20 20 18 00<br>Fax: (225) 21 35 91 61","#ECFEE7","#000000");
messages[47]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Treichville Arras</font><br>Av. Laurent Pierre Clouzet<br>Tél: (225) 21 24 18 01","#ECFEE7","#000000");
messages[48]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Koumassi</font><br>Bd du 7 décembre<br>Tél: (225) 21 36 01 25<br>Fax: (225) 21 36 00 99","#ECFEE7","#000000");
messages[49]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Marcory</font><br>Angle Bd Giscard<br>Rue du Chevalier de Clieu<br>Tél: (225) 21 35 35 57 ","#ECFEE7","#000000");
messages[50]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Port Bouet</font><br>Avenue de l'Océan<br>Tél: (225) 21 27 71 98","#ECFEE7","#000000");
messages[51]= new Array('',"<font size='2' face='Arial' color='#0000FF'> Agence Treichville marché</font><br>Rue 12<br>Tél: (225) 21 24 06 77","#ECFEE7","#000000");
messages[52]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Vridi</font><br>Rue des Pétroliers<br>zone industrielle<br>Tél: (225) 21 27 18 12<br>Fax: (225) 21 27 14 11","#ECFEE7","#000000");
messages[53]= new Array('',"<font size='2' face='Arial' color='#0000FF'>SUCCURSALE ABIDJAN PLATEAU - Siège</font><br>Av. Franchet d'Esperey<br>01 BP 1298 Abidjan 01<br>Tél: (225) 20 20 16 00 <br>Fax: (225) 20 20 17 00","#ECFEE7","#000000");
messages[54]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Angré Djibi</font><br>Carrefour Nelson Mandela<br>Tel: (225) 22 50 26 43 <br> Fax: (225) 22 50 28 97","#ECFEE7","#000000");
messages[55]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Korhogo </font><br>Rue principale <br>Tel: 36 86 23 83<br>Fax:36 86 24 33<br>","#ECFEE7","#000000");
messages[56]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Ferkessedougou</font><br><br>","#ECFEE7","#000000");
messages[57]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Touba</font><br><br>","#ECFEE7","#000000");
messages[58]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Seguela</font><br> <br>","#ECFEE7","#000000");
messages[59]= new Array('',"<font size='2' face='Arial' color='#0000FF'>Agence Man</font><br> <br>","#ECFEE7","#000000");



////////////////////  END OF CUSTOMIZATION AREA  ///////////////////
// to layout image and text, 2-row table, image centered in top cell
// these go in var tip in doTooltip function
// startStr goes before image, midStr goes between image and text
var startStr = '<table width="' + tipWidth + '"><tr>';
var midStr = '</td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';

////////////////////////////////////////////////////////////
//  initTip	- initialization for tooltip.
//		Global variables for tooltip. 
//		Set styles for all but ns4. 
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////

var tooltip, tipcss;

function initTip() {
 if (nodyn) return;
 tooltip = (ns4)? document.tipDiv.document: (ie4)? document.all['tipDiv']: (ie5||ns5)?  document.getElementById('tipDiv'): null;
 tipcss = (ns4)? document.tipDiv: tooltip.style;
 if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
    tipcss.width = tipWidth+"px";
    tipcss.fontFamily = tipFontFamily;
    tipcss.fontSize = tipFontSize;
    tipcss.color = tipFontColor;
    tipcss.backgroundColor = tipBgColor;
    tipcss.borderColor = tipBorderColor;
    tipcss.borderWidth = tipBorderWidth+"px";
    tipcss.padding = tipPadding+"px";
    tipcss.borderStyle = tipBorderStyle;
  }
 if (tooltip&&tipFollowMouse) {
   if (ns4) document.captureEvents(Event.MOUSEMOVE);
            document.onmousemove = trackMouse;
   }
}

window.onload = initTip;

/////////////////////////////////////////////////
//  doTooltip function
//  Assembles content for tooltip and writes 
//  it to tipDiv
/////////////////////////////////////////////////

var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link

function doTooltip(evt,num) {
 if (!tooltip) return;
 if (t1) clearTimeout(t1);	
 if (t2) clearTimeout(t2);
 tipOn = true;
 // set colors if included in messages array
 if (messages[num][2])	var curBgColor = messages[num][2];
   else curBgColor = tipBgColor;
 if (messages[num][3])	var curFontColor = messages[num][3];
   else curFontColor = tipFontColor;
 if (ns4) {
   var tip = '<table bgcolor="' + tipBorderColor + '" width="' + tipWidth + 
   '" cellspacing="0" cellpadding="' + tipBorderWidth + '" border="0"><tr><td><table bgcolor="' +    curBgColor + '" width="100%" cellspacing="0" cellpadding="' + tipPadding + 
   '" border="0"><tr><td>'+ startStr + messages[num][0] + midStr + '<span style="font-family:' +    tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' +      messages[num][1] + '</span>' + endStr + '</td></tr></table></td></tr></table>';
   tooltip.write(tip);
   tooltip.close();
   } else if (ie4||ie5||ns5) {
   var tip = startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily +    '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] +    '</span>' + endStr;
   tipcss.backgroundColor = curBgColor;
   tooltip.innerHTML = tip;
   }
 if (!tipFollowMouse) positionTip(evt);
 else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;

function trackMouse(evt) {
 mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
 mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
 if (tipOn) positionTip(evt);
}

/////////////////////////////////////////////////////////////
//  positionTip function
//  If tipFollowMouse set false, so trackMouse function
//  not being used, get position of mouseover event.
//  Calculations use mouseover event position, 
//  offset amounts and tooltip width to position
//  tooltip within window.
/////////////////////////////////////////////////////////////

function positionTip(evt) {
 if (!tipFollowMouse) {
   mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
   mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
   }
 // tooltip width and height
 var tpWd = (ns4)? tooltip.width: (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
 var tpHt = (ns4)? tooltip.height: (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
 // document area in view (subtract scrollbar width for ns)
 var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset:  document.body.clientWidth+document.body.scrollLeft;
 var winHt = (ns4||ns5)? window.innerHeight-20+window.pageYOffset:  document.body.clientHeight+document.body.scrollTop;
 // check mouse position against tip and window dimensions
 // and position the tooltip 
 if ((mouseX+offX+tpWd)>winWd) 
   tipcss.left = (ns4)? mouseX-(tpWd+offX): mouseX-(tpWd+offX)+"px";
   else tipcss.left = (ns4)? mouseX+offX: mouseX+offX+"px";
 if ((mouseY+offY+tpHt)>winHt) tipcss.top = (ns4)? winHt-(tpHt+offY): winHt-(tpHt+offY)+"px";
   else tipcss.top = (ns4)? mouseY+offY: mouseY+offY+"px";
 if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
 if (!tooltip) return;
 t2=setTimeout("tipcss.visibility='hidden'",100);
 tipOn = false;
}
