/* [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+Page'),jdecode(''),'/4466.html','true',[],''],
	['PAGE','93400',jdecode('Please+Help%21%21'),jdecode(''),'/93400.html','true',[],''],
	['PAGE','21674',jdecode('Myths+and+Facts'),jdecode(''),'/21674.html','true',[],''],
	['PAGE','30599',jdecode('Homing+your+Hound'),jdecode(''),'/30599.html','true',[],''],
	['PAGE','33817',jdecode('Hound+Links'),jdecode(''),'/33817.html','true',[],''],
	['PAGE','23371',jdecode('Hound+Cruelty'),jdecode(''),'/23371.html','true',[],''],
	['PAGE','90613',jdecode('Galgos+and+Spain'),jdecode(''),'/90613.html','true',[],''],
	['PAGE','22544',jdecode('Members%26%23x27%3B+Hounds'),jdecode(''),'/22544.html','true',[],''],
	['PAGE','34390',jdecode('Photo+Gallery+2005'),jdecode(''),'/34390.html','true',[],''],
	['PAGE','32290',jdecode('Photo+Gallery+2006'),jdecode(''),'/32290.html','true',[],''],
	['PAGE','95125',jdecode('Photo+Gallery+2007'),jdecode(''),'/95125.html','true',[],''],
	['PAGE','95156',jdecode('+Photo+Gallery+2008'),jdecode(''),'/95156.html','true',[],''],
	['PAGE','95187',jdecode('Photo+Gallery+2009'),jdecode(''),'/95187.html','true',[],''],
	['PAGE','29471',jdecode('First+Ever+Dog+Walk+'),jdecode(''),'/29471.html','true',[],''],
	['PAGE','24371',jdecode('Hounds+Who+Have+Gone'),jdecode(''),'/24371.html','true',[],''],
	['PAGE','43749',jdecode('Weblog'),jdecode(''),'/43749.html','true',[],''],
	['PAGE','10802',jdecode('Guestbook'),jdecode(''),'/10802/index.html','true',[ 
		['PAGE','10803',jdecode('Read+Guestbook'),jdecode(''),'/10802/10803.html','true',[],'']
	],''],
	['PAGE','89187',jdecode('Social+Events+2006-08'),jdecode(''),'/89187.html','true',[],''],
	['PAGE','146000',jdecode('C.G.G++MERCHANDISE'),jdecode(''),'/146000.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Round';
					                                                                    
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 */					                                                            
