/* [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','501',jdecode('Budapest+%22El+Par%C3%ADs+del+este%22'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('Solid-BCN'),jdecode(''),'/552.html','true',[],''],
	['PAGE','573',jdecode('Pisos+en+Budapest'),jdecode(''),'/573.html','true',[],''],
	['PAGE','594',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/594/index.html','true',[ 
		['PAGE','6701',jdecode('Cont%C3%A1ctenos+%28follow+up+page%29'),jdecode(''),'/594/6701.html','false',[],'']
	],''],
	['PAGE','615',jdecode('Nuestra+visi%C3%B3n+de+la+crisis+'),jdecode(''),'/615.html','true',[],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='999966';
theSitetree.keyvisualId='1384';
theSitetree.keyvisualName='detail.jpg';
theSitetree.fontsetId='234';
theSitetree.graphicsetId='282';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Startup',
				paletteFamily: 	'999966',
				keyvisualId: 	'1384',
				keyvisualName: 	'detail.jpg',
				fontsetId: 		'234',
				graphicsetId: 	'282',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'999966',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20090203-084957'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20090205-155248'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20081021-060526'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20081021-060941'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '594',
internalId:  'aars20inv5o111d1a46110f',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '6701',
internalId:  'aars20inv5o111d1a46110f',
customField: 'followUp'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20090203-090253'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20081020-144119'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'AARS20INV5O1';
var companyName   = 'Solid-BCN';
var htmlTitle	  = 'Pisos+Budapest';
var metaKeywords  = 'Pisos+Budapest';
var metaContents  = 'Pisos+Budapest+';
					                                                                    
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 */					                                                            
