addEvent(window,"load",makeNiceTitles);
var XHTMLNS="http://www.w3.org/1999/xhtml";
var CURRENT_NICE_TITLE;
var browser=new Browser();
function makeNiceTitles(){
if(!document.createElement||!document.getElementsByTagName){
return;
}
if(!document.createElementNS){
document.createElementNS=function(ns,_2){
return document.createElement(_2);
};
}
if(!document.links){
document.links=document.getElementsByTagName("a");
}
for(var ti=0;ti<document.links.length;ti++){
var _4=document.links[ti];
if(_4.title){
_4.setAttribute("nicetitle",_4.title);
_4.removeAttribute("title");
addEvent(_4,"mouseover",showNiceTitle);
addEvent(_4,"mouseout",hideNiceTitle);
addEvent(_4,"focus",showNiceTitle);
addEvent(_4,"blur",hideNiceTitle);
}
}
var _5=document.getElementsByTagName("ins");
if(_5){
for(var ti=0;ti<_5.length;ti++){
var _6=_5[ti];
if(_6.dateTime){
var _7=_6.dateTime;
var _8=new Date(_7.substring(0,4),parseInt(_7.substring(4,6)-1),_7.substring(6,8),_7.substring(9,11),_7.substring(11,13),_7.substring(13,15));
_6.setAttribute("nicetitle","Added on "+_8.toString());
addEvent(_6,"mouseover",showNiceTitle);
addEvent(_6,"mouseout",hideNiceTitle);
addEvent(_6,"focus",showNiceTitle);
addEvent(_6,"blur",hideNiceTitle);
}
}
}
};
function findPosition(_9){
if(_9.offsetParent){
for(var _a=0,_b=0;_9.offsetParent;_9=_9.offsetParent){
_a+=_9.offsetLeft;
_b+=_9.offsetTop;
}
return [_a,_b];
}else{
return [_9.x,_9.y];
}
};
function showNiceTitle(e){
if(CURRENT_NICE_TITLE){
hideNiceTitle(CURRENT_NICE_TITLE);
}
if(!document.getElementsByTagName){
return;
}
if(window.event&&window.event.srcElement){
lnk=window.event.srcElement;
}else{
if(e&&e.target){
lnk=e.target;
}
}
if(!lnk){
return;
}
if(lnk.nodeName.toUpperCase()!="A"){
lnk=getParent(lnk,"A");
}
if(!lnk){
return;
}
nicetitle=lnk.getAttribute("nicetitle");
var d=document.createElementNS(XHTMLNS,"div");
d.className="nicetitle";
tnt=document.createTextNode(nicetitle);
pat=document.createElementNS(XHTMLNS,"p");
pat.className="titletext";
pat.appendChild(tnt);
d.appendChild(pat);
if(lnk.href){
tnd=document.createTextNode(lnk.href);
pad=document.createElementNS(XHTMLNS,"p");
pad.className="destination";
pad.appendChild(tnd);
d.appendChild(pad);
}
STD_WIDTH=300;
if(lnk.href){
h=lnk.href.length;
}else{
h=nicetitle.length;
}
if(nicetitle.length){
t=nicetitle.length;
}
h_pixels=h*6;
t_pixels=t*10;
if(h_pixels>STD_WIDTH){
w=h_pixels;
}else{
if((STD_WIDTH>t_pixels)&&(t_pixels>h_pixels)){
w=t_pixels;
}else{
if((STD_WIDTH>t_pixels)&&(h_pixels>t_pixels)){
w=h_pixels;
}else{
w=STD_WIDTH;
}
}
}
//my addition...just to see
w=STD_WIDTH;

d.style.width=w+"px";
mpos=findPosition(lnk);
mx=mpos[0];
my=mpos[1];
d.style.left=(mx+15)+"px";
d.style.top=(my+25)+"px";
if(window.innerWidth&&((mx+w)>window.innerWidth)){
d.style.left=(window.innerWidth-w-25)+"px";
}
if(document.body.scrollWidth&&((mx+w)>document.body.scrollWidth)){
d.style.left=(document.body.scrollWidth-w-25)+"px";
}
document.getElementsByTagName("body")[0].appendChild(d);
CURRENT_NICE_TITLE=d;
};
function hideNiceTitle(e){
if(!document.getElementsByTagName){
return;
}
if(CURRENT_NICE_TITLE){
document.getElementsByTagName("body")[0].removeChild(CURRENT_NICE_TITLE);
CURRENT_NICE_TITLE=null;
}
};
function addEvent(_f,_10,fn){
if(_f.addEventListener){
_f.addEventListener(_10,fn,false);
return true;
}else{
if(_f.attachEvent){
var r=_f.attachEvent("on"+_10,fn);
return r;
}else{
return false;
}
}
};
function getParent(el,_14){
if(el==null){
return null;
}else{
if(el.nodeType==1&&el.tagName.toLowerCase()==_14.toLowerCase()){
return el;
}else{
return getParent(el.parentNode,_14);
}
}
};
function getMousePosition(_15){
if(browser.isIE){
x=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;
y=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;
}
if(browser.isNS){
x=_15.clientX+window.scrollX;
y=_15.clientY+window.scrollY;
}
return [x,y];
};
function Browser(){
var ua,s,i;
this.isIE=false;
this.isNS=false;
this.version=null;
ua=navigator.userAgent;
s="MSIE";
if((i=ua.indexOf(s))>=0){
this.isIE=true;
this.version=parseFloat(ua.substr(i+s.length));
return;
}
s="Netscape6/";
if((i=ua.indexOf(s))>=0){
this.isNS=true;
this.version=parseFloat(ua.substr(i+s.length));
return;
}
s="Gecko";
if((i=ua.indexOf(s))>=0){
this.isNS=true;
this.version=6.1;
return;
}
};

