<!--
///////////////////////////////////////////////////////////////////////////////////////////////
//   Incrusts images code in <DIV ID="contents_xx">
///////////////////////////////////////////////////////////////////////////////////////////////
function loadImages() {
	y=PicTable.length - 1;
	for(i = y; i >0; i--) {
		if (i < 10)
			{imgZero = "0";}
		else
			{imgZero = "";};
	
	picName = PicsDir_s + PicTable[i] + '.jpg';
	
	if (BgTable[i])
		{bgValue = "'" + BgTable[i] + "'";
		}
	else
		{bgValue = "'000000'";
		};
	
	code='<span style="cursor:hand"><a onmouseover="swapPic(' + imgZero + i + ');" onmouseout="swapPicRestore()" onclick="PopupPic(' + imgZero + i + ',' + bgValue + ')"><img src="' + picName + '" style="border: 1px solid #B5B5B5" alt="Click to display !"></a></span>';

	cible='contents_' + imgZero + i;
	
	if (document.getElementById(cible))
		{document.getElementById(cible).innerHTML=code;
		}
	}
}

///////////////////////////////////////////////////////////////////////////////////////////////
//		Displays preview if cursor on small pic
///////////////////////////////////////////////////////////////////////////////////////////////

function swapPicRestore() {
  document.getElementById("hello").style.visibility="hidden";
}

function swapPic(img) {
  document.getElementById("mousepix").src = PicsDir_m +  PicTable[img] + ".jpg";
  document.getElementById("hello").style.visibility="visible";
}


////////////////////////////////////////////////////////////////////////////////////////////////////
//                    Display large view
////////////////////////////////////////////////////////////////////////////////////////////////////

function PopupPic(img,bg) {

	// ------------- Put it in mypage.html
	window.focus();
	
	imgloc = "largeview.html?param1=" + dir_Large + "&param2=" + PicTable[img] + "&param3=" + bg;
	
	//alert("imgloc = " + imgloc);
		
	window.open(imgloc, "secondefenetre", "location=no,toolbar=no,scrollbars=yes,resizable=yes,fullscreen=yes");
	//mypage.focus();

}



function InitSuivi(texte) {
	if (document.getElementById) {
		document.onmousemove=ie;
	}
}

function ie(f) {
	if(!f)
    	f=window.event;
	
	difTop =window.pageYOffset;
	
	//***********************************************************************************************
	//* variable height for the preview position :
	//***********************************************************************************************

	if (difTop<500)
		{deltaY='500px';}
	else
		{	
			if (difTop < 1000)
				{deltaY='1000px';}
			else
				{
					if (difTop < 1500)
						{deltaY='1500px';}
					else
						{
							if (difTop < 2000)
								{deltaY='2000px';}
							else
								{
									deltaY='2500px';
								}
						}
				}
		}

	document.getElementById("hello").style.top= deltaY;
	document.getElementById("hello").style.left='80%' ;
	document.getElementById("hello").style.zIndex=1;
}

//--></SCRIPT>

