
	function getWidth(){
	
		return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
	}
   
	function getHeight(){
	

		return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;
	
	}
   
	onload = function(d,E,b,i,a){
   
		d = document;
		E = d.documentElement;
		b = d.body;
		
		if(!E)return;
 
		for(i=0;a=d.getElementsByTagName("a")[i];i++){
		
			if(a.rel=='thumb'){
 
				a.t=d.createElement("div");
				var img=document.createElement('img');
				img.src=a.id;
				a.t.appendChild(img);
				a.t.className="tooltip"
 
				a.onmouseover=function(e){

					this.onmousemove(e);
					b.appendChild(this.t);
				}
				
				a.onmouseout=function(){
		
					b.removeChild(this.t);
				}
 
				a.onmousemove=function(e){
				
					var t, x=this.t;
				
					e=e||event;
			
					t=e.clientX+(E.scrollLeft||b.scrollLeft)+20;
			
					x.style.left=(getWidth()>(t+x.offsetWidth)?t:t-x.offsetWidth-20)+'px';
			
					t=e.clientY+(E.scrollTop||b.scrollTop)+20;
			
					x.style.top=(getHeight()>(t+x.offsetHeight)?t:t-x.offsetHeight-20)+'px';
 
				}
 
			}
 
		}
 
	} 

