/* [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','501',jdecode('Accueil'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('Blandine+Vernier'),jdecode(''),'/552.html','true',[],''],
	['PAGE','573',jdecode('Ecrits+Libres'),jdecode(''),'/573.html','true',[],''],
	['PAGE','594',jdecode('Une+s%C3%A9ance+d%26%23x27%3BAtelier'),jdecode(''),'/594.html','true',[],''],
	['PAGE','615',jdecode('Les+Ateliers+propos%C3%A9s'),jdecode(''),'/615.html','true',[],''],
	['PAGE','636',jdecode('A+vous+la+plume'),jdecode(''),'/636.html','true',[],''],
	['PAGE','657',jdecode('Contacts'),jdecode(''),'/657.html','true',[],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Art';
theSitetree.paletteFamily='FFDEAD';
theSitetree.keyvisualId='1818';
theSitetree.keyvisualName='zettel.jpg';
theSitetree.fontsetId='283';
theSitetree.graphicsetId='351';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFDEAD';
var theTemplate={
				name: 			'Art',
				paletteFamily: 	'FFDEAD',
				keyvisualId: 	'1818',
				keyvisualName: 	'zettel.jpg',
				fontsetId: 		'283',
				graphicsetId: 	'351',
				contentColor: 	'000000',
				contentBGColor: 'FFDEAD',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFDEAD',
				b_color: 		'990000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20071231-095816'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20080124-203414'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20080918-193647'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20080103-133703'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20120104-090815'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20100119-145954'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20111003-140614'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INLRH6';
var companyName   = 'ECRITS+LIBRES+-+Ateliers+d%27%C3%A9criture';
var htmlTitle	  = 'www.ecritslibres.fr';
var metaKeywords  = 'ecritslibres%3B+ecritslibres.fr%3B+atelier+d%C3%A9criture%3B+ecriture%3B+stage+ecriture%3B+week+end+ecriture%3B+charente+maritime%3B+ecrire+et+le+dire%3B+po%C3%A9sie%3B+marche+et+ecriture%3B+convivialit%C3%A9%3B+proposition+d%C3%A9criture%3B+mer%3B+montagne%3B+blandine+vernier%3B+jacques+maury%3B+ecrivant%3B';
var metaContents  = 'Pr%C3%A9sentation+ateliers+d%C3%A9criture+Ecrits+Libres+anim%C3%A9s+par+Blandine+Vernier.';
					                                                                    
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 */					                                                            

