/***************************************************************************************/
/************************$$$          VIRTUAL WINDOW OJECT     $$$ *********************/
/***************************************************************************************/

            function virtualWin(psDivVirtualId, evt)
            {
                this.oWinDiv = document.getElementById(psDivVirtualId)
                this.ie=document.all
                this.ns=document.layers
                this.ns6=document.getElementById&&!document.all
                this.dragapproved=false;

                this.tempx = this.ns6 ? pageXOffset + evt.clientX + 20: evt.clientX + document.body.scrollLeft + 20;
                this.tempy = this.ns6 ? pageYOffset + evt.clientY : evt.clientY + document.documentElement.scrollTop;
                this.offsetx = 0
                this.offsety = 0
            }


            function closeWin(){
                this.oWinDiv.style.display="none";
            }

            function showWin(pbNotInit){
                if(!pbNotInit)
                {
                this.oWinDiv.style.left = this.tempx+"px";
                this.oWinDiv.style.top  = (this.tempy-this.oWinDiv.offsetHeight) + "px";
                }
                this.oWinDiv.style.display="block";
            }

            //drag drop function for IE 4+ and NS6////
            /////////////////////////////////

            function initDrag(evt){
                this.offsetx = evt.clientX
                this.offsety = evt.clientY

                this.tempx = parseInt(this.oWinDiv.style.left);
                this.tempy = parseInt(this.oWinDiv.style.top);

                this.dragapproved=true
                document.onmousemove = drag_drop
                window.oCurrentWin = this;
            }


            // Definition des methodes
            virtualWin.prototype.closeWin           = closeWin;
            virtualWin.prototype.showWin            = showWin;
            virtualWin.prototype.initDrag           = initDrag;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function drag_drop(e)
{
    if (oCurrentWin.ie && oCurrentWin.dragapproved){
        oCurrentWin.oWinDiv.style.left = oCurrentWin.tempx + event.clientX - oCurrentWin.offsetx;
        oCurrentWin.oWinDiv.style.top  = oCurrentWin.tempy + event.clientY - oCurrentWin.offsety;

    }
    else if (oCurrentWin.ns6 && oCurrentWin.dragapproved){
        oCurrentWin.oWinDiv.style.left = oCurrentWin.tempx + e.clientX - oCurrentWin.offsetx+"px";
        oCurrentWin.oWinDiv.style.top  = oCurrentWin.tempy + e.clientY - oCurrentWin.offsety+"px";
    }
    return false
}

function AffBulle(psContent, evt)
{
    window.infoBulle = new virtualWin("bulle",evt);
    sContent = "<table width=\"230px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"tooltip\"><tr height=\"12px\"><td class=\"popupSep\"></td></tr><tr><td class=\"popupSection\" valign=\"top\"><table width=\"100%\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\"><tr><td align=\"center\">"+psContent+"</td></tr><tr height=\"12px\"><td class=\"popupSep\"></td></tr></table></td></tr><table>";
    infoBulle.oWinDiv.innerHTML = sContent;
    window.infoBulle.showWin();
    window.infoBulle.oWinDiv.style.top  = (window.infoBulle.tempy-window.infoBulle.oWinDiv.offsetHeight) + "px";
}


function HideBulle()
{
    //alert(window.infoBulle.offsetHeight);
    window.infoBulle.closeWin();
}




