/************************************************************************************************************
Ajax dynamic list
Copyright (C) September 2005  DTHMLGoodies.com, Alf Magne Kalleland

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Dhtmlgoodies.com., hereby disclaims all copyright interest in this script
written by Alf Magne Kalleland.

Alf Magne Kalleland, 2006
Owner of DHTMLgoodies.com
	
************************************************************************************************************/
var offsetX = 0;
var offsetY = 5;
function showToolTip(e, text) {

    var obj = document.getElementById('bubble_tooltip');
    var obj2 = document.getElementById('bubble_tooltip_content');
    obj2.innerHTML = text;
    obj.style.display = 'block';
    //document.getElementById('bubble_tooltip_content').attachEvent('onmouseleave', hideToolTip);
    if (document.all) {

        var agt = navigator.userAgent.toLowerCase();
        var is_major = parseInt(navigator.appVersion);
        var is_minor = parseFloat(navigator.appVersion);

        var is_nav = ((agt.indexOf('mozilla') != -1) && (agt.indexOf('spoofer') == -1)
                                        && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera') == -1)
                                        && (agt.indexOf('webtv') == -1) && (agt.indexOf('hotjava') == -1));
        var is_nav4 = (is_nav && (is_major == 4));
        var is_nav6 = (is_nav && (is_major == 5));
        var is_nav6up = (is_nav && (is_major >= 5));
        var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
        if (!is_ie) {
            x = e.pageX;
            y = e.pageY;
        } else {
            x = event.x - 130 + document.body.scrollLeft;
            y = event.y + document.body.scrollTop;
        }

        var isIE5Min = getIEVersionNumber();
        if (parseInt(isIE5Min) >= 6 && parseInt(isIE5Min) < 7) {
            obj.style.left = x-200 + document.body.scrollLeft;
            obj.style.top = y + document.body.scrollTop;


        }
        else {
            obj.style.left = x + document.body.scrollLeft;
            obj.style.top = y + document.body.scrollTop;

        }
    }
    else {

        var x = e.clientX - 130;
        var y = e.clientY - 160;
        obj.style.left = x + document.body.scrollLeft + "px";
        obj.style.top = y + document.body.scrollTop + "px";
    }
}


function getIEVersionNumber() {
    var ua = navigator.userAgent;
    var MSIEOffset = ua.indexOf("MSIE ");

    if (MSIEOffset == -1) {
        return 0;
    } else {
        return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
    }
}


function hideToolTip(e) {
    //alert(e.type + ': ' + e.srcElement.id);
    document.getElementById('bubble_tooltip').style.display = 'none';

}



