/* [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','20',jdecode('TOP+PAGE'),jdecode(''),'/20.html','true',[],''],
	['PAGE','50',jdecode('%E4%BC%9A%E7%A4%BE%E6%A1%88%E5%86%85'),jdecode(''),'/50/index.html','true',[ 
		['PAGE','59',jdecode('%E3%81%94%E3%81%82%E3%81%84%E3%81%95%E3%81%A4'),jdecode(''),'/50/59.html','true',[],''],
		['PAGE','77',jdecode('%E7%A4%BE%E9%95%B7%E7%B4%B9%E4%BB%8B'),jdecode(''),'/50/77.html','true',[],''],
		['PAGE','86',jdecode('%E4%BC%9A%E7%A4%BE%E6%A6%82%E8%A6%81'),jdecode(''),'/50/86.html','true',[],'']
	],''],
	['PAGE','95',jdecode('What%26%23x27%3Bs+New'),jdecode(''),'/95.html','true',[],''],
	['PAGE','104',jdecode('%E5%95%86%E5%93%81%E6%A1%88%E5%86%85'),jdecode(''),'/104/index.html','true',[ 
		['PAGE','3387',jdecode('%E5%8E%9F%E6%96%99'),jdecode(''),'/104/3387.html','true',[],''],
		['PAGE','3251',jdecode('%E3%82%AA%E3%83%BC%E3%82%B9%E3%83%88%E3%83%A9%E3%83%AA%E3%82%A2%E3%83%AF%E3%82%A4%E3%83%B3'),jdecode(''),'/104/3251.html','true',[],''],
		['PAGE','3260',jdecode('%E3%83%89%E3%82%A4%E3%83%84%E3%83%AF%E3%82%A4%E3%83%B3'),jdecode(''),'/104/3260.html','true',[],''],
		['PAGE','3269',jdecode('%E3%82%A2%E3%83%AB%E3%82%BC%E3%83%B3%E3%83%81%E3%83%B3%E3%83%AF%E3%82%A4%E3%83%B3'),jdecode(''),'/104/3269.html','true',[],''],
		['PAGE','6913',jdecode('%E3%83%8B%E3%83%A5%E3%83%BC%E3%82%B8%E3%83%A9%E3%83%B3%E3%83%89%E4%BB%96'),jdecode(''),'/104/6913.html','true',[],''],
		['PAGE','6965',jdecode('%E3%81%9D%E3%81%AE%E4%BB%96%E5%95%86%E5%93%81'),jdecode(''),'/104/6965.html','true',[],'']
	],''],
	['PAGE','5062',jdecode('CSR'),jdecode(''),'/5062.html','true',[],''],
	['PAGE','140',jdecode('%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B'),jdecode(''),'/140.html','true',[],''],
	['PAGE','131',jdecode('LINK'),jdecode(''),'/131.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Straight';
					                                                                    
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 */					                                                            
