/* [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','9021',jdecode('7X18+DIGITAL+BINOCAM'),jdecode(''),'/9021.html','true',[],''],
	['PAGE','4613',jdecode('Home'),jdecode(''),'/4613.html','true',[],''],
	['PAGE','26601',jdecode('9X63+ASTRO%2FTERRE'),jdecode(''),'/26601.html','true',[],''],
	['PAGE','9503',jdecode('waterproof+binoculars'),jdecode(''),'/9503/index.html','true',[ 
		['PAGE','9530',jdecode('Adresses'),jdecode(''),'/9503/9530.html','true',[],'']
	],''],
	['PAGE','21201',jdecode('TASCO+WATERPROOF10X50'),jdecode(''),'/21201.html','true',[],''],
	['PAGE','9183',jdecode('nikula+binoculars'),jdecode(''),'/9183.html','true',[],''],
	['PAGE','28301',jdecode('new'),jdecode(''),'/28301.html','true',[],''],
	['PAGE','9156',jdecode('new'),jdecode(''),'/9156.html','true',[],''],
	['PAGE','9048',jdecode('BINOCULARS'),jdecode(''),'/9048/index.html','true',[ 
		['PAGE','9075',jdecode('First+Product'),jdecode(''),'/9048/9075.html','true',[],''],
		['PAGE','9102',jdecode('spotting+scopes'),jdecode(''),'/9048/9102.html','true',[],''],
		['PAGE','9129',jdecode('COMPACTBINOCULARS'),jdecode(''),'/9048/9129.html','true',[],'']
	],''],
	['PAGE','24201',jdecode('SPOTTING+SCOPES+2'),jdecode(''),'/24201.html','true',[],''],
	['PAGE','9557',jdecode('COMPACT+BINOCULARS'),jdecode(''),'/9557.html','true',[],''],
	['PAGE','9584',jdecode('Spotting+scopes'),jdecode(''),'/9584.html','true',[],''],
	['PAGE','15302',jdecode('Guestbook'),jdecode(''),'/15302/index.html','true',[ 
		['PAGE','15303',jdecode('Read+Guestbook'),jdecode(''),'/15302/15303.html','true',[],'']
	],''],
	['PAGE','20201',jdecode('About+us'),jdecode(''),'/20201/index.html','true',[ 
		['PAGE','20228',jdecode('Our+team'),jdecode(''),'/20201/20228.html','true',[],''],
		['PAGE','20255',jdecode('How+to+find+us'),jdecode(''),'/20201/20255.html','true',[],'']
	],''],
	['PAGE','33101',jdecode('Products'),jdecode(''),'/33101/index.html','true',[ 
		['PAGE','33128',jdecode('Third+Product'),jdecode(''),'/33101/33128.html','true',[],'']
	],''],
	['PAGE','33701',jdecode('ADMIRAL+MUSEUM'),jdecode(''),'/33701.html','true',[],''],
	['PAGE','33728',jdecode('zoom+binoculars'),jdecode(''),'/33728.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Squares';
					                                                                    
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 */					                                                            

