/* [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('Av.Lecueder'),jdecode(''),'/801.html','true',[],''],
	['PAGE','29701',jdecode('El+Estudio'),jdecode(''),'/29701.html','true',[],''],
	['PAGE','31701',jdecode('Programacion'),jdecode(''),'/31701.html','true',[],''],
	['PAGE','21006',jdecode('Libro+de+visitas'),jdecode(''),'/21006/index.html','true',[ 
		['PAGE','21001',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/21006/21001.html','true',[],'']
	],'']];
var siteelementCount=5;
theSitetree.topTemplateName='Art';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='1812';
theSitetree.keyvisualName='unterhaltungselektronik.jpg';
theSitetree.fontsetId='285';
theSitetree.graphicsetId='350';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Art',
				paletteFamily: 	'000000',
				keyvisualId: 	'1812',
				keyvisualName: 	'unterhaltungselektronik.jpg',
				fontsetId: 		'285',
				graphicsetId: 	'350',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20090118-125506'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '21006',
internalId:  '',
customField: '20081215-185927'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '31701',
internalId:  '',
customField: '20090118-110143'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '21006',
internalId:  '21006aars20invob4',
customField: 'action=form&icq=false'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '801',
internalId:  '6740026',
customField: '1501'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '21001',
internalId:  '21006aars20invob4',
customField: 'action=list'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20090118-105641'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20081215-185927'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'AARS20INVOB4';
var companyName   = 'Tu+Radio';
var htmlTitle	  = 'Participa+en+Radio+S%C2%B4Horta';
var metaKeywords  = 'RADIO+%2C+MUSICA%2C+FAMILIA%2C+SOLIDARIDAD%2CSMOOTH+JAZZ+BRASIL';
var metaContents  = 'RADIO+EN+VIVO+%2C+MIDIS%2C+PROGRAMAS+MUSICA+%2C+TELLME+MORE%2C+ONG%2C+SOLIDARIDAD+%2C+MASAJES+%2C+VINOS+%2C+AMERICA+%2C+MASSAGES+%2C+PLAYA+%2C+TURISMO+%2C+MALLORCA+.';
					                                                                    
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 */					                                                            
