//window.onerror = null;
var pthint_attr_name = "pthint"; 
window.onload = function(e){
        if (document.createElement) pthint.d();
}
pthint = {
        t: document.createElement("DIV"),
        c: null,
        g: false,
        DIV_id: null,
        lv:null,
        lh:null,
        rv:null,
        rh:null,

        d: function(){

                pthint.t.setAttribute("class", "hnt");
                pthint.t.setAttribute("id", "pthint");
                document.body.appendChild(pthint.t);
                a = (document.all) ? document.all : document.getElementsByTagName("*");
                aLength = a.length;

                for (var i = 0; i < aLength; i++){
                        if (a[i].getAttribute("title")){
                                a[i].setAttribute(pthint_attr_name, a[i].getAttribute("title"));
                                a[i].setAttribute("gh_He", a[i].offsetHeight);
                                a[i].setAttribute("gh_Wi", a[i].offsetWidth);
                                a[i].removeAttribute("title");
                                if (a[i].getAttribute("alt") && a[i].complete) a[i].removeAttribute("alt");

                                pthint.l(a[i], "mouseover", pthint.s);
                                pthint.l(a[i], "mouseout", pthint.h);
                        }else
                                if (a[i].getAttribute("alt") && a[i].complete){
                                        a[i].setAttribute(pthint_attr_name, a[i].getAttribute("alt"));
                                        a[i].removeAttribute("alt");
                                        pthint.l(a[i], "mouseover", pthint.s);
                                        pthint.l(a[i], "mouseout", pthint.h);
                                }
                }
                window.onscroll = pthint.h;
        },

        s: function(e){
                d = (window.event) ? window.event.srcElement : e.currentTarget;
                if (!d.getAttribute(pthint_attr_name)) return;
                pthint.t.D_id=d.id;
                pthint.t.D_id=pthint.t.D_id.replace("SPAN","DIV");
                if (pthint.t.firstChild) pthint.t.removeChild(pthint.t.firstChild);
                pthint.t.innerHTML=window.event?eval('document.all.'+pthint.t.D_id+'.innerHTML'):eval("document.getElementById('"+pthint.t.D_id+"').innerHTML");
                pthint.c = setTimeout("pthint.t.style.visibility = 'visible';", 500);
                pthint.g = true;
                oCanvas = document.getElementsByTagName((document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY")[0];
                x = window.event ? event.clientX + oCanvas.scrollLeft - 20 : e.pageX;
                y = window.event ? event.clientY + oCanvas.scrollTop+15: e.pageY;
                pthint.a(x, y);
        },

        h: function(e){
                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;
//                alert(y);
                z1=parseInt(pthint.t.style.top)+pthint.t.offsetHeight;
                z2=parseInt(pthint.t.style.left)+pthint.t.offsetWidth;
                if (pthint.g)
                {
                        if (!window.event) {y--;x--;}
		//alert(z1+'<='+y+'<='+parseInt(pthint.t.style.top))
                        if (((y<=z1)&&(y-2>=parseInt(pthint.t.style.top)))&&((x-2>parseInt(pthint.t.style.left))&&(x<=z2)))
                        {
                                pthint.l(pthint.t,"mouseout", pthint.h)
                        }
                        else
                        {
                        pthint.t.style.visibility = "hidden";
                        if (pthint.t.firstChild) pthint.t.removeChild(pthint.t.firstChild);
                        clearTimeout(pthint.c);
                        pthint.g = false;
                        pthint.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.event ? oCanvas.clientWidth : window.innerWidth;
                t_width = window.event ? pthint.t.clientWidth : pthint.t.innerWidth;
                t_extra_width = 7; 
                pthint.t.style.top = y + "px";
                pthint.t.wd=t_width;
                pthint.t.style.left = x + "px";
                while (x + t_width + t_extra_width > w_width){
                        --x;
                        pthint.t.style.left = x + "px";
                        t_width = window.event ? pthint.t.clientWidth : pthint.t.innerWidth;
                }
        }
}
