/* [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','4555',jdecode('Home'),jdecode(''),'/4555.html','true',[],''],
	['PAGE','21304',jdecode('+Egloshayle+Builders+'),jdecode(''),'/21304/index.html','true',[ 
		['PAGE','22841',jdecode('Recently+completed+jobs'),jdecode(''),'/21304/22841.html','true',[],''],
		['PAGE','22065',jdecode('Contact'),jdecode(''),'/21304/22065.html','true',[],'']
	],''],
	['PAGE','21404',jdecode('Manchester+Terriers'),jdecode(''),'/21404/index.html','true',[ 
		['PAGE','4612',jdecode('About+us'),jdecode(''),'/21404/4612.html','true',[],''],
		['PAGE','4639',jdecode('Egloshayle+'),jdecode(''),'/21404/4639.html','true',[],''],
		['PAGE','4666',jdecode('The++Dogs'),jdecode(''),'/21404/4666.html','true',[],''],
		['PAGE','4693',jdecode('Bracken'),jdecode(''),'/21404/4693.html','true',[],''],
		['PAGE','4720',jdecode('Ivy'),jdecode(''),'/21404/4720.html','true',[],''],
		['PAGE','5140',jdecode('Sami'),jdecode(''),'/21404/5140.html','true',[],''],
		['PAGE','26574',jdecode('Sami%26%23x27%3Bs+Pups'),jdecode(''),'/21404/26574.html','true',[],''],
		['PAGE','26087',jdecode('Rose'),jdecode(''),'/21404/26087.html','true',[],''],
		['PAGE','26974',jdecode('Lilly'),jdecode(''),'/21404/26974.html','true',[],''],
		['PAGE','25074',jdecode('Lady'),jdecode(''),'/21404/25074.html','true',[],''],
		['PAGE','4747',jdecode('Pictures'),jdecode(''),'/21404/4747.html','true',[],''],
		['PAGE','4774',jdecode('The+Dogs'),jdecode(''),'/21404/4774.html','true',[],''],
		['PAGE','5167',jdecode('Progeny'),jdecode(''),'/21404/5167.html','true',[],''],
		['PAGE','22245',jdecode('Guestbook'),jdecode(''),'/21404/22245.html','true',[],''],
		['PAGE','22246',jdecode('Read+Guestbook'),jdecode(''),'/21404/22246.html','true',[],''],
		['PAGE','4801',jdecode('contact'),jdecode(''),'/21404/4801.html','true',[],''],
		['PAGE','4855',jdecode('links'),jdecode(''),'/21404/4855.html','true',[],'']
	],''],
	['PAGE','22442',jdecode('Scrap+Book'),jdecode(''),'/22442.html','true',[],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Neon';
					                                                                    
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 */					                                                            
