function DivPresent()
{
	var TailleHaut= document.body.clientHeight;
	var TailleLarg= document.body.clientWidth;

	var Haut=TailleHaut*0.4;

	document.write("<div id=\"present\" name=\"present\" style=\" visibility: hidden; position: absolute; left:50px; top:20px; width="+(TailleLarg-10)+"px; height="+Haut+"px;\" >");
}

function ShowPresent(divid)
{
		Col = document.getElementsByName("present"); 
		for (i = 0; i < document.getElementsByName("present").length; i++) { 
			document.getElementsByName("present")[i].style.display = "none"; 
		} 
		document.getElementsByName("present")[divid].style.display = "block"; 
		document.getElementsByName("present")[divid].style.visibility = "visible"; 
}



function DivCentreTitre()
{
	var TailleHaut= document.body.clientHeight;
	var TailleLarg= document.body.clientWidth;
	

	var Haut=TailleHaut*0.35;
	var Larg=TailleLarg-10;

	document.write("<div id=\"Titre\" style=\"  position:relative; left:10px; top:"+Haut+"px; width="+Larg+"px; height=50px;\" >");
}

function DivMenu(select)
{
	var TailleHaut= document.body.clientHeight;
	var TailleLarg= document.body.clientWidth;
//	var Menu=['Histoire','Religion','Gastronomie','Carnets de Route','Art et Culture','Galerie Photos'];
	var Menu=['Histoire','Religion','Gastronomie','Carnets de Route','Galerie Photos'];

	var Haut=(TailleHaut*0.4)+80;
	var Larg=parseInt(TailleLarg*0.3);
	var reste=TailleHaut-Haut;

	document.write("<div id=\"menu\" name=\"menu\" style=\"  position: absolute; left:0px; top:"+Haut+"px; width="+Larg+"px; height="+reste+"px;\" >");
	document.write("<table width="+Larg+"px cellspacing=1 cellpadding=1 >");
	for (i=0;i<Menu.length ;i++ )
	{
		Cible2=Menu[i];
		Cible=trim(Cible2);
		if (Menu[i]==select)
		{
			document.write("<tr><td class=\"SommaireS\"><a onmouseover=\"AffMenu('"+i+"');ShowPresent('"+i+"');ShowPhoto('"+i+"');\" href=\""+Cible+".html\"  class=\"SommaireS\">"+Menu[i]+"</a></td></tr>");
		}
		else
		{
			document.write("<tr><td class=\"Sommaire\"><a onmouseover=\"AffMenu('"+i+"');ShowPresent('"+i+"');ShowPhoto('"+i+"');\" href=\""+Cible+".html\"  class=\"Sommaire\">"+Menu[i]+"</td></tr>");
		}
	}
	document.write("</table></div>");
}
function DivMenuR(select)
{
	var TailleHaut= document.body.clientHeight;
	var TailleLarg= document.body.clientWidth;
	var Menu=['Bouddhisme','Christianisme','Islam','Caodaisme','Taoisme','Confuscianisme'];

	var Haut=(TailleHaut*0.4)+80;
	var Larg=parseInt(TailleLarg*0.3);
	var reste=TailleHaut-Haut;

	document.write("<div id=\"menu\" name=\"menu\" style=\"  position: absolute; left:0px; top:"+Haut+"px; width="+Larg+"px; height="+reste+"px;\" >");
	document.write("<table width="+Larg+"px cellspacing=1 cellpadding=1 >");
	for (i=0;i<Menu.length ;i++ )
	{
		Cible2=Menu[i];
		Cible=trim(Cible2);
		if (Menu[i]==select)
		{
			document.write("<tr><td class=\"SommaireS\"><a onmouseover=\"AffMenu('"+i+"');ShowPresent('"+i+"');ShowPhoto('"+i+"');\" href=\""+Cible+".html\"  class=\"SommaireS\">"+Menu[i]+"</a></td></tr>");
		}
		else
		{
			document.write("<tr><td class=\"Sommaire\"><a onmouseover=\"AffMenu('"+i+"');ShowPresent('"+i+"');ShowPhoto('"+i+"');\" href=\""+Cible+".html\"  class=\"Sommaire\">"+Menu[i]+"</td></tr>");
		}
	}
	document.write("</table></div>");
}

function DivOther(select,target)
{
	var TailleHaut= document.body.clientHeight;
	var TailleLarg= document.body.clientWidth;
	var Option=['Accueil'];

	var Haut=(TailleHaut*0.4)+60;
	var Larg=parseInt(TailleLarg*0.1);
	var posx=parseInt(TailleLarg*0.07);
	var reste=TailleHaut-Haut;

	document.write("<div id=\"other\" name=\"other\" style=\"  position: absolute; left:"+posx+"px; top:"+Haut+"px; width="+Larg+"px; height="+reste+"px;\" >");
//	document.write("<table border=1 width="+Larg+"px cellspacing=0 cellpadding=0 >");
	document.write("<table cellspacing=0 cellpadding=0 >");
	for (i=0;i<Option.length ;i++ )
	{
		Cible2=Option[i];
		Cible=trim(Cible2);
		if (Option[i]==select)
		{
			document.write("<tr><td class=\"SommaireOS\"><a onmouseover=\"AffOther('"+i+"');\" href=\""+target+".html\"  class=\"SommaireOS\">"+Option[i]+"</a></td></tr>");
		}
		else
		{
			document.write("<tr><td class=\"SommaireO\"><a onmouseover=\"AffOther('"+i+"');\" href=\""+target+".html\"  class=\"SommaireO\">"+Option[i]+"</td></tr>");
		}
	}
	document.write("</table></div>");
}
function AffOther(divid)
{
		Col = document.getElementsByName("other");
		for (i = 0; i < document.getElementsByName("other").length; i++) {
			document.getElementsByName("other")[i].style.display = "none";
		}
		document.getElementsByName("other")[divid].style.display = "block";
}

function AffMenu(divid)
{
		Col = document.getElementsByName("menu"); 
		for (i = 0; i < document.getElementsByName("menu").length; i++) { 
			document.getElementsByName("menu")[i].style.display = "none"; 
		} 
		document.getElementsByName("menu")[divid].style.display = "block"; 
}

function DivPhoto()
{
	var TailleHaut= document.body.clientHeight;
	var TailleLarg= document.body.clientWidth;

	var Haut=(TailleHaut*0.4)+80;
	var Larg=TailleLarg*0.3;
	var reste=TailleHaut-Haut;
	var resteL=TailleLarg-Larg;
	Larg += ((resteL-200)/2)

	document.write("<div id=\"photo\" name=\"photo\" style=\"visibility: hidden; position: absolute; left:"+Larg+"px; top:"+Haut+"px; width="+resteL+"px; height="+reste+"px;\" >");
	document.write("<table width=200px  valign=center>");
}

function ShowPhoto(divid)
{
		Col = document.getElementsByName("photo"); 
		for (i = 0; i < document.getElementsByName("photo").length; i++) { 
			document.getElementsByName("photo")[i].style.display = "none"; 
		} 
		document.getElementsByName("photo")[divid].style.display = "block"; 
		document.getElementsByName("photo")[divid].style.visibility = "visible"; 
}

function trim(s) {
	s2="";
	for (i2 = 0 ; i2 < s.length; i2++)
	{
		if (s.charAt(i2) != ' ' )
		{
			s2 += s.charAt(i2);
		}
	}
	if (s2.length==0)
	{
		s2=s;
	}
  return s2;
}



