var show_activ = 0;
var hide_activ = 0;
var _to = null;

function getTipLayer(_index) {
   return document.getElementById('layer_' + _index) || {style:{}};
}

function _showTip(_index) {
   _hideTips();
   getTipLayer(_index).style.display = 'block';
}

function _hideTip(_index) {
   getTipLayer(_index).style.display = 'none';
   hide_activ = _index;
}

function _hideTips() {
   _hideTip(show_activ);
   show_activ = 0;
}


function tipOver(_index) {
	if (_to) window.clearTimeout(_to);
	if (show_activ!=_index) _showTip(_index);
   show_activ = _index;
}

function tipOut(_index) {
   if (_to) window.clearTimeout(_to);
   _to = window.setTimeout('_hideTips()', 0);
} 