/* [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','4556',jdecode('Presentaci%C3%B3'),jdecode(''),'/4556/index.html','true',[ 
		['PAGE','4613',jdecode('Proc%C3%A9s+artesanal+'),jdecode(''),'/4556/4613.html','true',[],''],
		['PAGE','4640',jdecode('Galeria+artesanal+'),jdecode(''),'/4556/4640.html','true',[],''],
		['PAGE','9403',jdecode('Horari+i+Serveis+'),jdecode(''),'/4556/9403.html','true',[],''],
		['PAGE','14340',jdecode('Contactar'),jdecode(''),'/4556/14340/index.html','true',[ 
			['PAGE','14940',jdecode('Contactar+%28follow+up+page%29'),jdecode(''),'/4556/14340/14940.html','false',[],'']
		],'']
	],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Cuy';
theSitetree.paletteFamily='F7FDFD';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='385';
theSitetree.graphicsetId='438';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F7FDFD';
var theTemplate={
				name: 			'Cuy',
				paletteFamily: 	'F7FDFD',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'385',
				graphicsetId: 	'438',
				contentColor: 	'000000',
				contentBGColor: 'F7FDFD',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'F7FDFD',
				b_color: 		'E4E5C0',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '14340',
internalId:  'aas010in2t8211344987d5c',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '14940',
internalId:  'aas010in2t8211344987d5c',
customField: 'followUp'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20091107-084312'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4613',
internalId:  '',
customField: '20090121-165036'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4640',
internalId:  '',
customField: '20091107-083640'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9403',
internalId:  '',
customField: '20091107-083918'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '14340',
internalId:  '',
customField: '20090121-112734'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '14940',
internalId:  '',
customField: '20070619-172730'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'Aas010IN2T82';
var companyName   = 'SERRET+JOIER+++des+de+1989';
var htmlTitle	  = 'serretjoier.com';
var metaKeywords  = 'joiers+joieries+serret+Balaguer+comer%EF%BF%BDos+Sanahuja+';
var metaContents  = 'P%EF%BF%BDgina+de+Serret+joier%2C+una+mostra+de+joieria+artesanal%2C+realitzada+en+aquest+establiment+comercial+de+Balaguer%2CLleida.';
					                                                                    
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 */					                                                            
