/* 
  Copyright 2007-2010 hkrn <hikarin@users.sourceforge.jp>
  DOM Tooltip Library Copyright 2002-2005 Dan Allen, Mojavelinux.com (dan.allen@mojavelinux.com)
   */var domLib_userAgent=navigator.userAgent.toLowerCase();var domLib_isMac=navigator.appVersion.indexOf('Mac')!=-1;var domLib_isWin=domLib_userAgent.indexOf('windows')!=-1;var domLib_isOpera=domLib_userAgent.indexOf('opera')!=-1;var domLib_isOpera7up=domLib_userAgent.match(/opera.(7|8)/i);var domLib_isSafari=domLib_userAgent.indexOf('safari')!=-1;var domLib_isKonq=domLib_userAgent.indexOf('konqueror')!=-1;var domLib_isKHTML=(domLib_isKonq||domLib_isSafari||domLib_userAgent.indexOf('khtml')!=-1);var domLib_isIE=(!domLib_isKHTML&&!domLib_isOpera&&(domLib_userAgent.indexOf('msie 5')!=-1||domLib_userAgent.indexOf('msie 6')!=-1||domLib_userAgent.indexOf('msie 7')!=-1));var domLib_isIE5up=domLib_isIE;var domLib_isIE50=(domLib_isIE&&domLib_userAgent.indexOf('msie 5.0')!=-1);var domLib_isIE55=(domLib_isIE&&domLib_userAgent.indexOf('msie 5.5')!=-1);var domLib_isIE5=(domLib_isIE50||domLib_isIE55);var domLib_isGecko=domLib_userAgent.indexOf('gecko/')!=-1;var domLib_isMacIE=(domLib_isIE&&domLib_isMac);var domLib_isIE55up=domLib_isIE5up&&!domLib_isIE50&&!domLib_isMacIE;var domLib_isIE6up=domLib_isIE55up&&!domLib_isIE55;var domLib_standardsMode=(document.compatMode&&document.compatMode=='CSS1Compat');var domLib_useLibrary=(domLib_isOpera7up||domLib_isKHTML||domLib_isIE5up||domLib_isGecko||domLib_isMacIE||document.defaultView);var domLib_hasBrokenTimeout=(domLib_isMacIE||(domLib_isKonq&&domLib_userAgent.match(/konqueror\/3.([2-9])/)==null));var domLib_canFade=(domLib_isGecko||domLib_isIE||domLib_isSafari||domLib_isOpera);var domLib_canDrawOverSelect=(domLib_isMac||domLib_isOpera||domLib_isGecko);var domLib_canDrawOverFlash=(domLib_isMac||domLib_isWin);var domLib_eventTarget=domLib_isIE?'srcElement':'currentTarget';var domLib_eventButton=domLib_isIE?'button':'which';var domLib_eventTo=domLib_isIE?'toElement':'relatedTarget';var domLib_stylePointer=domLib_isIE?'hand':'pointer';var domLib_styleNoMaxWidth=domLib_isOpera?'10000px':'none';var domLib_hidePosition='-1000px';var domLib_scrollbarWidth=14;var domLib_autoId=1;var domLib_zIndex=100;var domLib_collisionElements;var domLib_collisionsCached=false;var domLib_timeoutStateId=0;var domLib_timeoutStates=new Hash();if(!document.ELEMENT_NODE)
{document.ELEMENT_NODE=1;document.ATTRIBUTE_NODE=2;document.TEXT_NODE=3;document.DOCUMENT_NODE=9;document.DOCUMENT_FRAGMENT_NODE=11;}
function domLib_clone(obj)
{var copy={};for(var i in obj)
{var value=obj[i];try
{if(value!=null&&typeof(value)=='object'&&value!=window&&!value.nodeType)
{copy[i]=domLib_clone(value);}
else
{copy[i]=value;}}
catch(e)
{copy[i]=value;}}
return copy;}
function Hash()
{this.length=0;this.numericLength=0;this.elementData=[];for(var i=0;i<arguments.length;i+=2)
{if(typeof(arguments[i+1])!='undefined')
{this.elementData[arguments[i]]=arguments[i+1];this.length++;if(arguments[i]==parseInt(arguments[i]))
{this.numericLength++;}}}}
Hash.prototype.get=function(in_key)
{if(typeof(this.elementData[in_key])!='undefined'){return this.elementData[in_key];}
return null;}
Hash.prototype.set=function(in_key,in_value)
{if(typeof(in_value)!='undefined')
{if(typeof(this.elementData[in_key])=='undefined')
{this.length++;if(in_key==parseInt(in_key))
{this.numericLength++;}}
return this.elementData[in_key]=in_value;}
return false;}
Hash.prototype.remove=function(in_key)
{var tmp_value;if(typeof(this.elementData[in_key])!='undefined')
{this.length--;if(in_key==parseInt(in_key))
{this.numericLength--;}
tmp_value=this.elementData[in_key];delete this.elementData[in_key];}
return tmp_value;}
Hash.prototype.size=function()
{return this.length;}
Hash.prototype.has=function(in_key)
{return typeof(this.elementData[in_key])!='undefined';}
Hash.prototype.find=function(in_obj)
{for(var tmp_key in this.elementData)
{if(this.elementData[tmp_key]==in_obj)
{return tmp_key;}}
return null;}
Hash.prototype.merge=function(in_hash)
{for(var tmp_key in in_hash.elementData)
{if(typeof(this.elementData[tmp_key])=='undefined')
{this.length++;if(tmp_key==parseInt(tmp_key))
{this.numericLength++;}}
this.elementData[tmp_key]=in_hash.elementData[tmp_key];}}
Hash.prototype.compare=function(in_hash)
{if(this.length!=in_hash.length)
{return false;}
for(var tmp_key in this.elementData)
{if(this.elementData[tmp_key]!=in_hash.elementData[tmp_key])
{return false;}}
return true;}
function domLib_isDescendantOf(in_object,in_ancestor,in_bannedTags)
{if(in_object==null)
{return false;}
if(in_object==in_ancestor)
{return true;}
if(typeof(in_bannedTags)!='undefined'&&(','+in_bannedTags.join(',')+',').indexOf(','+in_object.tagName+',')!=-1)
{return false;}
while(in_object!=document.documentElement)
{try
{if((tmp_object=in_object.offsetParent)&&tmp_object==in_ancestor)
{return true;}
else if((tmp_object=in_object.parentNode)==in_ancestor)
{return true;}
else
{in_object=tmp_object;}}
catch(e)
{return false;}}
return false;}
function domLib_detectCollisions(in_object,in_recover,in_useCache)
{if(!domLib_collisionsCached)
{var tags=[];if(!domLib_canDrawOverFlash)
{tags[tags.length]='object';}
if(!domLib_canDrawOverSelect)
{tags[tags.length]='select';}
domLib_collisionElements=domLib_getElementsByTagNames(tags,true);domLib_collisionsCached=in_useCache;}
if(in_recover)
{for(var cnt=0;cnt<domLib_collisionElements.length;cnt++)
{var thisElement=domLib_collisionElements[cnt];if(!thisElement.hideList)
{thisElement.hideList=new Hash();}
thisElement.hideList.remove(in_object.id);if(!thisElement.hideList.length)
{domLib_collisionElements[cnt].style.visibility='visible';if(domLib_isKonq)
{domLib_collisionElements[cnt].style.display='';}}}
return;}
else if(domLib_collisionElements.length==0)
{return;}
var objectOffsets=domLib_getOffsets(in_object);for(var cnt=0;cnt<domLib_collisionElements.length;cnt++)
{var thisElement=domLib_collisionElements[cnt];if(domLib_isDescendantOf(thisElement,in_object))
{continue;}
if(domLib_isKonq&&thisElement.tagName=='SELECT'&&(thisElement.size<=1&&!thisElement.multiple))
{continue;}
if(!thisElement.hideList)
{thisElement.hideList=new Hash();}
var selectOffsets=domLib_getOffsets(thisElement);var center2centerDistance=Math.sqrt(Math.pow(selectOffsets.get('leftCenter')-objectOffsets.get('leftCenter'),2)+Math.pow(selectOffsets.get('topCenter')-objectOffsets.get('topCenter'),2));var radiusSum=selectOffsets.get('radius')+objectOffsets.get('radius');if(center2centerDistance<radiusSum)
{if((objectOffsets.get('leftCenter')<=selectOffsets.get('leftCenter')&&objectOffsets.get('right')<selectOffsets.get('left'))||(objectOffsets.get('leftCenter')>selectOffsets.get('leftCenter')&&objectOffsets.get('left')>selectOffsets.get('right'))||(objectOffsets.get('topCenter')<=selectOffsets.get('topCenter')&&objectOffsets.get('bottom')<selectOffsets.get('top'))||(objectOffsets.get('topCenter')>selectOffsets.get('topCenter')&&objectOffsets.get('top')>selectOffsets.get('bottom')))
{thisElement.hideList.remove(in_object.id);if(!thisElement.hideList.length)
{thisElement.style.visibility='visible';if(domLib_isKonq)
{thisElement.style.display='';}}}
else
{thisElement.hideList.set(in_object.id,true);thisElement.style.visibility='hidden';if(domLib_isKonq)
{thisElement.style.display='none';}}}}}
function domLib_getOffsets(in_object,in_preserveScroll)
{if(typeof(in_preserveScroll)=='undefined'){in_preserveScroll=false;}
var originalObject=in_object;var originalWidth=in_object.offsetWidth;var originalHeight=in_object.offsetHeight;var offsetLeft=0;var offsetTop=0;while(in_object)
{offsetLeft+=in_object.offsetLeft;offsetTop+=in_object.offsetTop;in_object=in_object.offsetParent;if(in_object&&!in_preserveScroll)
{offsetLeft-=in_object.scrollLeft;offsetTop-=in_object.scrollTop;}}
if(domLib_isMacIE){offsetLeft+=10;offsetTop+=10;}
return new Hash('left',offsetLeft,'top',offsetTop,'right',offsetLeft+originalWidth,'bottom',offsetTop+originalHeight,'leftCenter',offsetLeft+originalWidth/2,'topCenter',offsetTop+originalHeight/2,'radius',Math.max(originalWidth,originalHeight));}
function domLib_setTimeout(in_function,in_timeout,in_args)
{if(typeof(in_args)=='undefined')
{in_args=[];}
if(in_timeout==-1)
{return 0;}
else if(in_timeout==0)
{in_function(in_args);return 0;}
var args=domLib_clone(in_args);if(!domLib_hasBrokenTimeout)
{return setTimeout(function(){in_function(args);},in_timeout);}
else
{var id=domLib_timeoutStateId++;var data=new Hash();data.set('function',in_function);data.set('args',args);domLib_timeoutStates.set(id,data);data.set('timeoutId',setTimeout('domLib_timeoutStates.get('+id+').get(\'function\')(domLib_timeoutStates.get('+id+').get(\'args\')); domLib_timeoutStates.remove('+id+');',in_timeout));return id;}}
function domLib_clearTimeout(in_id)
{if(!domLib_hasBrokenTimeout)
{if(in_id>0){clearTimeout(in_id);}}
else
{if(domLib_timeoutStates.has(in_id))
{clearTimeout(domLib_timeoutStates.get(in_id).get('timeoutId'))
domLib_timeoutStates.remove(in_id);}}}
function domLib_getEventPosition(in_eventObj)
{var eventPosition=new Hash('x',0,'y',0,'scrollX',0,'scrollY',0);if(domLib_isIE)
{var doc=(domLib_standardsMode?document.documentElement:document.body);if(doc)
{eventPosition.set('x',in_eventObj.clientX+doc.scrollLeft);eventPosition.set('y',in_eventObj.clientY+doc.scrollTop);eventPosition.set('scrollX',doc.scrollLeft);eventPosition.set('scrollY',doc.scrollTop);}}
else
{eventPosition.set('x',in_eventObj.pageX);eventPosition.set('y',in_eventObj.pageY);eventPosition.set('scrollX',in_eventObj.pageX-in_eventObj.clientX);eventPosition.set('scrollY',in_eventObj.pageY-in_eventObj.clientY);}
return eventPosition;}
function domLib_cancelBubble(in_event)
{var eventObj=in_event?in_event:window.event;eventObj.cancelBubble=true;}
function domLib_getIFrameReference(in_frame)
{if(domLib_isGecko||domLib_isIE)
{return in_frame.frameElement;}
else
{var name=in_frame.name;if(!name||!in_frame.parent)
{return null;}
var candidates=in_frame.parent.document.getElementsByTagName('iframe');for(var i=0;i<candidates.length;i++)
{if(candidates[i].name==name)
{return candidates[i];}}
return null;}}
function domLib_getElementsByClass(in_class)
{var elements=domLib_isIE5?document.all:document.getElementsByTagName('*');var matches=[];var cnt=0;for(var i=0;i<elements.length;i++)
{if((" "+elements[i].className+" ").indexOf(" "+in_class+" ")!=-1)
{matches[cnt++]=elements[i];}}
return matches;}
function domLib_getElementsByTagNames(in_list,in_excludeHidden)
{var elements=[];for(var i=0;i<in_list.length;i++)
{var matches=document.getElementsByTagName(in_list[i]);for(var j=0;j<matches.length;j++)
{if(matches[j].tagName=='OBJECT'&&domLib_isGecko)
{var kids=matches[j].childNodes;var skip=false;for(var k=0;k<kids.length;k++)
{if(kids[k].tagName=='EMBED')
{skip=true;break;}}
if(skip)continue;}
if(in_excludeHidden&&domLib_getComputedStyle(matches[j],'visibility')=='hidden')
{continue;}
elements[elements.length]=matches[j];}}
return elements;}
function domLib_getComputedStyle(in_obj,in_property)
{if(domLib_isIE)
{var humpBackProp=in_property.replace(/-(.)/,function(a,b){return b.toUpperCase();});return eval('in_obj.currentStyle.'+humpBackProp);}
else if(domLib_isKonq)
{return eval('in_obj.style.'+in_property);}
else
{return document.defaultView.getComputedStyle(in_obj,null).getPropertyValue(in_property);}}
function makeTrue()
{return true;}
function makeFalse()
{return false;}
var domTT_offsetX=(domLib_isIE?-2:0);var domTT_offsetY=(domLib_isIE?4:2);var domTT_direction='southeast';var domTT_mouseHeight=domLib_isIE?13:19;var domTT_closeLink='X';var domTT_closeAction='hide';var domTT_activateDelay=500;var domTT_maxWidth=false;var domTT_styleClass='domTT';var domTT_fade='neither';var domTT_lifetime=0;var domTT_grid=0;var domTT_trailDelay=200;var domTT_useGlobalMousePosition=true;var domTT_postponeActivation=false;var domTT_tooltipIdPrefix='[domTT]';var domTT_screenEdgeDetection=true;var domTT_screenEdgePadding=4;var domTT_oneOnly=false;var domTT_cloneNodes=false;var domTT_detectCollisions=true;var domTT_bannedTags=['OPTION'];var domTT_draggable=false;if(typeof(domTT_dragEnabled)=='undefined')
{domTT_dragEnabled=false;}
var domTT_predefined=new Hash();var domTT_tooltips=new Hash();var domTT_lastOpened=0;var domTT_documentLoaded=false;var domTT_mousePosition=null;if(domLib_useLibrary&&domTT_useGlobalMousePosition)
{document.onmousemove=function(in_event)
{if(typeof(in_event)=='undefined'){in_event=window.event;}
domTT_mousePosition=domLib_getEventPosition(in_event);if(domTT_dragEnabled&&domTT_dragMouseDown)
{domTT_dragUpdate(in_event);}}}
function domTT_activate(in_this,in_event)
{if(!domLib_useLibrary||(domTT_postponeActivation&&!domTT_documentLoaded)){return false;}
if(typeof(in_event)=='undefined'){in_event=window.event;}
if(in_event!=null){var target=in_event.srcElement?in_event.srcElement:in_event.target;if(target!=null&&(','+domTT_bannedTags.join(',')+',').indexOf(','+target.tagName+',')!=-1)
{return false;}}
var owner=document.body;if(in_event!=null&&in_event.type.match(/key|mouse|click|contextmenu/i))
{if(in_this.nodeType&&in_this.nodeType!=document.DOCUMENT_NODE)
{owner=in_this;}}
else
{if(typeof(in_this)!='object'&&!(owner=domTT_tooltips.get(in_this)))
{var embryo=document.createElement('div');owner=document.body.appendChild(embryo);owner.style.display='none';owner.id=in_this;}}
if(!owner.id)
{owner.id='__autoId'+domLib_autoId++;}
if(domTT_oneOnly&&domTT_lastOpened)
{domTT_deactivate(domTT_lastOpened);}
domTT_lastOpened=owner.id;var tooltip=domTT_tooltips.get(owner.id);if(tooltip)
{if(tooltip.get('eventType')!=in_event.type)
{if(tooltip.get('type')=='greasy')
{tooltip.set('closeAction','destroy');domTT_deactivate(owner.id);}
else if(tooltip.get('status')!='inactive')
{return owner.id;}}
else
{if(tooltip.get('status')=='inactive')
{tooltip.set('status','pending');tooltip.set('activateTimeout',domLib_setTimeout(domTT_runShow,tooltip.get('delay'),[owner.id,in_event]));return owner.id;}
else
{return owner.id;}}}
var options=new Hash('caption','','content','','clearMouse',true,'closeAction',domTT_closeAction,'closeLink',domTT_closeLink,'delay',domTT_activateDelay,'direction',domTT_direction,'draggable',domTT_draggable,'fade',domTT_fade,'fadeMax',100,'grid',domTT_grid,'id',domTT_tooltipIdPrefix+owner.id,'inframe',false,'lifetime',domTT_lifetime,'offsetX',domTT_offsetX,'offsetY',domTT_offsetY,'parent',document.body,'position','absolute','styleClass',domTT_styleClass,'type','greasy','trail',false,'lazy',false);for(var i=2;i<arguments.length;i+=2)
{if(arguments[i]=='predefined')
{var predefinedOptions=domTT_predefined.get(arguments[i+1]);for(var j in predefinedOptions.elementData)
{options.set(j,predefinedOptions.get(j));}}
else
{options.set(arguments[i],arguments[i+1]);}}
options.set('eventType',in_event!=null?in_event.type:null);if(options.has('statusText'))
{try{window.status=options.get('statusText');}catch(e){}}
if(!options.has('content')||options.get('content')==''||options.get('content')==null)
{if(typeof(owner.onmouseout)!='function')
{owner.onmouseout=function(in_event){domTT_mouseout(this,in_event);};}
return owner.id;}
options.set('owner',owner);domTT_create(options);options.set('delay',(in_event!=null&&in_event.type.match(/click|mousedown|contextmenu/i))?0:parseInt(options.get('delay')));domTT_tooltips.set(owner.id,options);domTT_tooltips.set(options.get('id'),options);options.set('status','pending');options.set('activateTimeout',domLib_setTimeout(domTT_runShow,options.get('delay'),[owner.id,in_event]));return owner.id;}
function domTT_create(in_options)
{var tipOwner=in_options.get('owner');var parentObj=in_options.get('parent');var parentDoc=parentObj.ownerDocument||parentObj.document;var embryo=parentDoc.createElement('div');var tipObj=parentObj.appendChild(embryo);tipObj.style.position='absolute';tipObj.style.left='0px';tipObj.style.top='0px';tipObj.style.visibility='hidden';tipObj.id=in_options.get('id');tipObj.className=in_options.get('styleClass');var contentBlock;var tableLayout=false;if(in_options.get('caption')||(in_options.get('type')=='sticky'&&in_options.get('caption')!==false))
{tableLayout=true;var tipLayoutTable=tipObj.appendChild(parentDoc.createElement('table'));tipLayoutTable.style.borderCollapse='collapse';if(domLib_isKHTML)
{tipLayoutTable.cellSpacing=0;}
var tipLayoutTbody=tipLayoutTable.appendChild(parentDoc.createElement('tbody'));var numCaptionCells=0;var captionRow=tipLayoutTbody.appendChild(parentDoc.createElement('tr'));var captionCell=captionRow.appendChild(parentDoc.createElement('td'));captionCell.style.padding='0px';var caption=captionCell.appendChild(parentDoc.createElement('div'));caption.className='caption';if(domLib_isIE50)
{caption.style.height='100%';}
if(in_options.get('caption').nodeType)
{caption.appendChild(domTT_cloneNodes?in_options.get('caption').cloneNode(1):in_options.get('caption'));}
else
{caption.innerHTML=in_options.get('caption');}
if(in_options.get('type')=='sticky')
{var numCaptionCells=2;var closeLinkCell=captionRow.appendChild(parentDoc.createElement('td'));closeLinkCell.style.padding='0px';var closeLink=closeLinkCell.appendChild(parentDoc.createElement('div'));closeLink.className='caption';if(domLib_isIE50)
{closeLink.style.height='100%';}
closeLink.style.textAlign='right';closeLink.style.cursor=domLib_stylePointer;closeLink.style.borderLeftWidth=caption.style.borderRightWidth='0px';closeLink.style.paddingLeft=caption.style.paddingRight='0px';closeLink.style.marginLeft=caption.style.marginRight='0px';if(in_options.get('closeLink').nodeType)
{closeLink.appendChild(in_options.get('closeLink').cloneNode(1));}
else
{closeLink.innerHTML=in_options.get('closeLink');}
closeLink.onclick=function()
{domTT_deactivate(tipOwner.id);};closeLink.onmousedown=function(in_event)
{if(typeof(in_event)=='undefined'){in_event=window.event;}
in_event.cancelBubble=true;};if(domLib_isMacIE)
{closeLinkCell.appendChild(parentDoc.createTextNode("\n"));}}
if(domLib_isMacIE)
{captionCell.appendChild(parentDoc.createTextNode("\n"));}
var contentRow=tipLayoutTbody.appendChild(parentDoc.createElement('tr'));var contentCell=contentRow.appendChild(parentDoc.createElement('td'));contentCell.style.padding='0px';if(numCaptionCells)
{if(domLib_isIE||domLib_isOpera)
{contentCell.colSpan=numCaptionCells;}
else
{contentCell.setAttribute('colspan',numCaptionCells);}}
contentBlock=contentCell.appendChild(parentDoc.createElement('div'));if(domLib_isIE50)
{contentBlock.style.height='100%';}}
else
{contentBlock=tipObj.appendChild(parentDoc.createElement('div'));}
contentBlock.className='contents';var content=in_options.get('content');if(typeof(content)=='function'){content=content(in_options.get('id'));}
if(content!=null&&content.nodeType)
{contentBlock.appendChild(domTT_cloneNodes?content.cloneNode(1):content);}
else
{contentBlock.innerHTML=content;}
if(in_options.has('width'))
{tipObj.style.width=parseInt(in_options.get('width'))+'px';}
var maxWidth=domTT_maxWidth;if(in_options.has('maxWidth'))
{if((maxWidth=in_options.get('maxWidth'))===false)
{tipObj.style.maxWidth=domLib_styleNoMaxWidth;}
else
{maxWidth=parseInt(in_options.get('maxWidth'));tipObj.style.maxWidth=maxWidth+'px';}}
if(maxWidth!==false&&(domLib_isIE||domLib_isKHTML)&&tipObj.offsetWidth>maxWidth)
{tipObj.style.width=maxWidth+'px';}
in_options.set('offsetWidth',tipObj.offsetWidth);in_options.set('offsetHeight',tipObj.offsetHeight);if(domLib_isKonq&&tableLayout&&!tipObj.style.width)
{var left=document.defaultView.getComputedStyle(tipObj,'').getPropertyValue('border-left-width');var right=document.defaultView.getComputedStyle(tipObj,'').getPropertyValue('border-right-width');left=left.substring(left.indexOf(':')+2,left.indexOf(';'));right=right.substring(right.indexOf(':')+2,right.indexOf(';'));var correction=2*((left?parseInt(left):0)+(right?parseInt(right):0));tipObj.style.width=(tipObj.offsetWidth-correction)+'px';}
if(domLib_isIE||domLib_isOpera)
{if(!tipObj.style.width)
{tipObj.style.width=(tipObj.offsetWidth-2)+'px';}
tipObj.style.height=(tipObj.offsetHeight-2)+'px';}
var offsetX,offsetY;if(in_options.get('position')=='absolute'&&!(in_options.has('x')&&in_options.has('y')))
{switch(in_options.get('direction'))
{case'northeast':offsetX=in_options.get('offsetX');offsetY=0-tipObj.offsetHeight-in_options.get('offsetY');break;case'northwest':offsetX=0-tipObj.offsetWidth-in_options.get('offsetX');offsetY=0-tipObj.offsetHeight-in_options.get('offsetY');break;case'north':offsetX=0-parseInt(tipObj.offsetWidth/2);offsetY=0-tipObj.offsetHeight-in_options.get('offsetY');break;case'southwest':offsetX=0-tipObj.offsetWidth-in_options.get('offsetX');offsetY=in_options.get('offsetY');break;case'southeast':offsetX=in_options.get('offsetX');offsetY=in_options.get('offsetY');break;case'south':offsetX=0-parseInt(tipObj.offsetWidth/2);offsetY=in_options.get('offsetY');break;}
if(in_options.get('inframe'))
{var iframeObj=domLib_getIFrameReference(window);if(iframeObj)
{var frameOffsets=domLib_getOffsets(iframeObj);offsetX+=frameOffsets.get('left');offsetY+=frameOffsets.get('top');}}}
else
{offsetX=0;offsetY=0;in_options.set('trail',false);}
in_options.set('offsetX',offsetX);in_options.set('offsetY',offsetY);if(in_options.get('clearMouse')&&in_options.get('direction').indexOf('south')!=-1)
{in_options.set('mouseOffset',domTT_mouseHeight);}
else
{in_options.set('mouseOffset',0);}
if(domLib_canFade&&typeof(Fadomatic)=='function')
{if(in_options.get('fade')!='neither')
{var fadeHandler=new Fadomatic(tipObj,10,0,0,in_options.get('fadeMax'));in_options.set('fadeHandler',fadeHandler);}}
else
{in_options.set('fade','neither');}
if(in_options.get('trail')&&typeof(tipOwner.onmousemove)!='function')
{tipOwner.onmousemove=function(in_event){domTT_mousemove(this,in_event);};}
if(typeof(tipOwner.onmouseout)!='function')
{tipOwner.onmouseout=function(in_event){domTT_mouseout(this,in_event);};}
if(in_options.get('type')=='sticky')
{if(in_options.get('position')=='absolute'&&domTT_dragEnabled&&in_options.get('draggable'))
{if(domLib_isIE)
{captionRow.onselectstart=function(){return false;};}
captionRow.onmousedown=function(in_event){domTT_dragStart(tipObj,in_event);};captionRow.onmousemove=function(in_event){domTT_dragUpdate(in_event);};captionRow.onmouseup=function(){domTT_dragStop();};}}
else if(in_options.get('type')=='velcro')
{tipObj.onmouseout=function(in_event)
{if(typeof(in_event)=='undefined'){in_event=window.event;}
if(!domLib_isDescendantOf(in_event[domLib_eventTo],tipObj,domTT_bannedTags)){domTT_deactivate(tipOwner.id);}};tipObj.onclick=function(in_event)
{domTT_deactivate(tipOwner.id);};}
if(in_options.get('position')=='relative')
{tipObj.style.position='relative';}
in_options.set('node',tipObj);in_options.set('status','inactive');}
function domTT_show(in_id,in_event)
{var tooltip=domTT_tooltips.get(in_id);var status=tooltip.get('status');var tipObj=tooltip.get('node');if(tooltip.get('position')=='absolute')
{var mouseX,mouseY;if(tooltip.has('x')&&tooltip.has('y'))
{mouseX=tooltip.get('x');mouseY=tooltip.get('y');}
else if(!domTT_useGlobalMousePosition||domTT_mousePosition==null||status=='active'||tooltip.get('delay')==0)
{var eventPosition=domLib_getEventPosition(in_event);var eventX=eventPosition.get('x');var eventY=eventPosition.get('y');if(tooltip.get('inframe'))
{eventX-=eventPosition.get('scrollX');eventY-=eventPosition.get('scrollY');}
if(status=='active'&&tooltip.get('trail')!==true)
{var trail=tooltip.get('trail');if(trail=='x')
{mouseX=eventX;mouseY=tooltip.get('mouseY');}
else if(trail=='y')
{mouseX=tooltip.get('mouseX');mouseY=eventY;}}
else
{mouseX=eventX;mouseY=eventY;}}
else
{mouseX=domTT_mousePosition.get('x');mouseY=domTT_mousePosition.get('y');if(tooltip.get('inframe'))
{mouseX-=domTT_mousePosition.get('scrollX');mouseY-=domTT_mousePosition.get('scrollY');}}
if(tooltip.get('grid'))
{if(in_event.type!='mousemove'||(status=='active'&&(Math.abs(tooltip.get('lastX')-mouseX)>tooltip.get('grid')||Math.abs(tooltip.get('lastY')-mouseY)>tooltip.get('grid'))))
{tooltip.set('lastX',mouseX);tooltip.set('lastY',mouseY);}
else
{return false;}}
tooltip.set('mouseX',mouseX);tooltip.set('mouseY',mouseY);var coordinates;if(domTT_screenEdgeDetection)
{coordinates=domTT_correctEdgeBleed(tooltip.get('offsetWidth'),tooltip.get('offsetHeight'),mouseX,mouseY,tooltip.get('offsetX'),tooltip.get('offsetY'),tooltip.get('mouseOffset'),tooltip.get('inframe')?window.parent:window);}
else
{coordinates={'x':mouseX+tooltip.get('offsetX'),'y':mouseY+tooltip.get('offsetY')+tooltip.get('mouseOffset')};}
tipObj.style.left=coordinates.x+'px';tipObj.style.top=coordinates.y+'px';tipObj.style.zIndex=domLib_zIndex++;}
if(status=='pending')
{tooltip.set('status','active');tipObj.style.display='';tipObj.style.visibility='visible';var fade=tooltip.get('fade');if(fade!='neither')
{var fadeHandler=tooltip.get('fadeHandler');if(fade=='out'||fade=='both')
{fadeHandler.haltFade();if(fade=='out')
{fadeHandler.halt();}}
if(fade=='in'||fade=='both')
{fadeHandler.fadeIn();}}
if(tooltip.get('type')=='greasy'&&tooltip.get('lifetime')!=0)
{tooltip.set('lifetimeTimeout',domLib_setTimeout(domTT_runDeactivate,tooltip.get('lifetime'),[tipObj.id]));}}
if(tooltip.get('position')=='absolute'&&domTT_detectCollisions)
{domLib_detectCollisions(tipObj,false,true);}}
function domTT_close(in_handle)
{var id;if(typeof(in_handle)=='object'&&in_handle.nodeType)
{var obj=in_handle;while(!obj.id||!domTT_tooltips.get(obj.id))
{obj=obj.parentNode;if(obj.nodeType!=document.ELEMENT_NODE){return;}}
id=obj.id;}
else
{id=in_handle;}
domTT_deactivate(id);}
function domTT_closeAll()
{for(var id in domTT_tooltips.elementData){domTT_close(id);}}
function domTT_deactivate(in_id)
{var tooltip=domTT_tooltips.get(in_id);if(tooltip)
{var status=tooltip.get('status');if(status=='pending')
{domLib_clearTimeout(tooltip.get('activateTimeout'));tooltip.set('status','inactive');}
else if(status=='active')
{if(tooltip.get('lifetime'))
{domLib_clearTimeout(tooltip.get('lifetimeTimeout'));}
var tipObj=tooltip.get('node');if(tooltip.get('closeAction')=='hide')
{var fade=tooltip.get('fade');if(fade!='neither')
{var fadeHandler=tooltip.get('fadeHandler');if(fade=='out'||fade=='both')
{fadeHandler.fadeOut();}
else
{fadeHandler.hide();}}
else
{tipObj.style.display='none';}}
else
{tooltip.get('parent').removeChild(tipObj);domTT_tooltips.remove(tooltip.get('owner').id);domTT_tooltips.remove(tooltip.get('id'));}
tooltip.set('status','inactive');if(domTT_detectCollisions){domLib_detectCollisions(tipObj,true,true);}}}}
function domTT_mouseout(in_owner,in_event)
{if(!domLib_useLibrary){return false;}
if(typeof(in_event)=='undefined'){in_event=window.event;}
var toChild=domLib_isDescendantOf(in_event[domLib_eventTo],in_owner,domTT_bannedTags);var tooltip=domTT_tooltips.get(in_owner.id);if(tooltip&&(tooltip.get('type')=='greasy'||tooltip.get('status')!='active'))
{if(!toChild)
{domTT_deactivate(in_owner.id);try{window.status=window.defaultStatus;}catch(e){}}}
else if(!toChild)
{try{window.status=window.defaultStatus;}catch(e){}}}
function domTT_mousemove(in_owner,in_event)
{if(!domLib_useLibrary){return false;}
if(typeof(in_event)=='undefined'){in_event=window.event;}
var tooltip=domTT_tooltips.get(in_owner.id);if(tooltip&&tooltip.get('trail')&&tooltip.get('status')=='active')
{if(tooltip.get('lazy'))
{domLib_setTimeout(domTT_runShow,domTT_trailDelay,[in_owner.id,in_event]);}
else
{domTT_show(in_owner.id,in_event);}}}
function domTT_addPredefined(in_id)
{var options=new Hash();for(var i=1;i<arguments.length;i+=2)
{options.set(arguments[i],arguments[i+1]);}
domTT_predefined.set(in_id,options);}
function domTT_correctEdgeBleed(in_width,in_height,in_x,in_y,in_offsetX,in_offsetY,in_mouseOffset,in_window)
{var win,doc;var bleedRight,bleedBottom;var pageHeight,pageWidth,pageYOffset,pageXOffset;var x=in_x+in_offsetX;var y=in_y+in_offsetY+in_mouseOffset;win=(typeof(in_window)=='undefined'?window:in_window);doc=((domLib_standardsMode&&(domLib_isIE||domLib_isGecko))?win.document.documentElement:win.document.body);if(domLib_isIE)
{pageHeight=doc.clientHeight;pageWidth=doc.clientWidth;pageYOffset=doc.scrollTop;pageXOffset=doc.scrollLeft;}
else
{pageHeight=doc.clientHeight;pageWidth=doc.clientWidth;if(domLib_isKHTML)
{pageHeight=win.innerHeight;}
pageYOffset=win.pageYOffset;pageXOffset=win.pageXOffset;}
if((bleedRight=(x-pageXOffset)+in_width-(pageWidth-domTT_screenEdgePadding))>0)
{x-=bleedRight;}
if((x-pageXOffset)<domTT_screenEdgePadding)
{x=domTT_screenEdgePadding+pageXOffset;}
if((bleedBottom=(y-pageYOffset)+in_height-(pageHeight-domTT_screenEdgePadding))>0)
{y=in_y-in_height-in_offsetY;}
if((y-pageYOffset)<domTT_screenEdgePadding)
{y=in_y+domTT_mouseHeight+in_offsetY;}
return{'x':x,'y':y};}
function domTT_isActive(in_id)
{var tooltip=domTT_tooltips.get(in_id);if(!tooltip||tooltip.get('status')!='active')
{return false;}
else
{return true;}}
function domTT_runDeactivate(args){domTT_deactivate(args[0]);}
function domTT_runShow(args){domTT_show(args[0],args[1]);}
function domTT_replaceTitles(in_decorator)
{var elements=domLib_getElementsByClass('tooltip');for(var i=0;i<elements.length;i++)
{if(elements[i].title)
{var content;if(typeof(in_decorator)=='function')
{content=in_decorator(elements[i]);}
else
{content=elements[i].title;}
content=content.replace(new RegExp('\'','g'),'\\\'');elements[i].onmouseover=new Function('in_event',"domTT_activate(this, in_event, 'content', '"+content+"')");elements[i].title='';}}}
function domTT_update(handle,content,type)
{if(typeof(type)=='undefined')
{type='content';}
var tip=domTT_tooltips.get(handle);if(!tip)
{return;}
var tipObj=tip.get('node');var updateNode;if(type=='content')
{updateNode=tipObj.firstChild;if(updateNode.className!='contents')
{updateNode=updateNode.firstChild.firstChild.nextSibling.firstChild.firstChild;}}
else
{updateNode=tipObj.firstChild;if(updateNode.className=='contents')
{return;}
updateNode=updateNode.firstChild.firstChild.firstChild.firstChild;}
updateNode.innerHTML=content;}
var Zeromin2;if(!Zeromin2)Zeromin2={};Zeromin2.lookup=(function(){var seen_={};return function(formElement,ip,element,event){var buildTooltip=function(rs,ip,element,event){var content=ip+" <=> "+rs.resolved
+" ("+rs.country+")<br>";var dnsbl=rs.listed;for(var i in dnsbl){content+=dnsbl[i]?"×":"○";content+=' '+i+"<br>";}
domTT_activate(element,event,"content",content,"type","velcro");};if(!/^\d+\.\d+\.\d+\.\d+$/.test(ip))return;var cache=seen_[ip];if(cache){buildTooltip(cache,ip,element,event);return;}
var matchedElement=jQuery("a:contains('"+ip+"')");matchedElement.css({"color":"green"});Zeromin2.sendQueryAsync(formElement,{"class":"log","method":"lookup","ip":ip},function(data){var entry=data.Entries;seen_[ip]=entry;matchedElement.css({"color":"red"});});};})();