/* [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','4607',jdecode('Soci%C3%A9t%C3%A9'),jdecode(''),'/4607.html','true',[],''],
	['PAGE','4901',jdecode('Activit%C3%A9s'),jdecode(''),'/4901/index.html','true',[ 
		['PAGE','20402',jdecode('Activit%C3%A9s+%28volgende+pagina%29'),jdecode(''),'/4901/20402.html','false',[],'']
	],'']];
var siteelementCount=3;
theSitetree.topTemplateName='Lunch';
theSitetree.paletteFamily='616E30';
theSitetree.keyvisualId='3849';
theSitetree.keyvisualName='kv_3849.jpg';
theSitetree.fontsetId='10697';
theSitetree.graphicsetId='11065';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='748928';
var theTemplate={
				name: 			'Lunch',
				paletteFamily: 	'616E30',
				keyvisualId: 	'3849',
				keyvisualName: 	'kv_3849.jpg',
				fontsetId: 		'10697',
				graphicsetId: 	'11065',
				contentColor: 	'FFFFFF',
				contentBGColor: '748928',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'616E30',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'C9D894',
				e_color: 		'C9D894',
				f_color: 		'C9D894',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4607',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '4901',
internalId:  'aam010in3fi711515536de9',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '20402',
internalId:  'aam010in3fi711515536de9',
customField: 'followUp'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4607',
internalId:  '',
customField: '20071029-181604'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20071029-171957'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '20402',
internalId:  '',
customField: '20070917-231530'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010IN3FI7';
var companyName   = 'AGRONOMAS';
var htmlTitle	  = 'www.agronomas.com';
var metaKeywords  = 'Lait+et+d%EF%BF%BDriv%EF%BF%BDs%2C+fromages%2C+jus%2C+conserves%2C+fruits+et+l%EF%BF%BDgumes%2C+aliments+pour+b%EF%BF%BDb%EF%BF%BD%2C+machines+ou+%EF%BF%BDquipements+agroalimentaire%2C+emballages%2C+sleeves%2C+conditionnement%2C+surgel%EF%BF%BDe%2C+boissons%2C+pommes+de+terre%2C+tomate%2C+conserves%2C+conditionnement+aseptique%2C+pasteurisation%2C+emballages+souples%2C+%EF%BF%BDtude%2C+Process%2C+installation%2C+soudure%2C+inoxMilk+and+dairy+product%2C+cheeses%2C+juice%2C+preserves%2C+fruit+and+vegetables%2C+food+for+baby%2C+agroalimentary+machines%2C+%2C+packing%2C+sleeves%2C+conditioning%2C+frozen%2C+drinks%2C+potatoes%2C+tomato+preserves%2C+aseptic+conditioning%2C+pasteurization%2C+flexible+packing%2C+study%2C+Process%2C+installation%2C+welding%2C+stainless';
var metaContents  = '%EF%BF%BDtude%2C+conception+et+installation+de+Process%2C+d%EF%BF%BDquipements+ou+de+lignes+compl%EF%BF%BDtes+dans+le+domaine+de+lagro-alimentaire%2C+pharmaceutique%2C+cosm%EF%BF%BDtique+ou+autres.Study%2C+design+and+installation+of+Process%2C+equipment+or+complete+lines+in+the+field+of+agro-alimentary%2C+pharmaceutical%2C+cosmetic+or+other.++++';
					                                                                    
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 */					                                                            

