/* [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','16',jdecode('Inicio'),jdecode(''),'/16.html','true',[],''],
	['PAGE','537',jdecode('Su+Web+en+7+pasos'),jdecode(''),'/537.html','true',[],''],
	['PAGE','681',jdecode('Tienda+Online'),jdecode(''),'/681.html','true',[],''],
	['PAGE','13097',jdecode('Base+de+datos'),jdecode(''),'/13097.html','true',[],''],
	['PAGE','2764',jdecode('Alb%C3%BAm+fotos'),jdecode(''),'/2764.html','true',[],''],
	['PAGE','3358',jdecode('Encuestas'),jdecode(''),'/3358.html','true',[],''],
	['PAGE','3319',jdecode('Foros'),jdecode(''),'/3319.html','true',[],''],
	['PAGE','3367',jdecode('Formulario+de+contacto'),jdecode(''),'/3367/index.html','true',[ 
		['PAGE','3432',jdecode('Formulario+de+contacto+%28follow+up+page%29'),jdecode(''),'/3367/3432.html','false',[],'']
	],''],
	['PAGE','699',jdecode('Donde+estamos'),jdecode(''),'/699.html','true',[],''],
	['PAGE','689',jdecode('Como+llegar'),jdecode(''),'/689.html','true',[],''],
	['PAGE','2700',jdecode('Libro+visitas'),jdecode(''),'/2700/index.html','true',[ 
		['PAGE','2699',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/2700/2699.html','true',[],'']
	],''],
	['PAGE','5680',jdecode('Otros+ejemplos'),jdecode(''),'/5680.html','true',[],''],
	['PAGE','5689',jdecode('Pru%C3%A9belo+ahora'),jdecode(''),'/5689.html','true',[],'']];
var siteelementCount=15;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='C5A858';
theSitetree.keyvisualId='6896';
theSitetree.keyvisualName='kv_6896.jpg';
theSitetree.fontsetId='11212';
theSitetree.graphicsetId='12034';
theSitetree.contentColor='64511A';
theSitetree.contentBGColor='DABB67';
var theTemplate={
				name: 			'Angkor'
,				paletteFamily: 	'C5A858'
,				keyvisualId: 	'6896'
,				keyvisualName: 	'kv_6896.jpg'
,				fontsetId: 		'11212'
,				graphicsetId: 	'12034'
,				contentColor: 	'64511A'
,				contentBGColor: 'DABB67'
,				a_color: 		'DABB67'
,				b_color: 		'000000'
,				c_color: 		'000000'
,				d_color: 		'000000'
,				e_color: 		'000000'
,				f_color: 		'000000'
 			  };					                                                                    
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 */					                                                            

