
function getX(elm){
	var x= elm.offsetLeft;
	while (elm.offsetParent){
  		elm = elm.offsetParent;
 		x += elm.offsetLeft;
	}
	return x;
}

function getY(elm){
	var y= elm.offsetTop;
	while (elm.offsetParent){
  		elm = elm.offsetParent;
  		y += elm.offsetTop;
	}
	return y;
}

function pointeur(x,y){
	if(document.all && !document.getElementById){
		document.all.cible.style.left = document.all.carte.x + x -15;
		document.all.cible.style.top = document.all.carte.y + y -15;
	} else if(document.layers){	// NS 4
		document.cible.left = document.carte.x + x -15;
		document.cible.top = document.carte.y + y -15;
	} else {	// ECMA complient
		document.getElementById("cible").style.left = getX(document.images['carte']) + x -15;
		document.getElementById("cible").style.top = getY(document.images['carte']) + y - 15;
	}
}

