/* [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','601',jdecode('Presentaci%C3%B3n'),jdecode(''),'/601.html','true',[],''],
	['PAGE','652',jdecode('Servicios+y+Habitaciones'),jdecode(''),'/652.html','true',[],''],
	['PAGE','8601',jdecode('Galer%C3%ADa+de+im%C3%A1genes'),jdecode(''),'/8601.html','true',[],''],
	['PAGE','694',jdecode('Contacto'),jdecode(''),'/694/index.html','true',[ 
		['PAGE','6401',jdecode('Contacto+%28follow+up+page%29'),jdecode(''),'/694/6401.html','false',[],'']
	],''],
	['PAGE','6706',jdecode('Libro+de+visitas'),jdecode(''),'/6706/index.html','true',[ 
		['PAGE','6701',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/6706/6701.html','true',[],'']
	],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Moonflight';
theSitetree.paletteFamily='D89452';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='445';
theSitetree.graphicsetId='501';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Moonflight',
				paletteFamily: 	'D89452',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'445',
				graphicsetId: 	'501',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'CC7621',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20080213-175047'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20080213-183429'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20080213-183752'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '694',
internalId:  'aars20in3twx11813e19663',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '6401',
internalId:  'aars20in3twx11813e19663',
customField: 'followUp'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '6706',
internalId:  '6706aars20in3twx',
customField: 'action=form&icq=false'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '6701',
internalId:  '6706aars20in3twx',
customField: 'action=list'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '6706',
internalId:  '',
customField: '20080214-121148'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '6401',
internalId:  '',
customField: '20080213-183954'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20080213-184454'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '8601',
internalId:  '11817a0cd0d',
customField: 'g.130bpuop5.1nqoi1fbu5.1s'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20080214-121026'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'AARS20IN3TWX';
var companyName   = 'El+Castillo+del+Conde';
var htmlTitle	  = 'El+Castillo+del+Conde';
var metaKeywords  = 'El+Castillo+del+Conde%2C+vacaciones%2C+descanso%2C+turismo+rural%2C+Valoria+la+Buena%2C+Valladolid%2C+';
var metaContents  = 'El+Castillo+del+Conde+es+un+paraiso++para+el+descanso%2C+en+Valor%C3%ADa+la+Buena%2C+que+esta+situada+entre+los+valles+del+Pisuerga+y+del+Maderazo%2C+siendo+uno+de+losp+ueblos+mas+importantes+de+la+comarca+certe%C3%B1a.++Su+termino+municipal%2Cfronterizo+entre+las+provincias+de+Palencia+y+Valladolid.++Localidad+bien+comunicada%2C+a+la+que+se+llefa+f%C3%A1cilmente+por+estar+situada+a+tan+solo+23+km+de+Valladolid%28entre+15+y+20+minutos+por+autovia+N-620%2C+o+por+la+carretera+de+Valoria+la+Buena+a+Cabez%C3%B3n%29y+a+25+km+de+Palencia%2C+por+la+carretera+de+due%C3%B1as.++';
					                                                                    
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 */					                                                            
