// JavaScript Document



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}



current=1
var nbL

function init()
{

/*
if(document.getElementsByTagName)
{
rr=document.getElementsByTagName('div')



for(i=0;i<rr.length;i++)
{
rr2=rr[i].id
if(rr2.substring(0,3)=='txt')nbL+=1
}
}
*/
}



function lire(s)
{


if(current>=1&&current<=nbL)
{

// increment ou decrement
if(s=='f'&&current<nbL)current+=1
if(s=='b'&&current>1)current-=1


// change image eventuellement
if(current==nbL)MM_swapImage('suite','','../imgs/t.gif',0)
if(current==1)MM_swapImage('retour','','../imgs/t.gif',0)
if(current==(nbL-1))MM_swapImage('suite','','../imgs/DOSSIER/fleche_suite.gif',0)
if(current==2)MM_swapImage('retour','','../imgs/DOSSIER/fleche_retour.gif',0)


for(i=1;i<=nbL;i++)
{
if(document.getElementById)document.getElementById(('txt'+i)).style.display='none';
MM_showHideLayers(('txt'+i),'','hide')
}
lay='txt'+current
if(document.getElementById)document.getElementById(lay).style.display='block';

MM_showHideLayers(lay,'','show');


}
}


//////////////  CALENDRIER ////////////////




// detection du navigateur utilise //

// declaration des variables - nom de l'application cliente mis en minuscules

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,thestring;

// fonction permettant de reperer le positionnement du nom du navigateur dans la chaine 

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}


// debut de la detection


if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"

// pour tous les navigateurs qui se presentent comme compatible Mozilla (Netscape)

else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "Navigateur inconnu";

// detecte la version sauf pour Mozilla deja detectee

if (!version) version = detect.charAt(place + thestring.length);

// detecte l'OS sauf pour Konqueror deja detecte

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "Operating system inconnu";
}



function P7AniMagic(el, x, y, a, b, c, s) { //v2.5 PVII
 var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseInt(y);
 var t = 'g.p7Magic = setTimeout("P7AniMagic(\''+elo+'\','; 
 if ((g=MM_findObj(el))!=null) {d=(document.layers)?g:g.style;}else{return;}
 if (parseInt(s)>0) {eval(t+x+','+y+','+a+','+b+','+c+',0)",' + s+')');return;}
 var xx=(parseInt(d.left))?parseInt(d.left):0;
 var yy=(parseInt(d.top))?parseInt(d.top):0;
 if(parseInt(c)==1) {x+=xx;y+=yy;m=true;c=0;}
 else if (c==2) {m=false;clearTimeout(g.p7Magic);}
 else {var i=parseInt(a);
  if (eval(g.moved)){clearTimeout(g.p7Magic);}
  if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}}
  if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}}
  if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}}
  if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}}
 if (m) {if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4){
    xx+="px";yy+="px";}
  d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+','+a+','+b+','+c+',0)",'+b+')');
  }else {g.moved=false;}
}

function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}

function MM_showHideLayers() { //v3.0A Modified by Al Sparber and Massimo Foti for NN6 Compatibility
  var i,p,v,obj,args=MM_showHideLayers.arguments;if(document.getElementById){
   for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];
   v=(v=='show')?'visible':(v='hide')?'hidden':v;
   if(obj)obj.style.visibility=v;}} else{
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }}
}


function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



var calOpen=''

function cal(t)
{
if(document.getElementById)
{
noSelect(t)
etat=t.parentNode.getElementsByTagName('div').item(0).style.display

if(etat=='block')
{
t.parentNode.getElementsByTagName('div').item(0).style.display='none'
t.parentNode.getElementsByTagName('a').item(0).style.color='black'
//t.parentNode.style.backgroundColor=''
calOpen=''
}
else {
if(calOpen!='')
{
calOpen.parentNode.getElementsByTagName('div').item(0).style.display='none'
calOpen.parentNode.getElementsByTagName('a').item(0).style.color='black'
calOpen.parentNode.style.backgroundColor='white'
}
t.parentNode.getElementsByTagName('div').item(0).style.display='block'
t.parentNode.getElementsByTagName('a').item(0).style.color='#ff6600'
//t.parentNode.style.backgroundColor='#f1f1f1'

calOpen=t
}


}
// N4
else {
//document.layers['txt1'].document.links[t].href
//alert(t.y+" "+t.x)
posX=t.x
posY=t.y
les_liens=document.layers['txt1'].document.links
moins=-1
var ad
for(i=0;i<les_liens.length;i++)
{

if(les_liens[i].y==null){moins+=1}

if(les_liens[i].y==posY&&les_liens[i].x==posX)
{
ad="fiches/genf"+(i-moins)+".html"

}
}


MM_openBrWindow(ad,'fiche','status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=250,height=300,left=200,top=150')
}
}



function cal2(t)
{
if(document.getElementById)
{

etat=t.parentNode.parentNode.getElementsByTagName('td').item(1).getElementsByTagName('div').item(0).style.display

if(etat=='block')
{
t.parentNode.parentNode.getElementsByTagName('td').item(1).getElementsByTagName('div').item(0).style.display='none'
t.parentNode.parentNode.getElementsByTagName('td').item(0).getElementsByTagName('a').item(0).style.color='black'
//t.parentNode.parentNode.style.backgroundColor=''
calOpen=''
}
else {
if(calOpen!='')
{
calOpen.getElementsByTagName('td').item(1).parentNode.getElementsByTagName('div').item(0).style.display='none'
calOpen.getElementsByTagName('td').item(0).parentNode.getElementsByTagName('a').item(0).style.color='black'
calOpen.parentNode.style.backgroundColor='white'
}
t.parentNode.parentNode.getElementsByTagName('td').item(1).getElementsByTagName('div').item(0).style.display='block'
t.parentNode.parentNode.getElementsByTagName('td').item(0).getElementsByTagName('a').item(0).style.color='red'
//t.parentNode.parentNode.style.backgroundColor='#f1f1f1'

calOpen=t
}


}


}



////////////////////

function mFixe()

{
L='txt1'

if(document.getElementById)
{

/*

if ((browser == "Netscape Navigator")&&(version > 4))

	{

	w = self.innerWidth
	h = self.innerHeight
	document.getElementById('menu').style.position='fixed'

		if(document.getElementById('sousMenu'))
		{document.getElementById('sousMenu').style.position='fixed'}
	document.getElementById('cache').style.position='fixed'
	}

*/

if ((browser == "Internet Explorer")&&(version > 4)&&(OS=="Windows"))

	{

w=document.body.offsetWidth
h=document.body.offsetHeight
m=155

if(OS=='Mac'){mH=0;mL=15;}
if(OS=='Windows'){mH=5;mL=5;
}


document.getElementsByTagName('body').item(0).style.overflow='hidden'

document.getElementById(L).style.overflow='auto'



document.getElementById(L).style.paddingTop="156px"


document.getElementById(L).style.top='0px'

document.getElementById(L).style.width=(w-mL)+"px"


document.getElementById(L).style.height=(h-mH)+"px"

	}
		



}

}




function mFixe2()

{
L='txt1'
L2='txt2'
if(document.getElementById)
{

/*

if ((browser == "Netscape Navigator")&&(version > 4))

	{

	w = self.innerWidth
	h = self.innerHeight
	document.getElementById('menu').style.position='fixed'

		if(document.getElementById('sousMenu'))
		{document.getElementById('sousMenu').style.position='fixed'}
	document.getElementById('cache').style.position='fixed'
	}

*/

if ((browser == "Internet Explorer")&&(version > 4)&&(OS=="Windows"))

	{

w=document.body.offsetWidth
h=document.body.offsetHeight
m=155

if(OS=='Mac'){mH=0;mL=15;document.getElementById('filtre').style.height='35px'}
if(OS=='Windows'){mH=5;mL=5;document.getElementById('filtre').style.backgroundColor='white'
}


document.getElementsByTagName('body').item(0).style.overflow='hidden'

document.getElementById(L).style.overflow='auto'
document.getElementById(L2).style.overflow='auto'

topL=document.getElementById(L).style.top
document.getElementById(L).style.paddingTop=topL
document.getElementById(L2).style.paddingTop=topL

document.getElementById(L).style.top='0px'
document.getElementById(L2).style.top='0px'



document.getElementById(L).style.width=(w-35)+"px"
document.getElementById(L2).style.width=(w-365-4)+"px"

document.getElementById(L).style.height=(h-10)+"px"
document.getElementById(L2).style.height=(h-10)+"px"


	}

}

}


function mFixe3()

{
L='txt1'

if(document.getElementById)
{

for(i=1;i<=nbL;i++){
L='txt'+i

/*

if ((browser == "Netscape Navigator")&&(version > 4))

	{

	w = self.innerWidth
	h = self.innerHeight
	document.getElementById('menu').style.position='fixed'

	if(document.getElementById('sousMenu'))
	{document.getElementById('sousMenu').style.position='fixed'}
	document.getElementById('cache').style.position='fixed'
	}

*/

if ((browser == "Internet Explorer")&&(version > 4)&&(OS=="Windows"))

	{

w=document.body.offsetWidth
h=document.body.offsetHeight
m=155

if(OS=='Mac'){mH=0;mL=180;document.getElementById('filtre').style.height='35px'}
if(OS=='Windows'){mH=5;mL=185;document.getElementById('filtre').style.backgroundColor='white'
}

	

document.getElementsByTagName('body').item(0).style.overflow='hidden'

document.getElementById(L).style.overflow='auto'


topL=document.getElementById(L).style.top
document.getElementById(L).style.paddingTop="156px"


document.getElementById(L).style.top='0px'

document.getElementById(L).style.width=(w-mL)+"px"


document.getElementById(L).style.height=(h-mH)+"px"


	}
	
	


}
}

}




function mFixe4()

{
L='txt1'

if(document.getElementById)
{



if ((browser == "Netscape Navigator")&&(version > 4))

	{
	document.getElementById('filtre').style.display='none'
/*
	w = self.innerWidth
	h = self.innerHeight
	document.getElementById('menu').style.position='fixed'

		if(document.getElementById('sousMenu'))
		{document.getElementById('sousMenu').style.position='fixed'}
	document.getElementById('cache').style.position='fixed'
*/
	}



if ((browser == "Internet Explorer")&&(version > 4)&&(OS=="Windows"))

	{

w=document.body.offsetWidth
h=document.body.offsetHeight
m=155

if(OS=='Mac'){mH=0;mL=14;document.getElementById('filtre').style.height='35px'}
if(OS=='Windows'){mH=5;mL=20;document.getElementById('filtre').style.backgroundColor='white'
;document.getElementById('filtre').style.width=(w-mL-20)+"px"
}

	

document.getElementsByTagName('body').item(0).style.overflow='hidden'

document.getElementById(L).style.overflow='auto'


topL=document.getElementById(L).style.top
document.getElementById(L).style.paddingTop="156px"


document.getElementById(L).style.top='0px'

document.getElementById(L).style.width=(w-mL)+"px"


document.getElementById(L).style.height=(h-mH)+"px"




	}
	
	


}

}


