var IE = document.all?true:false;
if(!IE) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;
function getMouseXY(e) {
	if (IE) {
		tempX = event.clientX + document.body.scrollLeft;
		tempY = event.clientY + document.body.scrollTop;
		tempX=tempX+15;
		tempY=tempY-30;
	}
	else {
		tempX = e.clientX;
		tempY = e.clientY;
		tempX=tempX+15;
		tempY=tempY-30;
	}  
	if (tempX < 0){tempX = 0;}
	if (tempY < 0){tempY = 0;}  
	return true;
}

function ImageOver(lx,ly,img){
	obj=document.getElementById("preview");
		
	if(tempX>900){
		tempX=tempX-(lx+25);
	}
	if(tempY>500){
		tempY=tempY-ly;
	}
	
	obj.style.top=tempY+"px";
	obj.style.left=tempX+"px";
	obj.style.width=lx+"px";
	obj.style.height=ly+"px";
	obj.style.display="block";
	path=img;
	obj.style.background="url("+path+")";
}

function ImageOut(){
	obj=document.getElementById("preview");
	obj.style.top="0px";
	obj.style.left="0px";
	obj.style.width="0px";
	obj.style.height="0px";
	obj.style.display="none";
}
