/* [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','4520',jdecode('Noticias+-+Berriak'),jdecode(''),'/4520.html','true',[],''],
	['PAGE','9447',jdecode('Club+-+Kluba'),jdecode(''),'/9447.html','true',[],''],
	['PAGE','9420',jdecode('Individuales+-+Bakarkak'),jdecode(''),'/9420.html','true',[],''],
	['PAGE','9474',jdecode('Equipos+-+Taldeak'),jdecode(''),'/9474.html','true',[],''],
	['PAGE','9501',jdecode('R%C3%A1pidas+-+Xake+Azkarrak'),jdecode(''),'/9501.html','true',[],''],
	['PAGE','9528',jdecode('Cto+Beraun+Txapelketa'),jdecode(''),'/9528.html','true',[],''],
	['PAGE','9555',jdecode('P%C3%A1del+-+Padela'),jdecode(''),'/9555.html','true',[],''],
	['PAGE','9582',jdecode('Fotos+-+Argazkiak'),jdecode(''),'/9582.html','true',[],''],
	['PAGE','9609',jdecode('Trastero+-+Trastelekua'),jdecode(''),'/9609/index.html','true',[ 
		['PAGE','35101',jdecode('Email-Enlaces+%28follow+up+page%29'),jdecode(''),'/9609/35101.html','false',[],'']
	],'']];
var siteelementCount=10;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='FFCC33';
theSitetree.keyvisualId='913';
theSitetree.keyvisualName='fahradf_strand.jpg';
theSitetree.fontsetId='166';
theSitetree.graphicsetId='199';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'NewYork',
				paletteFamily: 	'FFCC33',
				keyvisualId: 	'913',
				keyvisualName: 	'fahradf_strand.jpg',
				fontsetId: 		'166',
				graphicsetId: 	'199',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000066',
				b_color: 		'FFCC33',
				c_color: 		'000000',
				d_color: 		'406BC0',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1001']={
webappId:    '1001',
documentId:  '9609',
internalId:  'aas010inez3k113b581c493',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '35101',
internalId:  'aas010inez3k113b581c493',
customField: 'followUp'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4520',
internalId:  '',
customField: '20080517-110811'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9447',
internalId:  '',
customField: '20070930-165505'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9420',
internalId:  '',
customField: '20070930-033210'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9474',
internalId:  '',
customField: '20080406-162038'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20070929-130405'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9528',
internalId:  '',
customField: '20071104-225711'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9555',
internalId:  '',
customField: '20080127-015016'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9582',
internalId:  '',
customField: '20070929-191953'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9609',
internalId:  '',
customField: '20071104-224918'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '35101',
internalId:  '',
customField: '20070711-153947'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'Aas010INEZ3K';
var companyName   = 'Beraun+Bera+Xake+Elkartea';
var htmlTitle	  = 'Beraun+Bera+Xake+Elkartea';
var metaKeywords  = 'ajedrez+padel+BeraunBera+Beraun+Bera+GrosGros+Xake+Taldea';
var metaContents  = 'Noticias.+Torneos+de+ajedrez.+Socios.+Seccion+de+padel.+Cronicas.';
					                                                                    
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 */					                                                            

