var cBalloonTitle = {
    oBalloonContainer:  null,
    oBalloonTitle:      null,
    
    init:               function (sElementType, oRoot)
                        {
                            cBalloonTitle.buildBalloon();
                            
                            if (oRoot == undefined
                                || oRoot == null)
                            {
                                oRoot = document;
                            }
                            
                            var aElements = oRoot.getElementsByTagName(sElementType);
                            
                            var i = aElements.length;
                            while (i--)
                            {
                                
                                if (aElements[i].title != undefined
                                    || aElements[i].title != null)
                                {
                                    aElements[i].titleSaved = aElements[i].title;
                                    
                                    aElements[i].onmouseover = cBalloonTitle.showBalloon;
                                    aElements[i].onmouseout = cBalloonTitle.hideBalloon;
                                }
                            }
                        },
                        
    buildBalloon:       function ()
                        {
                            var oBalloonContainerDiv = document.createElement('div');
                            oBalloonContainerDiv.id = 'balloonTitleContainer';
                            oBalloonContainerDiv.className = 'balloonTitleContainer_Hide';
                            
                            var oBalloonTitleDiv = document.createElement('div');
                            oBalloonTitleDiv.id = 'balloonTitle';
                            
                            oBalloonContainerDiv.appendChild(oBalloonTitleDiv);
                            
                            document.body.appendChild(oBalloonContainerDiv);
                            
                            cBalloonTitle.oBalloonContainer = oBalloonContainerDiv;
                            cBalloonTitle.oBalloonTitle = oBalloonTitleDiv;
                        },
                        
    showBalloon:        function ()
                        {
                            cBalloonTitle.oBalloonTitle.innerHTML = this.title;
                            cBalloonTitle.oBalloonContainer.className = 'balloonTitleContainer_Show';
                            
                            var iOffsetTop = 25;
                            var iOffsetLeft = 10;
                            var oElement = this;
                            
                            if (oElement.offsetParent) {
                                do {
                                    iOffsetTop += oElement.offsetTop;
                                    iOffsetLeft += oElement.offsetLeft;
                                } while (oElement = oElement.offsetParent);
                            }

                            cBalloonTitle.oBalloonContainer.style.top = iOffsetTop + 'px';
                            cBalloonTitle.oBalloonContainer.style.left = iOffsetLeft + 'px';
                            
                            this.title = '';
                            
                            return false;
                        },
    
    hideBalloon:        function ()
                        {
                            cBalloonTitle.oBalloonContainer.className = 'balloonTitleContainer_Hide';
                            
                            this.title = this.titleSaved;
                        }
}
