/* [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','11',jdecode('%E8%B2%A1%E5%9B%A3%E6%B3%95%E4%BA%BA%E5%B3%B6%E6%A0%B9%E7%9C%8C%E5%A9%A6%E4%BA%BA%E4%BC%9A%E9%A4%A8'),jdecode(''),'/11.html','true',[],''],
	['PAGE','3082',jdecode('%E6%96%BD%E8%A8%AD%E7%B4%B9%E4%BB%8B'),jdecode(''),'/3082.html','true',[],''],
	['PAGE','3091',jdecode('%E3%81%82%E3%82%86%E3%81%BF'),jdecode(''),'/3091.html','true',[],''],
	['PAGE','32',jdecode('%E5%B3%B6%E6%A0%B9%E7%9C%8C%E9%80%A3%E5%90%88%E5%A9%A6%E4%BA%BA%E4%BC%9A'),jdecode(''),'/32.html','true',[],''],
	['PAGE','59',jdecode('%E5%B3%B6%E6%A0%B9%E7%9C%8C%E4%BA%A4%E9%80%9A%E5%AE%89%E5%85%A8%E6%AF%8D%E3%81%AE%E4%BC%9A%E9%80%A3%E5%90%88%E4%BC%9A'),jdecode(''),'/59.html','true',[],''],
	['PAGE','77',jdecode('%E6%B4%BB%E5%8B%95%E7%B4%B9%E4%BB%8B'),jdecode(''),'/77.html','true',[],''],
	['PAGE','3195',jdecode('%E3%81%8A%E7%9F%A5%E3%82%89%E3%81%9B'),jdecode(''),'/3195.html','true',[],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Borders';
					                                                                    
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 */					                                                            
