
function _object(id) {
    return document.getElementById(id);
}

function _ie() {
    return ((document.selection != undefined) && (window.opera == undefined));
}

function _opera() {
    return (window.opera != undefined);
}

function _firefox() {
    return ((document.selection == undefined) && (window.opera == undefined));
}

function _parent(element) {
    return _ie() ? element.parentElement : element.parentNode;
}

function _child(element, index) {
    return _ie() ? element.children.item(index) : element.childNodes.item(index);
}

function _attribute(element, name, value) {
    if (value == undefined) return element.getAttribute(name); else element.setAttribute(name, value);
}

///////////////////////////////////////////////////////////////////////////

var l_prev = null;

function l_show(c, id) {
    if (l_prev != null) l_prev.style.display = 'none';
    if (l_timer != 0) window.clearTimeout(l_timer);
    var obj = _object(id);
    obj.style.display = 'block';
    // var p = _parent(_parent(c));
    var left;
    if (document.selection == undefined) {
        left = c.offsetLeft - 50;
    }else{
        left = c.offsetLeft + c.clientLeft;
    } 
    
    // window.status = c.offsetLeft + ' ' + c.clientLeft;
    obj.style.marginLeft = (10 + left) + 'px';
    
    var width = 600;
    var _w = (width - 20 - left);
    if (_w < 250) _w += 100;
    obj.style.width = _w + 'px';
    l_prev = obj;
}

var l_closeObj = null;
var l_timer = 0;

function l_out(obj) {
    l_closeObj = obj;
    l_timer = window.setTimeout("l_close()", 1000);
}

function l_close() {
    l_closeObj.style.display = 'none';
    l_timer = 0; 
}

function l_reset(obj) {
    window.clearTimeout(l_timer);
    l_timer = 0; 
}

///////////////////////////////////////////////////////////////////////////

