/* [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','17',jdecode('%E3%83%9B%E3%83%BC%E3%83%A0'),jdecode(''),'/17.html','true',[],''],
	['PAGE','2073',jdecode('%E6%9C%80%E6%96%B0%E4%BA%8B%E5%8B%99%E5%B1%80%E9%95%B7%E3%81%AE%E3%83%96%E3%83%AD%E3%82%B0'),jdecode(''),'/2073.html','true',[],''],
	['PAGE','2135',jdecode('JOIN%E5%85%A8%E5%9B%BD%E3%83%9F%E3%82%B9%E3%83%86%E3%83%AA%E3%83%BC%E3%83%84%E3%82%A1%E3%83%BC'),jdecode(''),'/2135.html','true',[],''],
	['PAGE','56',jdecode('%E4%BA%8B%E6%A5%AD%E5%86%85%E5%AE%B9%EF%BC%88%E9%80%B1%E6%9C%AB%E4%BD%9C%E5%AE%B6%E5%A4%A7%E9%9B%86%E5%90%88%EF%BC%81%EF%BC%89'),jdecode(''),'/56.html','true',[],''],
	['PAGE','38',jdecode('%E9%80%B1%E6%9C%AB%E4%BD%9C%E5%AE%B6%E3%82%BB%E3%83%9F%E3%83%8A%E3%83%BC%E6%A1%88%E5%86%85'),jdecode(''),'/38.html','true',[],''],
	['PAGE','47',jdecode('%E5%8D%94%E4%BC%9A%E7%B4%B9%E4%BB%8B%EF%BC%88%E5%AE%9A%E6%AC%BE%EF%BC%89'),jdecode(''),'/47.html','true',[],''],
	['PAGE','65',jdecode('%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B%EF%BC%88%E4%BC%9A%E5%93%A1%E5%8B%9F%E9%9B%86%EF%BC%89'),jdecode(''),'/65.html','true',[],'']];
var siteelementCount=7;
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 */					                                                            
