/* [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','4606',jdecode('HOME+PAGE'),jdecode(''),'/4606.html','true',[],''],
	['PAGE','276058',jdecode('%26%23x27%3BSPECIAL+OFFERS%26%23x27%3B'),jdecode(''),'/276058.html','true',[],''],
	['PAGE','275340',jdecode('ONLINE+SHOP'),jdecode(''),'/275340.html','true',[],''],
	['PAGE','4690',jdecode('MINI+JUKES'),jdecode(''),'/4690/index.html','true',[ 
		['PAGE','4744',jdecode('MINI+ROCK'),jdecode(''),'/4690/4744.html','true',[],''],
		['PAGE','4771',jdecode('RECORD+PLAYERS'),jdecode(''),'/4690/4771.html','true',[],'']
	],''],
	['PAGE','273283',jdecode('CD+ROCK+MAXI+ENCODE'),jdecode(''),'/273283.html','true',[],''],
	['PAGE','266683',jdecode('CD+ROCK+IPOD+jukebox'),jdecode(''),'/266683.html','true',[],''],
	['PAGE','124874',jdecode('ZERO+50+jukebox'),jdecode(''),'/124874.html','true',[],''],
	['PAGE','269989',jdecode('ZERO+50+ENCODE+jukebox'),jdecode(''),'/269989.html','true',[],''],
	['PAGE','272120',jdecode('CD+RECORD+ROCK+1'),jdecode(''),'/272120.html','true',[],''],
	['PAGE','80729',jdecode('ROCK+10+jukebox'),jdecode(''),'/80729.html','true',[],''],
	['PAGE','103688',jdecode('MP3+%2F+Ipod+cd+jukebox'),jdecode(''),'/103688.html','true',[],''],
	['PAGE','100563',jdecode('FULL+SIZE+jukeboxes.'),jdecode(''),'/100563.html','true',[],''],
	['PAGE','268492',jdecode('RETRO+record+players'),jdecode(''),'/268492.html','true',[],''],
	['PAGE','87632',jdecode('NOSTALGIC+retro+range'),jdecode(''),'/87632.html','true',[],''],
	['PAGE','120370',jdecode('UNIQUE+Gifts+'),jdecode(''),'/120370.html','true',[],''],
	['PAGE','5501',jdecode('CONTACT+US'),jdecode(''),'/5501.html','true',[],''],
	['PAGE','58529',jdecode('SHIPPING+prices'),jdecode(''),'/58529.html','true',[],''],
	['PAGE','106194',jdecode('TERMS+%26+CONDITIONS'),jdecode(''),'/106194.html','true',[],''],
	['PAGE','106855',jdecode('Guestbook'),jdecode(''),'/106855/index.html','true',[ 
		['PAGE','106856',jdecode('Read+Guestbook'),jdecode(''),'/106855/106856.html','true',[],'']
	],'']];
var siteelementCount=22;
theSitetree.topTemplateName='Natural';
					                                                                    
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 */					                                                            
