var IE = document.all?true:false;

if (!IE) document.captureEvents(Event.MOUSEMOVE);

document.getElementById('div').onmousemove = getMouseXY;

var tempX = 0;
var tempY = 0;

function getMouseXY(e) {
  if (IE) { 
    tempX = (event.clientX + document.body.scrollLeft - document.getElementById('div').offsetLeft)/1.65;
    tempY = event.clientY + document.body.scrollTop - document.getElementById('div').offsetTop;
  } else {  
    tempX = (e.pageX - document.getElementById('div').offsetLeft)/1.65;
    tempY = e.pageY - document.getElementById('div').offsetTop;
  }  
  tempY-=271;
  tempX-=149.5;
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
	
  if(document.getElementById('img') != null){
  	tempY-=87;
  	document.getElementById('displayer').innerHTML = '<div style="width:300px; height:367px; background-image:url('+document.getElementById('img').src+');background-position:'+(tempX*(-4.677))+'px '+(tempY*(-2.156))+'px"></div>';
  }
  if(document.getElementById('img1') != null){
	tempY-=87;
  	document.getElementById('displayer').innerHTML = '<div style="width:300px; height:367px; background-image:url('+document.getElementById('img1').src+');background-position:'+(tempX*(-5.23))+'px '+(tempY*(-2.25))+'px"></div>';
  }
  if(document.getElementById('img2') != null){
  	tempY-=87;
	document.getElementById('displayer').innerHTML = '<div style="width:300px; height:367px; background-image:url('+document.getElementById('img2').src+');background-position:'+(tempX*(-5.2))+'px '+(tempY*(-2.25))+'px"></div>';
  }
  return true
}