/* [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','24',jdecode('%E4%BC%9A%E7%A4%BE%E6%A1%88%E5%86%85'),jdecode(''),'/24.html','true',[],''],
	['PAGE','5358',jdecode('Pico-Device+Co.%EF%BC%88En%EF%BD%87lish%EF%BC%89'),jdecode(''),'/5358.html','true',[],''],
	['PAGE','54',jdecode('%E8%A3%BD%E5%93%81'),jdecode(''),'/54/index.html','true',[ 
		['PAGE','4434',jdecode('%E3%83%92%E3%83%88%E7%9A%AE%E8%86%9A%E3%82%AC%E3%82%B9%E3%83%BB%E3%83%92%E3%83%88%E6%B1%97%E9%96%A2%E9%80%A3'),jdecode(''),'/54/4434.html','true',[],''],
		['PAGE','6222',jdecode('%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AA%E3%83%B3%E3%82%B0%E7%94%A8%E6%8D%95%E9%9B%86%E3%83%90%E3%83%83%E3%82%B0'),jdecode(''),'/54/6222.html','true',[],''],
		['PAGE','6725',jdecode('%E7%99%BA%E6%B1%97%E8%A8%88'),jdecode(''),'/54/6725.html','true',[],''],
		['PAGE','1080',jdecode('%EF%BE%8B%EF%BE%9F%EF%BD%BA%EF%BE%8C%EF%BE%9B%EF%BD%B0%EF%BE%93%EF%BE%86%EF%BE%80%EF%BD%B0'),jdecode(''),'/54/1080.html','true',[],'']
	],''],
	['PAGE','1089',jdecode('%E7%89%B9%E8%A8%B1%E3%83%BB%E5%AE%9F%E7%94%A8%E6%96%B0%E6%A1%88'),jdecode(''),'/1089.html','true',[],''],
	['PAGE','72',jdecode('%E7%99%BA%E8%A1%A8%E8%A8%98%E4%BA%8B'),jdecode(''),'/72.html','true',[],''],
	['PAGE','7077',jdecode('%E7%A7%91%E5%AD%A6%E7%9F%A5%E8%AD%98%E3%81%AE%E6%8F%90%E4%BE%9B'),jdecode(''),'/7077.html','true',[],''],
	['PAGE','81',jdecode('%E3%81%8A%E5%95%8F%E5%90%88%E3%81%9B%E5%85%88'),jdecode(''),'/81.html','true',[],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Global';
					                                                                    
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 */					                                                            

