//TOOLTIP
fgsdfgswgf = 0;
function tooltip(d,E,b,i,a){
  d=document;E=d.documentElement;b=d.body;if(!E)return;
/*
  for(i=0;a=b.getElementsByTagName("a")[i];i++){
    if(a.title){
      with(a.t=d.createElement("div")){
        id="tooltip"
        innerHTML=a.title.replace(/\|/g,"<br />")
      }
      a.onmouseover=function(e){
        with(this){title="";onmousemove(e)}
        b.appendChild(this.t)
      }
      a.onmouseout=function(x){
        with(this){title=t.innerHTML.replace(/<br \/>/g,"\|")}
        if(x=d.getElementById("tooltip"))b.removeChild(x)
      }
      a.onmousemove=function(e){
        e=e||event;with(this.t.style){
         left=e.clientX+(E.scrollLeft||b.scrollLeft) - Math.max(0, 0-((E.clientWidth||b.parentNode.clientWidth)-e.clientX-this.t.offsetWidth)) +"px"
         top=e.clientY+(E.scrollTop||b.scrollTop) - Math.max(0, 20-((E.clientHeight||b.parentNode.clientHeight)-e.clientY-this.t.offsetHeight)) +"px"
        }
      }
    }
  }
*/

  // modified by smacky
  for(i=0;a=b.getElementsByTagName("span")[i];i++){
    if(a.title){
      if (a.title.substr(0,4)=="pic:"){

        with(a.t=d.createElement("div")){
          id="tooltip"
          innerHTML="<img src='" + a.title.substr(4) + "'>"       
        }
        a.onmouseover=function(e){
          with(this){title="";onmousemove(e)}
          b.appendChild(this.t)
        }
        a.onmouseout=function(x){
          with(this){title=t.innerHTML.replace(/<br \/>/g,"\|")}
          if(x=d.getElementById("tooltip"))b.removeChild(x)
        }
        a.onmousemove=function(e){
          e=e||event;with(this.t.style){
           left=e.clientX+(E.scrollLeft||b.scrollLeft) - Math.max(0, 0-((E.clientWidth||b.parentNode.clientWidth)-e.clientX-this.t.offsetWidth)) +"px"
           top=e.clientY+(E.scrollTop||b.scrollTop) - Math.max(0, 20-((E.clientHeight||b.parentNode.clientHeight)-e.clientY-this.t.offsetHeight)) +"px"
          }
        }

      }
      else
      {
/*
        with(a.t=d.createElement("div")){
          id="tooltip"
          innerHTML=a.title.replace(/\|/g,"<br />")
        }
        a.onmouseover=function(e){
          with(this){title="";onmousemove(e)}
          b.appendChild(this.t)
        }
        a.onmouseout=function(x){
          with(this){title=t.innerHTML.replace(/<br \/>/g,"\|")}
          if(x=d.getElementById("tooltip"))b.removeChild(x)
        }
        a.onmousemove=function(e){
          e=e||event;with(this.t.style){
           left=e.clientX+(E.scrollLeft||b.scrollLeft) - Math.max(0, 0-((E.clientWidth||b.parentNode.clientWidth)-e.clientX-this.t.offsetWidth)) +"px"
           top=e.clientY+(E.scrollTop||b.scrollTop) - Math.max(0, 20-((E.clientHeight||b.parentNode.clientHeight)-e.clientY-this.t.offsetHeight)) +"px"
          }
        }
*/
      }
    }
  }
}
addEvent(window,'load',tooltip);