/*IE4 = (document.all) ? true : false;*/
NS4 = (document.layers) ? true : false;
NS6 = (document.getElementById) ? true : false;
/*VERSION4 = (IE4 | NS4) ? true : false;*/
VERSION4 = (NS4 | NS6 ) ? true : false;

if (!VERSION4) event = null;

function helpGetOffset(obj, coord) {
        var val = obj["offset"+coord] ;
        if (coord == "Top") val += obj.offsetHeight;
        while ((obj = obj.offsetParent )!=null) {
                val += obj["offset"+coord];
                if (obj.border && obj.border != 0) val++;
        }
        return val;
}

function helpDown () {
        /*if (NS6) document.all.helpBox.style.visibility = "hidden";*/
        if (NS6) document.all.helpBox.style.visibility = "hidden";
        if (NS4) document.helpBox.visibility = "hidden";
}

function helpOver (event,texte) {
        if (!VERSION4) return;

        var ptrObj, ptrLayer;
/*        if (IE4) {
                ptrObj = event.srcElement;
                ptrLayer = document.all.helpBox;
        }*/
        if (NS6) {
                ptrObj = event.srcElement? event.srcElement : event.target; 
                ptrLayer = document.all.helpBox;
        }
        if (NS4) {
                ptrObj = event.target;
                ptrLayer = document.helpBox;
        }

        if (!ptrObj.onmouseout) ptrObj.onmouseout = helpDown;

        var str = '<DIV CLASS="helpBoxDIV">'+texte+'</DIV>';
        /*if (IE4) {
                ptrLayer.innerHTML = str;
                ptrLayer.style.top  = helpGetOffset (ptrObj,"Top")+3;
                ptrLayer.style.left = helpGetOffset (ptrObj,"Left")-10;
                ptrLayer.style.visibility = "visible";
        }*/
        if (NS6) {
                ptrLayer.innerHTML = str;
                ptrLayer.style.top  = helpGetOffset (ptrObj,"Top")+2;
                ptrLayer.style.left = helpGetOffset (ptrObj,"Left");
                ptrLayer.style.visibility = "visible";
        }
        if (NS4) {
                ptrLayer.document.write (str);
                ptrLayer.document.close ();
                ptrLayer.document.bgColor = "yellow";
                ptrLayer.top  = ptrObj.y + 20;
                ptrLayer.left = ptrObj.x;
                ptrLayer.visibility = "show";
        }
}