   var BubbleTips = {
    
	opacity : "0.9",
     bubbleNode : null,
     
	 activateTipOn : function(type){
       var bubble = document.createElement("span");
       bubble.style.position = "absolute";
       bubble.style.zIndex = "9";
       this.bubbleNode = bubble;
       document.getElementsByTagName("body")[0].appendChild(bubble);
       var tipTags = document.getElementsByTagName(type);
       for(var i=0;i<tipTags.length;i++){
         this.bindBubbleTip(tipTags[i]);
       }
     },
	 
     bindBubbleTip : function(elem) {
      var tipText=elem.getAttribute("title");
      if(tipText==null || tipText.length==0){
        tipText="No title attribute, how sad :-(";
      }
      elem.removeAttribute("title");
      var bubble = this.createElem("span","bubbleTooltip");
      var tipTop = this.createElem("span","top");
      tipTop.appendChild(document.createTextNode(tipText));
      bubble.appendChild(tipTop);
      bubble.appendChild(this.createElem("span","bottom"));
      this.setOpacity(bubble,this.opacity);
	  elem.tooltip = bubble;
      elem.onmouseover = ToolTipEvents.showTooltip;
      elem.onmouseout = ToolTipEvents.hideTooltip;
      elem.onmousemove = ToolTipEvents.followMouse;
    },
	
    createElem : function(tag,className){
      var elem = document.createElement(tag);
      elem.className = className;
      elem.style.display = "block";
      return elem;
    },
	
	setOpacity : function(obj, opa){
		obj.style.filter="alpha(opacity:"+((+opa)*100)+")";
		obj.style.KHTMLOpacity=opa;
		obj.style.MozOpacity=opa;
		obj.style.opacity=opa;
	}
  };
  
    var ToolTipEvents = {
    
	  offsetLeft : (-25),
      offsetTop : (10),
      
	  posRef : function(){
        return ((document.documentElement.scrollTop)?
        document.documentElement : document.body)
        },
      
	  showTooltip : function(e){
        ToolTipEvents._cleanup();
       BubbleTips.bubbleNode.appendChild(this.tooltip);    
	  BubbleTips.setOpacity(this.tooltip,BubbleTips.opacity);
       ToolTipEvents.followMouse(e);
     },
     
	 hideTooltip : function(e){     
	   ToolTipEvents._cleanup();
     },
     
	 followMouse : function(e){
       if(e == null){ e = window.event };
       var posx = ToolTipEvents.offsetLeft;
       var posy = ToolTipEvents.offsetTop;
       if(e.pageX || e.pageY){
         posx += e.pageX;
         posy += e.pageY;
       } else if(e.clientX || e.clientY) {
         var posRef= ToolTipEvents.posRef();
		 posx += e.clientX + posRef.scrollLeft;
         posy += e.clientY + posRef.scrollTop;
       }
       BubbleTips.bubbleNode.style.top = (posy) + "px";
       BubbleTips.bubbleNode.style.left = (posx) + "px";
     },
    
	 _cleanup : function(){
       var bubble = BubbleTips.bubbleNode;
       if( bubble.childNodes.length > 0 ){
         bubble.removeChild(bubble.firstChild);
       }
     }
   };


