/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return unescape(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var theSitetree=[ 
	['PAGE','4598',jdecode('Accueil'),jdecode(''),'/4598.html','true',[],''],
	['PAGE','4655',jdecode('Tachy+num%E9rique'),jdecode(''),'/4655.html','true',[],''],
	['PAGE','4763',jdecode('Actualit%E9s+--+Flash-Infos'),jdecode(''),'/4763.html','true',[],''],
	['PAGE','6875',jdecode('Disques+tachy'),jdecode(''),'/6875/index.html','true',[ 
		['PAGE','7175',jdecode('Proc%E9dure'),jdecode(''),'/6875/7175.html','true',[],''],
		['PAGE','7202',jdecode('Etats'),jdecode(''),'/6875/7202.html','true',[],'']
	],''],
	['PAGE','7229',jdecode('Cartes+conducteurs'),jdecode(''),'/7229/index.html','true',[ 
		['PAGE','7256',jdecode('Lecture+en+interne'),jdecode(''),'/7229/7256.html','true',[],''],
		['PAGE','7283',jdecode('R%E9seau+Temps-r%E9el'),jdecode(''),'/7229/7283.html','true',[],''],
		['PAGE','7310',jdecode('Etats'),jdecode(''),'/7229/7310.html','true',[],'']
	],''],
	['PAGE','7337',jdecode('M%E9moire+Tachy'),jdecode(''),'/7337/index.html','true',[ 
		['PAGE','7364',jdecode('Proc%E9dure+en+interne'),jdecode(''),'/7337/7364.html','true',[],''],
		['PAGE','7391',jdecode('Proc%E9dure+%E0+l%26%23x27%3Bext%E9rieur'),jdecode(''),'/7337/7391.html','true',[],'']
	],''],
	['PAGE','7418',jdecode('Archivage'),jdecode(''),'/7418/index.html','true',[ 
		['PAGE','7445',jdecode('Proc%E9dure+en+interne'),jdecode(''),'/7418/7445.html','true',[],''],
		['PAGE','7472',jdecode('Proc%E9dure+%E0+l%26%23x27%3Bext%E9rieur'),jdecode(''),'/7418/7472.html','true',[],'']
	],''],
	['PAGE','4871',jdecode('Contact'),jdecode(''),'/4871.html','true',[],''],
	['PAGE','7499',jdecode('Cr%E9ation+CD'),jdecode(''),'/7499.html','true',[],''],
	['PAGE','4925',jdecode('Liens+utiles'),jdecode(''),'/4925.html','true',[],''],
	['PAGE','4952',jdecode('Qui+sommes-nous%3F'),jdecode(''),'/4952.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Collage';
					                                                                    
theSitetree.getById = function(id, ar) {												
							if (typeof(ar) == 'undefined')                              
								ar = this;                                              
							for (var i=0; i < ar.length; i++) {                         
								if (ar[i][POS_ID] == id)                                
									return ar[i];                                       
								if (ar[i][POS_CHILDS].length > 0) {                     
									var result=this.getById(id, ar[i][POS_CHILDS]);     
									if (result != null)                                 
										return result;                                  
								}									                    
							}                                                           
							return null;                                                
					  };                                                                
					                                                                    
theSitetree.getParentById = function(id, ar) {											
						if (typeof(ar) == 'undefined')                              	
							ar = this;                                             		
						for (var i=0; i < ar.length; i++) {                        		
							for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {   		
								if (ar[i][POS_CHILDS][j][POS_ID] == id) {          		
									// child found                                 		
									return ar[i];                                  		
								}                                                  		
								var result=this.getParentById(id, ar[i][POS_CHILDS]);   
								if (result != null)                                 	
									return result;                                  	
							}                                                       	
						}                                                           	
						return null;                                                	
					 }								                                    
					                                                                    
theSitetree.getName = function(id) {                                                    
						var elem = this.getById(id);                                    
						if (elem != null)                                               
							return elem[POS_NAME];                                      
						return null;	                                                
					  };			                                                    
theSitetree.getNavigationText = function(id) {                                          
						var elem = this.getById(id);                                    
						if (elem != null)                                               
							return elem[POS_NAVIGATIONTEXT];                            
						return null;	                                                
					  };			                                                    
					                                                                    
theSitetree.getHREF = function(id) {                                                    
						var elem = this.getById(id);                                    
						if (elem != null)                                               
							return elem[POS_HREF];                                      
						return null;	                                                
					  };			                                                    
					                                                                    
theSitetree.getIsNavigation = function(id) {                                            
						var elem = this.getById(id);                                    
						if (elem != null)                                               
							return elem[POS_ISNAVIGATION];                              
						return null;	                                                
					  };			                                                    
					                                                                    
theSitetree.getTemplateName = function(id, lastTemplateName, ar) {             		 
	                                                                                 
	if (typeof(lastTemplateName) == 'undefined')                                     
		lastTemplateName = this.topTemplateName;	                                 
	if (typeof(ar) == 'undefined')                                                   
		ar = this;                                                                   
		                                                                             
	for (var i=0; i < ar.length; i++) {                                              
		var actTemplateName = ar[i][POS_TEMPLATENAME];                               
		                                                                             
		if (actTemplateName == '')                                                   
			actTemplateName = lastTemplateName;		                                 
		                                                                             
		if (ar[i][POS_ID] == id) {                                			         
			return actTemplateName;                                                  
		}	                                                                         
		                                                                             
		if (ar[i][POS_CHILDS].length > 0) {                                          
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]); 
			if (result != null)                                                      
				return result;                                                       
		}									                                         
	}                                                                                
	return null;                                                                     
	};                                                                               
/* EOF */					                                                            
