/* [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','4613',jdecode('HOME'),jdecode(''),'/4613.html','true',[],''],
	['PAGE','91741',jdecode('D-Linear+Dac%2FStreamer%2F+I-pod+'),jdecode(''),'/91741.html','true',[],''],
	['PAGE','9460',jdecode('CD+PLAYERS+%3D+Linear'),jdecode(''),'/9460.html','true',[],''],
	['PAGE','107129',jdecode('CD+PLAYERS%3D+24+Bit'),jdecode(''),'/107129.html','true',[],''],
	['PAGE','57204',jdecode('VALVE+INTEGRATED+Amps'),jdecode(''),'/57204.html','true',[],''],
	['PAGE','19001',jdecode('S%2FSTATE+INTEGRATED+Amps'),jdecode(''),'/19001.html','true',[],''],
	['PAGE','14501',jdecode('CYBER+MONOBLOCKS'),jdecode(''),'/14501.html','true',[],''],
	['PAGE','119925',jdecode('STEREO+POWER+AMPLIFIERS'),jdecode(''),'/119925.html','true',[],''],
	['PAGE','98518',jdecode('PRE-AMPLIFIERS'),jdecode(''),'/98518.html','true',[],''],
	['PAGE','105225',jdecode('PING+++All-In-One'),jdecode(''),'/105225.html','true',[],''],
	['PAGE','11001',jdecode('TURNTABLES'),jdecode(''),'/11001.html','true',[],''],
	['PAGE','104340',jdecode('TONEARMS'),jdecode(''),'/104340.html','true',[],''],
	['PAGE','98549',jdecode('PHONO-STAGES'),jdecode(''),'/98549.html','true',[],''],
	['PAGE','10501',jdecode('LOUDSPEAKERS'),jdecode(''),'/10501.html','true',[],''],
	['PAGE','11028',jdecode('CABLES%2FMAINS'),jdecode(''),'/11028.html','true',[],''],
	['PAGE','124221',jdecode('VALVES%3DTreasure+Series'),jdecode(''),'/124221.html','true',[],''],
	['PAGE','64151',jdecode('VALVES%3DPower'),jdecode(''),'/64151.html','true',[],''],
	['PAGE','106473',jdecode('VALVES%3DInput+%2FDrivers'),jdecode(''),'/106473.html','true',[],''],
	['PAGE','123829',jdecode('VALVES%3DRectifiers'),jdecode(''),'/123829.html','true',[],''],
	['PAGE','12419',jdecode('PRICE+LIST'),jdecode(''),'/12419.html','true',[],''],
	['PAGE','4967',jdecode('DEALERS%2CCONTACT'),jdecode(''),'/4967.html','true',[],''],
	['PAGE','25701',jdecode('++REVIEWS'),jdecode(''),'/25701.html','true',[],''],
	['PAGE','101128',jdecode('AWARDS'),jdecode(''),'/101128.html','true',[],''],
	['PAGE','11055',jdecode('Ex-dem--Offers'),jdecode(''),'/11055.html','true',[],''],
	['PAGE','61751',jdecode('UK+Hi-Fi+Shows'),jdecode(''),'/61751.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Profile';
					                                                                    
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 */					                                                            
