/* [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','401',jdecode('Presentaci%C3%B3n'),jdecode(''),'/401.html','true',[],''],
	['PAGE','452',jdecode('75+Aniversario'),jdecode(''),'/452.html','true',[],''],
	['PAGE','473',jdecode('Historia'),jdecode(''),'/473.html','true',[],''],
	['PAGE','18101',jdecode('%C3%81lbum+de+Visitas'),jdecode(''),'/18101.html','true',[],''],
	['PAGE','29201',jdecode('Nuestra+Imagen'),jdecode(''),'/29201.html','true',[],''],
	['PAGE','494',jdecode('Datos+Registrales'),jdecode(''),'/494.html','true',[],''],
	['PAGE','515',jdecode('Consejo+Admon.'),jdecode(''),'/515.html','true',[],''],
	['PAGE','536',jdecode('Contacto'),jdecode(''),'/536.html','true',[],''],
	['PAGE','13601',jdecode('Enlaces'),jdecode(''),'/13601.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Ragtime';
theSitetree.paletteFamily='9BA8DA';
theSitetree.keyvisualId='3583';
theSitetree.keyvisualName='kv_3583.jpg';
theSitetree.fontsetId='10737';
theSitetree.graphicsetId='10850';
theSitetree.contentColor='646580';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Ragtime',
				paletteFamily: 	'9BA8DA',
				keyvisualId: 	'3583',
				keyvisualName: 	'kv_3583.jpg',
				fontsetId: 		'10737',
				graphicsetId: 	'10850',
				contentColor: 	'646580',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'9BA8DA',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'8D8C8C',
				e_color: 		'7D87B0',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '536',
internalId:  '125528',
customField: 'es:ES:'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20070419-135724'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20070419-135756'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '29201',
internalId:  '',
customField: '20071001-144653'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100714-123146'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20090420-102645'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20070419-135907'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20100701-120527'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20070419-135948'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20070419-140400'
};
var canonHostname = 'localhost';
var accountId     = 'AAK020INXPST';
var companyName   = 'La+Empresa';
var htmlTitle	  = 'Epresa.+La+Instituci%C3%B3n';
var metaKeywords  = 'Electricidad.+Distribuci%C3%B3n.Puerto+Real.';
var metaContents  = 'Epresa.+Electricidad+de+Puerto+Real.+Servicios+El%C3%A9ctricos.+Distribuci%C3%B3n+el%C3%A9ctrica.';
					                                                                    
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 */					                                                            
