/* [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','4598',jdecode('IMPROVA'),jdecode(''),'/4598/index.html','true',[ 
		['PAGE','4844',jdecode('CONTACT+US'),jdecode(''),'/4598/4844.html','true',[],'']
	],''],
	['PAGE','95189',jdecode('ONLINE+STORE'),jdecode(''),'/95189.html','true',[],''],
	['PAGE','95403',jdecode('OFFERS'),jdecode(''),'/95403.html','true',[],''],
	['PAGE','4655',jdecode('WINDOWS'),jdecode(''),'/4655.html','true',[],''],
	['PAGE','39759',jdecode('DOORS'),jdecode(''),'/39759/index.html','true',[ 
		['PAGE','61426',jdecode('Upvc+doors'),jdecode(''),'/39759/61426.html','true',[],''],
		['PAGE','61457',jdecode('Composite'),jdecode(''),'/39759/61457.html','true',[],'']
	],''],
	['PAGE','4709',jdecode('CONSERVATORIES'),jdecode(''),'/4709.html','true',[],''],
	['PAGE','78278',jdecode('Blinds+%26+Awnings'),jdecode(''),'/78278.html','true',[],''],
	['PAGE','23559',jdecode('GARAGE+DOORS'),jdecode(''),'/23559/index.html','true',[ 
		['PAGE','71686',jdecode('Up+%26+Over'),jdecode(''),'/23559/71686.html','true',[],''],
		['PAGE','71655',jdecode('Sectional'),jdecode(''),'/23559/71655.html','true',[],''],
		['PAGE','71717',jdecode('Roller+Shutter'),jdecode(''),'/23559/71717.html','true',[],'']
	],''],
	['PAGE','95158',jdecode('KITCHENS'),jdecode(''),'/95158.html','true',[],''],
	['PAGE','60226',jdecode('GLASS+Design'),jdecode(''),'/60226.html','true',[],''],
	['PAGE','46159',jdecode('ROOFLINE'),jdecode(''),'/46159.html','true',[],''],
	['PAGE','94918',jdecode('MORE+TRADES'),jdecode(''),'/94918/index.html','true',[ 
		['PAGE','95082',jdecode('Building+Services'),jdecode(''),'/94918/95082.html','true',[],''],
		['PAGE','77778',jdecode('LOFT+Conversions'),jdecode(''),'/94918/77778.html','true',[],''],
		['PAGE','94949',jdecode('Plastering'),jdecode(''),'/94918/94949.html','true',[],''],
		['PAGE','95113',jdecode('Block+Paving'),jdecode(''),'/94918/95113.html','true',[],'']
	],''],
	['PAGE','95045',jdecode('GALLERY'),jdecode(''),'/95045.html','true',[],''],
	['PAGE','61519',jdecode('Terms+%26+Conditions'),jdecode(''),'/61519.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Aeskulap';
					                                                                    
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 */					                                                            
