/* [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('Saumon+fum%C3%A9'),jdecode(''),'/501.html','true',[],''],
	['PAGE','31201',jdecode('Qui+%3F'),jdecode(''),'/31201/index.html','true',[ 
		['PAGE','32201',jdecode('Quoi+d%26%23x27%3Bautre+%3F'),jdecode(''),'/31201/32201.html','true',[],'']
	],''],
	['PAGE','3901',jdecode('Autour+du+saumon'),jdecode(''),'/3901.html','true',[],''],
	['PAGE','24201',jdecode('Actualit%C3%A9+et+Presse'),jdecode(''),'/24201/index.html','true',[ 
		['PAGE','34201',jdecode('Revue+de+presse'),jdecode(''),'/24201/34201.html','true',[],'']
	],''],
	['PAGE','20922',jdecode('Id%C3%A9es+et+recettes'),jdecode(''),'/20922.html','true',[],''],
	['PAGE','41401',jdecode('L%26%23x27%3Boffre'),jdecode(''),'/41401.html','true',[],''],
	['PAGE','16001',jdecode('Acc%C3%A8s'),jdecode(''),'/16001.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='555454';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10892',
				contentColor: 	'555454',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111207-233054'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20111127-071412'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']={
webappId:    '2001',
documentId:  '16001',
internalId:  'location',
customField: 'language:fr;country:FR;isIncluded:false;'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20110818-134840'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '501',
internalId:  '5848280',
customField: '1501'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '20922',
internalId:  '',
customField: '20120105-165404'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '24201',
internalId:  '',
customField: '20120105-165129'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '31201',
internalId:  '',
customField: '20100208-221315'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32201',
internalId:  '',
customField: '20100919-181003'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20111207-231958'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '41401',
internalId:  '',
customField: '20120105-165245'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INZWW5';
var companyName   = 'Le+sp%C3%A9cialiste+du+saumon+fum%C3%A9';
var htmlTitle	  = 'Atelier+du+Saumon%3B+saumon+fum%C3%A9+artisanal%3B+saumon+fum%C3%A9+dEcosse';
var metaKeywords  = 'saumon+fum%C3%A9%3B+atelier%3B+Laurent+LEYMONIE%3B+Saint+Denis%3B+saumon+label+rouge+ecosse%2C+omega+3+et+6%2C+qualit%C3%A9+et+fraicheur%2C+fumage+artisanal';
var metaContents  = 'saumon+fum%C3%A9+artisanal%3B+fumage+traditionnel%2C+fumage+artisanal+%3B+saumon+label+rouge+%C3%A9cosse%3B+omega+3+et+6%3B+Laurent+Leymonie';
					                                                                    
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 */					                                                            

