//
function MoveSpotImage(strLayerImage,strLayerCache,NomImage,NomCache,posGauche,posHaut)
{
	if (IsVisible == 0)
	{
	document.all(strLayerImage).style.visibility='visible';
	document.all(strLayerCache).style.visibility='visible';
	//
		if (XMouse < document.all(strLayerImage).style.posLeft || XMouse > document.all(strLayerImage).style.posLeft+document.all(strLayerImage).style.posWidth)
		{
		if (XMouse < document.all(strLayerImage).style.posLeft)
			posX=document.all(strLayerImage).style.posLeft;
		if (XMouse > document.all(strLayerImage).style.posWidth+document.all(strLayerImage).style.posLeft)
			posX=document.all(strLayerImage).style.posWidth+document.all(strLayerImage).style.posLeft;
		}
	else
		posX = XMouse;
	if (YMouse < document.all(strLayerImage).style.posTop || YMouse > document.all(strLayerImage).style.posHeight+document.all(strLayerImage).style.posTop)
		{
		if (YMouse < document.all(strLayerImage).style.posTop)
			posY=document.all(strLayerImage).style.posTop;
		if (YMouse > document.all(strLayerImage).style.posHeight+document.all(strLayerImage).style.posTop)
			posY=document.all(strLayerImage).style.posHeight+document.all(strLayerImage).style.posTop;
		}
	else
		posY = YMouse
	var leftFondEcran = posX - document.all(strLayerImage).style.posLeft - Math.round(document.all(strLayerCache).style.posWidth/2);
	var widthFondEcran = leftFondEcran + document.all(strLayerCache).style.posWidth;
	var topFondEcran = posY - document.all(strLayerImage).style.posTop - Math.round(document.all(strLayerCache).style.posHeight/2);;
	var heightFondEcran = topFondEcran + document.all(strLayerCache).style.posHeight;
	var strClip = "rect("+topFondEcran+"px "+widthFondEcran+"px "+heightFondEcran+"px " + leftFondEcran + "px)"
	document.all(strLayerImage).style.clip=strClip;
	document.all(strLayerCache).style.left=posX-Math.round(document.all(strLayerCache).style.posWidth/2)+'px';
	document.all(strLayerCache).style.top=posY-Math.round(document.all(strLayerCache).style.posHeight/2)+'px';
	var strCommand='MoveSpotImage(\''+strLayerImage+'\',\''+strLayerCache+'\',document.'+NomImage.name+',document.'+NomCache.name+',Math.round((document.all.ECRAN.offsetWidth-document.'+NomImage.name+'.width)/2),75)';
	setTimeout(strCommand,10);
	}
}


function PosMouse()
{
	XMouse=event.x;
	YMouse=event.y;
}



function InitPage()
{
	document.all.FondEcran.style.visibility='hidden';
	document.all.FondEcran.style.width=document.ImageFond.width+'px';
	document.all.FondEcran.style.height=document.ImageFond.height+'px';
	document.all.CacheEcran.style.visibility='hidden';
	document.all.CacheEcran.style.width=document.ImageCache.width+'px';
	document.all.CacheEcran.style.height=document.ImageCache.height+'px';
	document.all.FondEcran.style.left=Math.round((document.all.Ecran.offsetWidth-document.ImageFond.width)/2)+'px';
	document.all.FondEcran.style.top=75+'px';
	EcranGauche.style.left=Math.round((FondEcran.style.posLeft-document.ImageGauche.width)/2);
	EcranGauche.style.top='50px';
	TexteBas.style.top=FondEcran.style.posTop+FondEcran.style.posHeight;
	document.all.EcranDroite.style.left=(FondEcran.style.posLeft+FondEcran.style.posWidth+(Ecran.offsetWidth-FondEcran.style.posLeft-FondEcran.style.posWidth-document.ImageDroite.width)/2)+'px';
}

// mouse01
function ouvreimage01_sers()
{
	ouvreimage01_sers = window.open("","ouvreimage01_sers","width=210,height=320,resizable=no,scrollbars=no,status=no");
}

