var pointer=false;
function init2(){
	i0=document.body.getElementsByTagName('table');
	for(i1=0;i0[i1].className!='grille_curseur';) i1++
	i0=i0[i1];
// 	i0.style.cursor='crosshair';
	i1=document.createElement('div');
	i1.style.width='5px';
	i1.style.height='5px';
	i1.style.background='#888';
	i1.style.fontSize='1px';
	i1.style.opacity='0.5';
	i1.style.MozOpacity='0.5';
	i1.style.KhtmlOpacity='0.5';
	i1.style.filter='alpha(opacity=50)';
// 	i1.style.cursor='crosshair';
	i1.style.position='absolute';
	i1.style.display='none';
	i1.onclick=clic;
	i0.parentNode.insertBefore(i1,i0);
	pointer=i1;
	document.onmousemove=move;
}
function clic(evt){
	positionX=parseInt(pointer.style.marginLeft);
	positionY=parseInt(pointer.style.marginTop);
	sndReq('dejapris',positionX,positionY);
	document.tools.x.value=positionX;
	document.tools.y.value=positionY;
	document.tools.coor.value=positionX+";"+positionY;
}
function move(evt){
	m0=new c_Cursor(evt);
	m1=new c_Coords(pointer.nextSibling);
	m0.x-=m1.x;
	m0.y-=m1.y;
	if(m0.x>=0 && m0.x<=m1.w && m0.y>=0 && m0.y<=m1.h){
		m0.x-=m0.x%5;
		m0.y-=m0.y%5;
		pointer.style.marginLeft=m0.x+'px';
		pointer.style.marginTop=m0.y+'px';
		pointer.style.display='block';
	}
	else pointer.style.display='none';
}
function getWidth(g0){
	return g0.offsetWidth;
}
function getHeight(g0){
	return g0.offsetHeight;
}
function getLeft(g0){
	if(g0.offsetParent) return g0.offsetLeft+getLeft(g0.offsetParent);
	else return g0.offsetLeft;
}
function getTop(g0){
	if(g0.offsetParent) return g0.offsetTop+getTop(g0.offsetParent);
	else return g0.offsetTop;
}
function c_Coords(c0){
	this.x=getLeft(c0);
	this.y=getTop(c0);
	this.w=getWidth(c0);
	this.h=getHeight(c0);
}
function c_Cursor(evt){
	this.x=(window.event)?window.event.x:evt.pageX;
	this.y=(window.event)?window.event.y:evt.pageY;
}