
function init_tt()
 {
 tts = $$('div.tooltip')
 tts.each(function(tt) {
 target = $(tt.getAttribute('target'))
 coords =  target.viewportOffset()

 var left = 0;
 var direction = tt.getAttribute('pp_direction')
 if (direction == "left")
  left = parseInt(coords[0])-321+"px"
 else
  left = parseInt(coords[0])-321+"px"

 var top  = parseInt(coords[1])+12+"px"

 tt.style.left = left
 tt.style.top  = top
 }
 )
 }

var timer = 0;
var hide_div;

function show_tt(el)
 {
 hide_all();
 clearTimeout(timer);
 $(el).style.visibility="visible";
 }

function hide_tt(el)
 {
 hide_div = $(el);
// $(el).style.visibility='hidden' 
// hide_all();
 timer = setTimeout("hide_all()",100);
 }

function hide_all()
 {
 tts = $$('div.tooltip')
 tts.each(function(tt) {
 tt.style.visibility="hidden";
 });
 }

function hide_el_now()
 {
 hide_all();
// hide_div.style.visibility='hidden' 
 }