window.onerror = null;
var info_attr_name = "info";
var info_blank_text = "";
var info_newline_entity = "  ";
window.onload = function(e){
if (document.createElement) info.d();
}
info = {
t: document.createElement("DIV"),
c: null,
g: false,
m: function(e){
if (info.g){
oCanvas = document.getElementsByTagName(
(document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY"
)[0];
x = window.event ? event.clientX + oCanvas.scrollLeft : e.pageX;
y = window.event ? event.clientY + oCanvas.scrollTop : e.pageY;
info.a(x, y);
}
},
d: function(){
info.t.setAttribute("id", "info");
document.body.appendChild(info.t);
a = (document.all) ? document.all : document.getElementsByTagName("*");
aLength = a.length;
for (var i = 0; i < aLength; i++){
if (!a[i]) continue;
info_title = a[i].getAttribute("title");
info_alt = a[i].getAttribute("alt");
info_blank = a[i].getAttribute("target") && a[i].getAttribute("target") == "_blank" && info_blank_text;
if (info_title || info_blank){
a[i].setAttribute(info_attr_name, info_blank ? (info_title ? info_title + " " + info_blank_text : info_blank_text) : info_title);
if (a[i].getAttribute(info_attr_name)){
a[i].removeAttribute("title");
if (info_alt && a[i].complete) a[i].removeAttribute("alt");
info.l(a[i], "mouseover", info.s);
info.l(a[i], "mouseout", info.h);
}
}else if (info_alt && a[i].complete){
a[i].setAttribute(info_attr_name, info_alt);
if (a[i].getAttribute(info_attr_name)){
a[i].removeAttribute("alt");
info.l(a[i], "mouseover", info.s);
info.l(a[i], "mouseout", info.h);
}
}
if (!a[i].getAttribute(info_attr_name) && info_blank){
}
}
document.onmousemove = info.m;
window.onscroll = info.h;
info.a(-99, -99);
},
s: function(e){
d = (window.event) ? window.event.srcElement : e.currentTarget;
if (!d.getAttribute(info_attr_name)) return;
s = d.getAttribute(info_attr_name);
if (info_newline_entity){
s = s.replace(/\&/g,"&amp;");
s = s.replace(/\</g,"&lt;");
s = s.replace(/\>/g,"&gt;");
s = s.replace(/  /g, "<br />");
info.t.innerHTML = s;
}else{
if (info.t.firstChild) info.t.removeChild(info.t.firstChild);
info.t.appendChild(document.createTextNode(s));
}
info.c = setTimeout("info.t.style.visibility = 'visible';", 100);
info.g = true;
},
h: function(e){
info.t.style.visibility = "hidden";
if (!info_newline_entity && info.t.firstChild) info.t.removeChild(info.t.firstChild);
clearTimeout(info.c);
info.g = false;
info.a(-99, -99);
},
l: function(o, e, a){
if (o.addEventListener) o.addEventListener(e, a, false);
else if (o.attachEvent) o.attachEvent("on" + e, a);
else return null;
},
a: function(x, y){
oCanvas = document.getElementsByTagName(
(document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY"
)[0];
w_width = window.innerWidth ? window.innerWidth + window.pageXOffset : oCanvas.clientWidth + oCanvas.scrollLeft;
w_height = window.innerHeight ? window.innerHeight + window.pageYOffset : oCanvas.clientHeight + oCanvas.scrollTop;
t_width = window.event ? info.t.clientWidth : info.t.offsetWidth;
t_height = window.event ? info.t.clientHeight : info.t.offsetHeight;
t_extra_width = 7; // padding + borderWidth;
t_extra_height = 5; // padding + borderWidth;
info.t.style.left = x + 8 + "px";
info.t.style.top = y + 8 + "px";
while (x + t_width + t_extra_width > w_width){
--x;
info.t.style.left = x + "px";
t_width = window.event ? info.t.clientWidth : info.t.offsetWidth;
}
while (y + t_height + t_extra_height > w_height){
--y;
info.t.style.top = y + "px";
t_height = window.event ? info.t.clientHeight : info.t.offsetHeight;
}
}
}