// UDMv4.44 // Onfocus Tooltips extension v1.01 //
/***************************************************************\

  ULTIMATE DROP DOWN MENU Version 4.44 by Brothercake
  http://www.udm4.com/
  
\***************************************************************/
var tt=new Object;um.addReceiver(initialiseToolTips,'010');function initialiseToolTips(){if(um.s){return;}tt.allTags=document.getElementsByTagName('*');tt.allTagsLen=tt.allTags.length;for (var i=0;i<tt.allTagsLen;i++){if(tt.allTags[i].title){tt.allTags[i].onfocus=tt.focusTimer;tt.allTags[i].onblur=tt.blurTip;tt.allTags[i].onmouseover=tt.blurTip;}}tt.goTimer=null;tt.toolTip=null;tt.toolTipParent=null;};tt.focusTimer=function(e){if(tt.goTimer!=null){clearInterval(tt.goTimer);tt.goTimer=null;tt.focusTip();}else{tt.obj=(e)?e.target:event.srcElement;tt.goTimer=setInterval('tt.focusTimer()',500);}};tt.focusTip=function(){tt.blurTip();if(tt.toolTip==null){tt.winSize=um.getWindowDimensions();tt.text=tt.obj.title;tt.attribs={'class':'','text':tt.text};tt.toolTip=um.createElement('div',tt.attribs);tt.toolTip.className='tooltip';if(tt.toolTipParent==null){tt.toolTipParent={x:um.getRealPosition(tt.obj,'x')+2,y:um.getRealPosition(tt.obj,'y')+2};}tt.toolTipParent.y+=tt.obj.offsetHeight;tt.toolTip.style.left=tt.toolTipParent.x+'px';tt.toolTip.style.top=tt.toolTipParent.y+'px';document.getElementsByTagName('body').item(0).appendChild(tt.toolTip);if(tt.toolTip.offsetWidth>300){tt.toolTip.style.width='300px';}tt.extent={x:tt.toolTip.offsetWidth,y:tt.toolTip.offsetHeight};if((tt.toolTipParent.x+tt.extent.x)>=tt.winSize.x){tt.toolTipParent.x-=tt.extent.x;tt.toolTip.style.left=tt.toolTipParent.x+'px';}tt.scroll=um.getScrollAmount();if((tt.toolTipParent.y+tt.extent.y)>=(tt.winSize.y+tt.scroll)){tt.toolTipParent.y-=(tt.extent.y+tt.obj.offsetHeight+4);tt.toolTip.style.top=tt.toolTipParent.y+'px';}}};tt.blurTip=function(){if(typeof tt.toolTip!=um.un&&tt.toolTip!=null){document.getElementsByTagName('body').item(0).removeChild(tt.toolTip);tt.toolTip=null;tt.toolTipParent=null;}clearInterval(tt.goTimer);tt.goTimer=null;};
