
if(typeof ToolTip_js_parsed=='undefined'){
Infragistics.UI.BubbleToolTip=function(sourceElement,tooltipDivId,showDelay,hideDelay,offsetX,offsetY){
this.__sourceElement=sourceElement;
this.__toolTipDiv=document.getElementById(tooltipDivId);
this.__offsetX=!offsetX?0:offsetX;
this.__offsetY=!offsetY?0:offsetY;
this.__showDelay=!showDelay?0:parseInt(showDelay);
this.__hideDelay=!hideDelay?0:parseInt(hideDelay);
this.__hideTimer=null;
this.__showTimer=null;
this.__mouseOverChildrenHandler=null;
if(typeof Infragistics.UI.BubbleToolTip.__initialized=='undefined'){
Infragistics.UI.BubbleToolTip.prototype.__toggleBubble=function(invert){
for(var i=0;i<this.__toolTipDiv.childNodes.length;i++){
switch(this.__toolTipDiv.childNodes[i].className){
case 'top':
if(invert)
this.__toolTipDiv.childNodes[i].className='inv_top';
break;
case 'inv_top':
if(!invert)
this.__toolTipDiv.childNodes[i].className='top';
break;
case 'bottom':
if(invert)
this.__toolTipDiv.childNodes[i].className='inv_bottom';
break;
case 'inv_bottom':
if(!invert)
this.__toolTipDiv.childNodes[i].className='bottom';
break;}}}
Infragistics.UI.BubbleToolTip.prototype.__onMouseOverChildren=function(){
this.clearHideTimer();
if(!this.isVisible())
this.show();}
Infragistics.UI.BubbleToolTip.prototype.__attachMaintain=function(element){
if(element.hasChildNodes){
for(var i=0;i<element.childNodes.length;i++){
var child=element.childNodes[i];
if(child.addEventListener)
child.addEventListener('mouseover',this.__mouseOverChildrenHandler,false);
else if(child.attachEvent)
child.attachEvent('onmouseover',this.__mouseOverChildrenHandler);
this.__attachMaintain(child);}}}
Infragistics.UI.BubbleToolTip.prototype.isVisible=function(){
return(this.__toolTipDiv.className==Infragistics.UI.BubbleToolTip.__showCssClass);}
Infragistics.UI.BubbleToolTip.prototype.show=function(showImmediately){
if(!Infragistics.UI.BubbleToolTip.__tooltipsEnabled)
return;
if(this.__showDelay>0){
if(!this.__showTimer&&!showImmediately){
this.__showTimer=window.setTimeout(Function.createDelegate(this,function(){this.show(true);}),this.__showDelay);
return;}
else{
if(showImmediately)
this.clearShowTimer();
else
return;}}
var sourceBounds=Sys.UI.Control.getBounds(this.__sourceElement);
var position={x:sourceBounds.x+this.__offsetX,y:sourceBounds.y+this.__offsetY+(sourceBounds.height/2)};
var windowDims=Sys.UI.Control.getWindowDimensions();
this.__toolTipDiv.style.visibility='hidden';
this.__toolTipDiv.className=Infragistics.UI.BubbleToolTip.__showCssClass;
this.__toolTipDiv.style.position='absolute';
var tooltipBounds=Sys.UI.Control.getBounds(this.__toolTipDiv);
if((position.y+tooltipBounds.height)>windowDims.bottom){
position.y-=tooltipBounds.height+sourceBounds.height+this.__offsetY;
this.__toggleBubble(true);}
else{
this.__toggleBubble(false);}
document.body.appendChild(this.__toolTipDiv);
Sys.UI.Control.setLocation(this.__toolTipDiv,position);
this.__toolTipDiv.style.visibility='visible';}
Infragistics.UI.BubbleToolTip.prototype.clearShowTimer=function(){
if(this.__showTimer){
window.clearTimeout(this.__showTimer);
this.__showTimer=null;}}
Infragistics.UI.BubbleToolTip.prototype.hide=function(hideImmediately){
this.clearShowTimer();
if(this.__hideDelay>0){
if(!this.__hideTimer&&!hideImmediately){
this.__hideTimer=window.setTimeout(Function.createDelegate(this,function(){this.hide(true);}),this.__hideDelay);
return;}
else{
if(hideImmediately)
this.clearHideTimer();
else
return;}}
this.__toolTipDiv.className=Infragistics.UI.BubbleToolTip.__hideCssClass;
var pos={x:0,y:0};
Sys.UI.Control.setLocation(this.__toolTipDiv,pos);}
Infragistics.UI.BubbleToolTip.prototype.clearHideTimer=function(){
if(this.__hideTimer){
window.clearTimeout(this.__hideTimer);
this.__hideTimer=null;}}
Infragistics.UI.BubbleToolTip.prototype.dispose=function(){
this.hide();}}
Infragistics.UI.BubbleToolTip.__initialized=true;
if(!sourceElement)
Infragistics.ExceptionHandling.handleException('Must supply sourceElement.');
if(!tooltipDivId)
Infragistics.ExceptionHandling.handleException('Must supply tooltipDivId.');
if(!this.__toolTipDiv)
Infragistics.ExceptionHandling.handleException('Could not find div with ID of '+tooltipDivId+'.');
if(navigator.userAgent.indexOf('Firefox')!=-1){
for(var i=0;i<this.__toolTipDiv.childNodes.length;i++){
if(this.__toolTipDiv.childNodes[i].className=='middle'){
for(var j=0;j<this.__toolTipDiv.childNodes[i].childNodes.length;j++)
if(this.__toolTipDiv.childNodes[i].childNodes[j].className=='content')
this.__toolTipDiv.childNodes[i].childNodes[j].style.border='solid 1px transparent';
break;}}}
if(!this.__mouseOverChildrenHandler)
this.__mouseOverChildrenHandler=Function.createDelegate(this,this.__onMouseOverChildren);
this.__attachMaintain(this.__sourceElement);}
Infragistics.UI.BubbleToolTip.__tooltipsEnabled=true;
Infragistics.UI.BubbleToolTip.__showCssClass='ShowToolTip';
Infragistics.UI.BubbleToolTip.__hideCssClass='HideToolTip';
Infragistics.UI.BubbleToolTip.showToolTip=function(sourceElement,tooltipId,showDelay,hideDelay,offsetX,offsetY){
if(!Infragistics.UI.BubbleToolTip.__tooltipsEnabled)
return;
if(!sourceElement.popupTip)
sourceElement.popupTip=new Infragistics.UI.BubbleToolTip(sourceElement,tooltipId,showDelay,hideDelay,offsetX,offsetY);
sourceElement.popupTip.show();}
Infragistics.UI.BubbleToolTip.maintainToolTip=function(sourceElementId){
var sourceElement=document.getElementById(sourceElementId);
if(sourceElement&&sourceElement.popupTip){
if(!Infragistics.UI.BubbleToolTip.__tooltipsEnabled){
sourceElement.popupTip.hide();
return;}
sourceElement.popupTip.clearHideTimer();
if(!sourceElement.popupTip.isVisible())
sourceElement.popupTip.show();}}
Infragistics.UI.BubbleToolTip.hideToolTip=function(sourceElementId){
var sourceElement=document.getElementById(sourceElementId);
if(sourceElement&&sourceElement.popupTip)
sourceElement.popupTip.hide();}
Infragistics.UI.BubbleToolTip.disableToolTips=function(){
Infragistics.UI.BubbleToolTip.__tooltipsEnabled=false;}
Infragistics.UI.BubbleToolTip.enableToolTips=function(){
Infragistics.UI.BubbleToolTip.__tooltipsEnabled=true;}
Infragistics.UI.BubbleToolTip.setShowCssClass=function(cssClass){
Infragistics.UI.BubbleToolTip.__showCssClass=cssClass;}
Infragistics.UI.BubbleToolTip.setHideCssClass=function(cssClass){
Infragistics.UI.BubbleToolTip.__hideCssClass=cssClass;}
ToolTip_js_parsed=true;}

