/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','3401',jdecode('Aper%C3%A7u+de+nos+meubles'),jdecode(''),'/3401.html','true',[],'']];
var siteelementCount=2;
theSitetree.topTemplateName='Snapshot';
theSitetree.paletteFamily='6F6F6F';
theSitetree.keyvisualId='3620';
theSitetree.keyvisualName='kv_3620.jpg';
theSitetree.fontsetId='10755';
theSitetree.graphicsetId='10878';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='6F6F6F';
var theTemplate={
				name: 			'Snapshot',
				paletteFamily: 	'6F6F6F',
				keyvisualId: 	'3620',
				keyvisualName: 	'kv_3620.jpg',
				fontsetId: 		'10755',
				graphicsetId: 	'10878',
				contentColor: 	'FFFFFF',
				contentBGColor: '6F6F6F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FC5E7B',
				e_color: 		'BFBFBF',
				f_color: 		'050001',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20080319-165303'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20080318-171311'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INL6R1';
var companyName   = 'Habitat+de+Chine+-+Mobilier+chinois';
var htmlTitle	  = 'Les+meubles+chinois';
var metaKeywords  = 'mobilier+chinois%2C+meubles+chinois%2C++Statue+Bouddha%2C+statue+bouddha%2C+antiquit%C3%A9s+chinoises%2C+meubles+asiatique%2C+mobilier+asiatique%2C+Asie%2C+importateur%2C+importation%2C+Saint-Malo%2C+Bretagne%2C+mobilier+de+chine%2C+meubles+de+chine%2C+antiquit%C3%A9s+de+chine%2C+mobiliers+chinois%2C+meuble+chinois%2C+antiquit%C3%A9+chinoises%2C+mobiliers+de+chine%2C+meuble+de+chine%2C+antiquit%C3%A9+de+chine%2C+meuble+asiatique%2C+mobiliers+asiatique%2C+asie%2C+saint+malo%2C+bretagne';
var metaContents  = 'Visitez+notre+boutique+de+meubles+chinois+et+objets+pour+la+d%C3%A9coration+%3A+www.habitatdechine.com+console+chinoise%2C+buffet+chinois%2C+armoire+chinoise%2C+lit+chinois';
					                                                                    
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 */					                                                            
