//******** Hiding and showing DIV! ************************

function getObj(objectId) 
{
		
    //alert("from getObject(objectID)")

	if (document.all && !document.getElementById) {
		return document.all(objectId);
		} else {
		return document.getElementById(objectId);
		}
}
//*********************** getobj ***************************

function getObj_pw(name){
		if (document.getElementById)
		{
			return document.getElementById(name);
		}
		else if (document.all)
		{
			return document.all[name];
		}
		else if (document.layers)
		{
			if (document.layers[name])
			{
	   			return document.layers[name];
			}
			else
			{
				return document.layers.testP.layers[name];
			}
		}
	}
//*********************** egetobj_pw() ************************

function toogleContent(id){
		if(getObj('content' + id).style.display == 'none'){
			getObj('content' + id).style.display = 'block';
			getObj('img' + id).src = '../images/folderOpen19.gif';
		}else{
			getObj('content' + id).style.display = 'none'
			getObj('img' + id).src = '../images/folderClosed19.gif';
		}
			
	}

//*************************** tooglecontent ******************	





function toogleAll() { 
	
     //alert("from toogleAll()")
	//Populate the array with all the page tags 
	var allPageTags=document.getElementsByTagName("*"); 

	//Cycle through the tags using a for loop 
	for (id=1; id<allPageTags.length; id++) { 
                myobj = getObj('content' + id);
                if (myobj != null) {
		if(getObj('content' + id).style.display == 'none'){
			getObj('content' + id).style.display = 'block';
			getObj('img' + id).src = '../images/folderOpen19.gif';
		}else{
			getObj('content' + id).style.display = 'none'
			getObj('img' + id).src = '../images/folderClosed19.gif';
		}}
	} 
}
//************************ EXPAND stuff ***************************

function expandAll() { 
	
    // alert("from expandAll()");
	 //alert(document.getElementsByTagName("*").length); 
	//Populate the array with all the page tags 
	var allPageTags=document.getElementsByTagName("*"); 

	//Cycle through the tags using a for loop 
	for (id=1; id<allPageTags.length; id++) { 
		
		myobj = getObj('content' + id);
                if (myobj != null) {
                        getObj('content' + id).style.display = 'block';
			getObj('img' + id).src = '../images/folderOpen19.gif';
		}
	} 
}

//***********************COLLAPSE STUFF ******************************

function collapseAll() { 
	
     //alert("from toogleAll()")
	//Populate the array with all the page tags 
	var allPageTags=document.getElementsByTagName("*"); 

	//Cycle through the tags using a for loop 
	for (id=1; id<allPageTags.length; id++) { 
		
		myobj = getObj('content' + id);
                if (myobj != null) {
                	getObj('content' + id).style.display = 'none'
			getObj('img' + id).src = '../images/folderClosed19.gif';
		}
	} 
}

//*************************** Toogler ************************
	
function toogleToogler(){

//alert(document.getElementById('tooglerId').innerHTML);
var mystring = document.getElementById('tooglerId').innerHTML ;
if( (mystring == "<strong>Réduire</strong>") || (mystring == "<STRONG>Réduire</STRONG>")
		   )
{document.getElementById('tooglerId').innerHTML = "<strong>Tout voir</strong>";
			getObj('img0').src = '../images/folderClosed.gif';
			
			collapseAll();
		}else{
document.getElementById('tooglerId').innerHTML = "<strong>Réduire</strong>";
			getObj('img0').src = '../images/folderOpen.gif';
			
			expandAll();
		}		
}
//************************** toogletoogler ***********************

