/* [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','801',jdecode('Home'),jdecode(''),'/801.html','true',[],''],
	['PAGE','8201',jdecode('Empresa'),jdecode(''),'/8201/index.html','true',[ 
		['PAGE','8222',jdecode('Historia'),jdecode(''),'/8201/8222.html','true',[],''],
		['PAGE','852',jdecode('Localizaci%C3%B3n'),jdecode(''),'/8201/852.html','true',[],'']
	],''],
	['PAGE','873',jdecode('Nuestros+Productos'),jdecode(''),'/873/index.html','true',[ 
		['PAGE','3101',jdecode('Olivas'),jdecode(''),'/873/3101.html','true',[],''],
		['PAGE','3122',jdecode('Olivada'),jdecode(''),'/873/3122.html','true',[],'']
	],''],
	['PAGE','894',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/894/index.html','true',[ 
		['PAGE','11101',jdecode('Cont%C3%A1ctenos+%28follow+up+page%29'),jdecode(''),'/894/11101.html','false',[],'']
	],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Evident';
theSitetree.paletteFamily='4C7D51';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10631';
theSitetree.graphicsetId='10775';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='F9F9D6';
var theTemplate={
				name: 			'Evident',
				paletteFamily: 	'4C7D51',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10631',
				graphicsetId: 	'10775',
				contentColor: 	'666666',
				contentBGColor: 'F9F9D6',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'4C7C50',
				e_color: 		'1F4D23',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20081116-183345'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20081116-175024'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '873',
internalId:  '',
customField: '20081116-174313'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20081116-192850'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '3101',
internalId:  '',
customField: '20081116-203901'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '3122',
internalId:  '',
customField: '20081116-204050'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20081116-175210'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '8222',
internalId:  '',
customField: '20081116-192813'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '894',
internalId:  'aars20invq5411da665bbef',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '11101',
internalId:  'aars20invq5411da665bbef',
customField: 'followUp'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20081116-184244'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'AARS20INVQ54';
var companyName   = 'Blai+Peris+S.L.';
var htmlTitle	  = 'Blai+Peris+S.L.';
var metaKeywords  = '';
var metaContents  = '';
					                                                                    
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 */					                                                            

