// JavaScript Document

file_ext=".png";
div_name ="thumb_show";
div_name_inner ="thumb_show2";
dist_left=10;
dist_top=10;
var tempX = 0;
var tempY = 0;
var cursor ={x:0, y:0};

var IE = document.all?true:false

function show_pic(me, category, p_name){
	d1= document.getElementById(div_name);
	d2= document.getElementById(div_name_inner);
	d1.style.visibility="visible";
	me.onmousemove = function(){
		tempX = cursor.x + dist_left;
		tempY = cursor.y + dist_top;
		d1.style.left = tempX + "px";
		d1.style.top = tempY + "px";
		d2.style.backgroundImage="url('Pics/" + category + "/" + p_name + "')";
	} 
	me.onmouseout = function(){
		d1.style.visibility = "hidden";
		d1.style.className = "thumb_show";
	}
}


var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  cursor.x = tempX;
  cursor.y = tempY;
}