
function headerMenu()
{
var stab='<tableh><tr><td></td><td ><IMG src="/images/headbg.jpg" width=100%></td></tr></table>';
stab += '<span class="preload1"></span><span class="preload2"></span>';
stab += '<ul class="prodrop4">';
stab += '<li class="top"><a href="/" id="home" class="top_link"><span>Home</span></a></li>';
stab += '<li class="top"><a href="/philo/index.htm" id="Philosophie" class="top_link"><span>Philosophie</span><!--[if gte IE 7]><!--></a><!--<![endif]-->';
stab += '<!--[if lte IE 6]><table><tr><td><![endif]-->';
stab += '<ul class="sub1">';
stab += '<li><a href="/philo/presocratique/intro1.htm" class="fly">Les présocratiques</a></li>';
stab += '<li><a href="/philo/platon/philo/intro1.htm" class="fly">Platon</a></li>';
stab += '<li><a href="/philo/aristote/" class="fly">Aristote</a></li>';
stab += '<li><a href="/philo/spinoza/">Spinoza</a></li>';
stab += '<li><a href="/philo/kant/life/life1.htm">Kant</a></li>';
stab += '<li><a href="/philo/hegel/">Hegel</a></li>';
stab += '<li><a href="/philo/heidegger/">Heidegger</a></li>';
stab += '</ul>';
stab += '<!--[if lte IE 6]></td></tr></table></a><![endif]-->';
stab += '</li>';
stab += '<li class="top"><a href="/physique/index.htm" id="services" class="top_link"><span>Physique</span><!--[if gte IE 7]><!--></a><!--<![endif]-->';
stab += '<!--[if lte IE 6]><table><tr><td><![endif]-->';
stab += '<ul class="sub2">';
stab += '<li><a href="/physique/chaos/chaos1.htm">Les lois du chaos</a></li>';
stab += '</ul>';
stab += '<!--[if lte IE 6]></td></tr></table></a><![endif]-->';
stab += '</li>';
stab += '<li class="top"><a href="/mathematiques/" id="contacts" class="top_link"><span>Mathématiques</span><!--[if gte IE 7]><!--></a><!--<![endif]-->';
stab += '<!--[if lte IE 6]><table><tr><td><![endif]-->';
stab += '<ul class="sub3">';
stab += '<li><a href="/mathematiques/cues/">Nicolas de Cues</a></li>';
stab += '</ul>';
stab += '<!--[if lte IE 6]></td></tr></table></a><![endif]-->';
stab += '</li>';
stab += '<li class="top"><a href="/contacts.htm" id="shop" class="top_link"><span>Contacts</span><!--[if gte IE 7]><!--></a><!--<![endif]-->';
stab += '<!--[if lte IE 6]><table><tr><td><![endif]-->';
stab += '<!--[if lte IE 6]></td></tr></table></a><![endif]-->';
stab += '</li>';
stab += '</ul>';

document.write(stab);
}

function MainVertMenu()
{
var stab='<font face="Arial, Helvetica, sans-serif" size="6"><br><b></font><br><br>';
stab += '<DIV id=dlmenu>';
stab += '<UL id=menu>';
  stab += '<LI><!--[if lte IE 6]><A ';
  stab += 'href="#">';
  stab += '<TABLE>';
    stab += '<TBODY>';
    stab += '<TR>';
      stab += '<TD><![endif]-->';
        stab += '<DL class=gallery>';
          stab += '<DT><A href="/philo/index.html">Philosophie</A> ';
          stab += '<DD><A title="Platon" ';
          stab += 'href="/philo/platon/life/life1.htm">Platon</A> ';
          stab += '<DD><A title="Spinoza" ';
          stab += 'href="/philo/spinoza/">Spinoza</A> ';
          stab += '<DD><A title="Kant" ';
          stab += 'href="/philo/kant/life/life1.htm">Kant</A> ';
          stab += '<DD><A title="Hegel" ';
          stab += 'href="/philo/hegel/">Hegel</A> ';
          stab += '<DD><A title="Heidegger" ';
          stab += 'href="/philo/heidegger/">Heidegger</A> ';
          stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]-->';
  stab += '<LI><!--[if lte IE 6]><A ';
  stab += 'href="#">';
  stab += '<TABLE>';
    stab += '<TBODY>';
    stab += '<TR>';
      stab += '<TD><![endif]-->';
        stab += '<DL class=gallery>';
          stab += '<DT><A href="/physique/index.html">Physique</A> ';
          stab += '<DD><A title="Les lois du chaos" ';
          stab += 'href="/physique/chaos/">Les lois du chaos</A> '; 
  stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]-->';
  stab += '<LI><!--[if lte IE 6]><A ';
  stab += 'href="#">';
  stab += '<TABLE>';
    stab += '<TBODY>';
    stab += '<TR>';
      stab += '<TD><![endif]-->';
        stab += '<DL class=gallery>';
          stab += '<DT><A href="/mathematiques/index.html">Mathématiques</A> ';
          stab += '<DD><A title="d\'Alembert" ';
          stab += 'href="/mathematiques/alembert/">Théorème de d\'Alembert</A> ';
 stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]--></LI></UL></DIV>';
}

function philosophieMenu()
{

var stab='<font face="Arial, Helvetica, sans-serif" size="5"><br><b>PHILOSOPHIE</font><br><br>';
stab += '<DIV id=dlmenu>';
stab += '<UL id=menu>';

stab += '<LI><!--[if lte IE 6]><A '; 
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';

stab += '<DL class=gallery>';
stab += '<DT><A href="/philo/presocratique/intro1.htm">Les présocratiques</A>';
stab += '<DD><A title="Les présocratiques" '; 
stab += ' href="/philo/presocratique/democrite1.htm">Démocrite</A>'; 
stab += '<DD><A title="Démocrite" '; 
stab += 'href="/philo/presocratique/heraclite1.htm">Héraclite</A>'; 
stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]-->';
stab += '<LI><!--[if lte IE 6]><A ';
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';

stab += '<DL class=gallery>';
stab += '<DT><A href="/philo/platon/philo/intro1.htm">Platon</A>';
stab += '<DD><A title="Vie de Platon" '; 
stab += ' href="/philo/platon/life/life1.htm">Sa vie</A>'; 
stab += '<DD><A title="Philosophie" '; 
stab += 'href="/philo/platon/philo/intro1.htm">Philosophie</A>'; 
stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]-->';
stab += '<LI><!--[if lte IE 6]><A ';
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';

stab += '<DL class=gallery>';
stab += '<DT><A href="/philo/aristote/index.htm">Aristote</A>';
stab += '<DD><A title="Vie d\'Aristote" '; 
stab += ' href="/philo/aristote/life/life1.htm">Sa vie</A>'; 
stab += '<DD><A title="Philosophie" '; 
stab += 'href="/philo/aristote/">Philosophie</A>'; 
stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]-->';
stab += '<LI><!--[if lte IE 6]><A ';
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';

stab += '<DL class=gallery>';
stab += '<DT><A href="/philo/theologiens13/intro1.htm">Théologiens du XIIIème siècle</A>'; 
stab += '<DD><A title="Théologiens du XIIIème siècle"'; 
stab += 'href="/philo/theologiens13/thomas1.htm">Thomas d\'Aquin</A>'; 
stab += '<DD><A title="Thomas d\'Aquin"'; 
stab += 'href="/philo/theologiens13/bonaventure1.htm">Bonaventure</A>'; 
stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]-->';
stab += '<LI><!--[if lte IE 6]><A '; 
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';

stab += '<DL class=gallery>';
stab += '<DT><A href="/philo/spinoza/index.htm">Spinoza</A>'; 
stab += '<DD><A title="Vie de Spinoza"'; 
stab += 'href="/philo/spinoza/">Sa vie</A>'; 
stab += '<DD><A title="Philosophie"'; 
stab += 'href="/philo/spinoza/">Philosophie</A>'; 
stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]-->';
stab += '<LI><!--[if lte IE 6]><A '; 
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';

stab += '<DL class=gallery>';
stab += '<DT><A href="/philo/kant/life/life1.htm">Kant</A>'; 
stab += '<DD><A title="Vie de Kant" '; 
stab += 'href="/philo/kant/life/life1.htm">Sa vie</A>'; 
stab += '<DD><A title="Philosophie" '; 
stab += 'href="/philo/kant/critiques/intro1.htm">Les trois Critiques</A>'; 
stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]--></LI>';
stab += '<LI><!--[if lte IE 6]><A '; 
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';

stab += '<DL class=gallery>';
stab += '<DT><A href="/philo/hegel/index.html">Hegel</A>'; 
stab += '<DD><A title="Vie de Hegel" ';
stab += 'href="/philo/hegel/life/life1.htm">Sa vie</A>'; 
stab += '<DD><A title="Philosophie" '; 
stab += 'href="/philo/hegel/">Philosophie</A>'; 
stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]--></LI>';
stab += '<LI><!--[if lte IE 6]><A '; 
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';

stab += '<DL class=gallery>';
stab += '<DT><A href="/philo/heidegger/index.html">Heidegger</A>'; 
stab += '<DD><A title="Vie de Hegel" ';
stab += 'href="/philo/heidegger/life/life1.htm">Sa vie</A>'; 
stab += '<DD><A title="Philosophie" '; 
stab += 'href="/philo/heidegger/">Philosophie</A>'; 
stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]--></LI>';
stab += '<LI><!--[if lte IE 6]><A '; 
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';

stab += '<DL class=gallery>';
stab += '<DT><A href="/philo/themes/index.html">Thèmes</A>'; 
stab += '<DD><A title="Infinitude de l\'Univers" '; 
stab += 'href="/philo/themes/infini/intro1.htm">Infinitude de l\'Univers</A>'; 
stab += '</DD>';
stab += '</DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]--></LI>';
stab += '</UL></DIV>';

document.write(stab);



}

function physiqueMenu()
{

var stab='<font face="Arial, Helvetica, sans-serif" size="5"><br><b>PHYSIQUE</font><br><br>';
stab += '<DIV id=dlmenu>';
stab += '<UL id=menu>';

stab += '<LI><!--[if lte IE 6]><A '; 
stab += 'href="/physique/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';


stab += '<DL class=gallery>';
stab += '<DT><A href="/physique/chaos/chaos1.htm">Le monde chaotique</A>';
stab += '<DD><A title="Le monde chaotique" '; 
stab += ' href="/physique/chaos/chaos1.htm">Introduction</A>'; 
stab += '</DD></DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]-->';
stab += '<LI><!--[if lte IE 6]><A ';
stab += 'href="/philo/index.html">';
stab += '<TABLE>';
stab += '<TBODY>';
stab += '<TR>';
stab += '<TD><![endif]-->';


stab += '</DL><!--[if lte IE 6]></TD></TR></TBODY></TABLE></A><![endif]--></LI>';
stab += '</UL></DIV>';

document.write(stab);



}

function onLoad()
{
  if( self.innerWidth < 600 )
  {
    self.moveTo( 0, 0 );
    self.resizeTo( screen.availWidth, screen.availHeight );
  }

  if( self.innerWidth < 600 )
  {
    alert( "This Web page was designed to be viewed using a" +
            " screen resolution of 640x480 or larger." );
  }
}
function getWidth( width )
{
  return( width * screen.width / 1400 );
}
function getHeight( height )
{
 return( height * screen.height / 1050 );
}

function getVar (varName)
{
	var infos = location.href.substring(location.href.indexOf("?")+1, location.href.length)+"&"
	if (infos.indexOf("#")!=-1)
		infos = infos.substring(0,infos.indexOf("#"))+"&"
	var variable=0
	{
		varName = varName + "="
		var taille = varName.length
		if (infos.indexOf(varName)!=-1)
			variable = infos.substring(infos.indexOf(varName)+taille,infos.length).substring(0,infos.substring(infos.indexOf(varName)+taille,infos.length).indexOf("&"))
	}
	return variable
}


function getPageNber(sPage)
{
	
	var sUrl = location.href;

	var sDomain = sUrl.split("/");
	var sPageName=sDomain[sDomain.length -1];
	var sPageNametab=sPageName.split(".");
	
	var sPageNber = sPageNametab[0].replace(sPage,"");
	
 return( sPageNber );
}

function pagination(sPageItems,sPage)
{

	var sPrevPageNber = "";
	var sNextPageNber = "";
	var sSelectPageNber ="";
	var indexPage="";

	// Get the current page Name	
	var sUrl = location.href;
	var sDomain = sUrl.split("/");
	var sPageName=sDomain[sDomain.length -1];
	var sPageNametab=sPageName.split(".");
	var sCurrentPageName = sPageNametab[0];
	
	

	

	// sPageItems = "1,1-Introduction,intro;2,2-Critique de la Raison Pure,raison";
	var sPageItemstab = sPageItems.split(";");
	var sPageTotNber = sPageItemstab.length;
	
	
	
	for (var i=0;i< sPageTotNber; i ++)
	{
		
		var s = getPageName(sPageItemstab[i]);

		if (sCurrentPageName.indexOf(s) != -1)
		{	
			indexPage = i ;
			break;
		}
	}	

	// if sCurrentPageName is equal to intro, then indexPage should be equal to 0;

	
	
	if (indexPage < sPageTotNber -1)
	{
		sNextPageNber =  parseInt(indexPage) + 1;
	}
	else
	{
		sNextPageNber =  0;	
	}
	

	var sNextPageName= getPageName(sPageItemstab[sNextPageNber]);

	
	if (indexPage == 0)
	{
		sPrevPageNber =  0;
	}
	else
		sPrevPageNber = parseInt(indexPage) - 1;


	
	var sPrevPageName= getPageName(sPageItemstab[sPrevPageNber]);
	
	
	document.write("<form name='form' onChange='javascript:gotoItem(\"" + sPage + "\");'>");		
	
	document.write('<div id="scriptspaginatealt" class="paginationstyle">');
	
	document.write("<a href=" + sPrevPageName + "1.htm rel='previous' class='imglinks'>" +  "<img src='/images/roundleft.gif' /></a> ");
	

	
	document.write("<select name='subject' onChange='javascript:gotoItem(\"" + sPageItems + "\");'>");
	

	for (var i=0;i< sPageTotNber; i ++)
	{
		if (i == indexPage )
			sSelectPageNber = "selected";
		else
			sSelectPageNber = "";
		
		sPageItemtab = sPageItemstab[i].split(","); 
		
        document.write("<option " + sSelectPageNber + " value='" + sPageItemtab[0] + "'>" + sPageItemtab[1] + "</option>");
	}
	
	document.write("</select><a href=" + sNextPageName + "1.htm" + " rel='next' class='imglinks'><img src='/images/roundright.gif' /></a>");
	
	document.write('</div></form>');
	
}

function gotoItem(sPageItems)
 {
	var sPageItemstab = sPageItems.split(";");
	with (document.form)
	{
		var index = subject.selectedIndex ;
		var sPageName = getPageName(sPageItemstab[index])
		document.location.href=sPageName + "1.htm";
	}
 }
 
 function getPageName(sPageItem)
 {
	//alert(sPageItem);
	
	var sPageItemtab = sPageItem.split(",");

	return sPageItemtab[2];
 }
 
  function getPageLib(sPageItem)
 {
	var sPageItemtab = sPageItem.split(",");
	return sPageItemtab[1];
 }
 
 function getPageNber(sPageItem)
 {
	var sPageItemtab = sPageItem.split(",");
	return sPageItemtab[0];
 }
 
 function getSubItemNber(sPageItem)
 {
	//alert(sPageItem);
	
	var sPageItemtab = sPageItem.split(",");

	return sPageItemtab[3];
 }
 
 function managerSubItems()
 {
 
	var s = "";
 	// Get the current page Name	
	var sUrl = location.href;
	var sDomain = sUrl.split("/");
	var sPageName=sDomain[sDomain.length -1];
	var sPageNametab=sPageName.split(".");
	var sCurrentPageName = sPageNametab[0];

 	var sPageItemstab = sPageItems.split(";");
	var sPageTotNber = sPageItemstab.length;
	
	
	
 	for (var i=0;i< sPageTotNber; i ++)
	{
		
		s = getPageName(sPageItemstab[i]);

		if (sCurrentPageName.indexOf(s) != -1)
		{	
			indexPage = i ;
			break;
		}
	}
	
	var sSubItemNber = getSubItemNber(sPageItemstab[indexPage]);
	
	if (parseInt(sSubItemNber) > 1)		
	{	
		var sCurrentPageNber = sPageNametab[0].replace(s,"");
		
		document.write("<div class='pagination'>");
		
		var sSelectPageStatus1 = "";
		var sSelectPageStatus2 = "";	

		var iPrevPageNber = parseInt(sCurrentPageNber) - 1;
		var iNextPageNber = parseInt(sCurrentPageNber) + 1;	
		
		if (sCurrentPageNber == sSubItemNber) 
		{
			sSelectNextPageStatus = "<span class='disabled'>Suivant</span>";			
		}
			
		if (sCurrentPageNber == 1) 
		{
			document.write("<span class='disabled'>Précédent</span>");			
		}	
		else
		{
			document.write("<a href='" + s + iPrevPageNber + ".htm'>Précédent</a>");
		
		}

		for (var i=1;i< parseInt(sSubItemNber) + 1; i ++)
		{
			if (i == parseInt(sCurrentPageNber ))
			{
				document.write("<span class='current'>" + i + "</span>");
			}
			else
			{
				document.write("<a href='" + s + i + ".htm'>" + i + "</a>");
			}
		}
		
		if (sCurrentPageNber == sSubItemNber) 
		{
			document.write("<span class='disabled'>Suivant</span>");			
		}	
		else
		{
			document.write("<a href='" + s + iNextPageNber + ".htm'>Suivant</a>");
		
		}
		document.write("</div>");
		
		/*
		document.write("<span class='disabled'>Précédent</span>");
		document.write("<span class='current'>1</span>");
		document.write("<a href='#?page=2'>2</a>");
		document.write("<a href='#?page=3'>3</a>");
		document.write("<a href='#?page=4'>4</a>");
		document.write("<a href='#?page=5'>5</a>");
		document.write("<a href='#?page=2'>Suivant</a>");
		document.write("</div>");
		*/
	}
 
 }
