var bulle_to = null;
var bulle_id = 0;
var offsetH = -40;
var offsetV = 2;
function show_bulle(id,sens)
{
var ind2 = 18+id;
var ind = 16+id;
if(ind == 31) { ind = 1; }
else if(ind == 32) { ind = 2; }
else if(ind == 33) { ind = 3; }
else if(ind == 34) { ind = 4; }
else if(ind == 35) { ind = 5; }
else if(ind == 36) { ind = 6; }
else if(ind == 37) { ind = 7; }
else if(ind == 38) { ind = 8; }
else if(ind == 39) { ind = 9; }
else if(ind == 40) { ind = 10; }
else if(ind == 41) { ind = 11; }
else if(ind == 42) { ind = 12; }
if(ind2 == 31) { ind2 = 1; }
else if(ind2 == 32) { ind2 = 2; }
else if(ind2 == 33) { ind2 = 3; }
else if(ind2 == 34) { ind2 = 4; }
else if(ind2 == 35) { ind2 = 5; }
else if(ind2 == 36) { ind2 = 6; }
else if(ind2 == 37) { ind2 = 7; }
else if(ind2 == 38) { ind2 = 8; }
else if(ind2 == 39) { ind2 = 9; }
else if(ind2 == 40) { ind2 = 10; }
else if(ind2 == 41) { ind2 = 11; }
else if(ind2 == 42) { ind2 = 12; }
document.getElementById("titre_horo").innerHTML = ''+titre_horo[id]+'
'+date_horo[id]+'
Amour : '+amour_horo[ind]+'
Sexualité : '+sexu_horo[ind];
offsetH = (sens == 1 && id % 2 == 0) ? -220 : -100;
var bulle = document.getElementById('bulle');
if(!bulle) return;
cancel_kill_bulle()
bulle_id = id;
document.onmousemove=place_bulle;
}
function hide_bulle()
{
var bulle = document.getElementById('bulle');
if(!bulle) return;
bulle.style.display = 'none';
bulle_to = null;
}
function kill_bulle(delai)
{
var bulle = document.getElementById('bulle');
if(!bulle) return;
bulle_to = setTimeout('hide_bulle()', delai);
}
function cancel_kill_bulle()
{
if(bulle_to)
{
clearTimeout(bulle_to);
bulle_to = null;
}
}
function place_bulle(e)
{
var bulle = document.getElementById('bulle');
if(!bulle) return;
if(bulle.style.display == '') document.onmousemove=null;
var is_dom = document.getElementById && !document.all;
var curX=(is_dom) ? e.pageX : (window.event.clientX+document.body.scrollLeft);
var curY=(is_dom) ? e.pageY : (window.event.clientY+document.body.scrollTop);
bulle.style.left = (curX + offsetH)+'px';
bulle.style.top = (curY + offsetV)+'px';
var image_bulle = document.getElementById('img_bulle');
if(image_bulle)
{
var image_src = image_bulle.src;
var debut = image_src.indexOf('tous-top')+8;
var fin = image_src.indexOf('.',debut);
image_bulle.src = image_src.substring(0,debut)+bulle_id+image_src.substr(fin);
}
bulle.style.display = '';
}