/* [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','4466',jdecode('Home'),jdecode(''),'/4466.html','true',[],''],
	['PAGE','4592',jdecode('English%3A+What%26%23x27%3Bs+Altea'),jdecode(''),'/4592/index.html','true',[ 
		['PAGE','4530',jdecode('REAL+ESTATE'),jdecode(''),'/4592/4530.html','true',[],''],
		['PAGE','124258',jdecode('Villa+at+%22Altea+La+Vella%22'),jdecode(''),'/4592/124258.html','true',[],''],
		['PAGE','118689',jdecode('Ap.+4-Pers.Terrazas+de+Altea'),jdecode(''),'/4592/118689.html','true',[],''],
		['PAGE','105694',jdecode('Altea+La+Nova+App.+block+5'),jdecode(''),'/4592/105694.html','true',[],'']
	],''],
	['PAGE','43363',jdecode('Nederlands%3A+Wie%2C+wat%2C+waar+Altea'),jdecode(''),'/43363/index.html','true',[ 
		['PAGE','43725',jdecode('Overzicht%3A+TE+KOOP+ALTEA'),jdecode(''),'/43363/43725.html','true',[],''],
		['PAGE','123158',jdecode('Villa+in+Altea+La+Vella'),jdecode(''),'/43363/123158.html','true',[],''],
		['PAGE','118658',jdecode('App.+4-Pers.+Terrazas+de+Altea'),jdecode(''),'/43363/118658.html','true',[],''],
		['PAGE','106794',jdecode('Altea+La+Nova+App.+blok+5'),jdecode(''),'/43363/106794.html','true',[],''],
		['PAGE','107925',jdecode('Bungalow+Altea+Hills'),jdecode(''),'/43363/107925.html','true',[],'']
	],''],
	['PAGE','51721',jdecode('Deutsch%3A+Was+ist+Altea%21'),jdecode(''),'/51721/index.html','true',[ 
		['PAGE','52611',jdecode('Contact+%28Folgeseite%29'),jdecode(''),'/51721/52611.html','false',[],''],
		['PAGE','69714',jdecode('IMMOBILIEN'),jdecode(''),'/51721/69714.html','true',[],''],
		['PAGE','69745',jdecode('Bungalow+Santa+Clara+Altea'),jdecode(''),'/51721/69745.html','true',[],''],
		['PAGE','106825',jdecode('Altea+La+Nova+App.+Block5'),jdecode(''),'/51721/106825.html','true',[],'']
	],''],
	['PAGE','4623',jdecode('Contact'),jdecode(''),'/4623.html','true',[],''],
	['PAGE','78700',jdecode('Impressum'),jdecode(''),'/78700.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Collage';
					                                                                    
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 */					                                                            

