currentChapt="0";
currentSubChapt = "0";

function setCurrentSubChapt (idChapt, idSub)
{
	currentChapt = idChapt;
	var d = document.getElementById("menuChaptContents" + idChapt);
	var dtitle  = document.getElementById("menuChaptTitle" + idChapt);
	var dsubtitle = document.getElementById("menuChapt" + idChapt + "Sub" + idSub);
	/*if (d) {d.style.display='block';
			dtitle.style.color ='orange';
			dtitle}*/
	if (d) {d.className = "subMenuShow";}
	if (dtitle) {dtitle.className = "menuChaptTitle3";}
	if (dsubtitle) {dsubtitle.className = "subMenuTitle2";}

}

function montre(id)
{
	var d = document.getElementById("menuChaptContents" + id);
	var dtitle  = document.getElementById("menuChaptTitle" + id);
	for (var i = 1; i<=30; i++)
	{
		if (parseInt(currentChapt) != i)
		{
		if (document.getElementById('menuChaptContents'+i)) {
			document.getElementById('menuChaptContents'+i).className ='subMenuHide';
			}
		if (document.getElementById('menuChaptTitle'+i)) {
			document.getElementById('menuChaptTitle'+i).className ='menuChaptTitle1';
			}
		}
	}
	if (parseInt(currentChapt) != parseInt(id) && d) 
	{
		d.className ='subMenuShow';
		dtitle.className='menuChaptTitle2';
	}
}

function new_window(url, wid, hei, posx, posy)	{
	mywin_9=window.open(url,'win_9','width=' + wid + ',height='+ hei + ', scrollbars=yes, left=' + posx + ', top=' + posy);
	//win_9.moveTo(posx, posY);
}

function preload_image(photo) {
		var preloadedimage
		preloadedimage=new Image()
		preloadedimage.src=photo
}