// JavaScript Document
window.onload=Configure;

function Configure() {
	LI = document.getElementById('gauche').getElementsByTagName('li');
	nLI = LI.length;
	for(i=0; i < nLI; i++) { 
		if (document.all) { // Pour IE
			LI[i].onclick = function() {swapOL(this, event);}
		} else { // Pour les autres navigateurs
			LI[i].setAttribute("onclick", "swapOL(this, event);");
		}
	}

	SEL = document.getElementsByTagName('select');
	nSEL = SEL.length;
	for(i=0; i < nSEL; i++) { 
		SEL[i].style.visibility = 'visible';
	}
	
	AREA = document.getElementsByTagName('textarea');
	nAREA = AREA.length;
	for(i=0; i < nAREA; i++) { 
		AREA[i].style.visibility = 'visible';
	}
	
	if (document.getElementById('catdescription')) {
		if (document.all) { // Pour IE
			document.getElementById('catdescription').onclick = function() {swapDiv(this, event);}
		} else { // Pour les autres navigateurs
			document.getElementById('catdescription').setAttribute("onclick", "swapDiv(this, event);");
		}
	}

	document.getElementById('chargement').style.display = 'none';
}


function swapOL(obj, e) {  
	OL = obj.getElementsByTagName('ol'); 
	if(OL.length > 0){
      sousMenu = OL[0].style;
      if(sousMenu.display == 'block'){
        sousMenu.display = 'none';      
	  }else{
        sousMenu.display = 'block';      
	  }    
	}
	if (document.all) { 
		if (!e) var e = window.event; 
		e.cancelBubble = true; 
 	} else {
  		e.stopPropagation();
	} 
}

function swapDiv(obj, e) {  
	if(obj.style.height == 'auto'){
		obj.style.height = '1em';      
	}else{
        obj.style.height = 'auto';      
	}    
	if (document.all) { 
		if (!e) var e = window.event; 
		e.cancelBubble = true; 
 	} else {
  		e.stopPropagation();
	} 
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function shake(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
         }
      }
   }
}

function none() { }
