/* [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','32',jdecode('Home'),jdecode(''),'/32.html','true',[],''],
	['PAGE','1107',jdecode('DJ-Dtime+Biography'),jdecode(''),'/1107/index.html','true',[ 
		['PAGE','3499',jdecode('Biography+English+Ver.'),jdecode(''),'/1107/3499.html','true',[],'']
	],''],
	['PAGE','3378',jdecode('Suggestion+%2F+Comments+'),jdecode(''),'/3378.html','true',[],''],
	['PAGE','1116',jdecode('DJDTIME+Calendar'),jdecode(''),'/1116.html','true',[],''],
	['PAGE','1125',jdecode('Live+*Radio*'),jdecode(''),'/1125.html','true',[],''],
	['PAGE','2311',jdecode('Forum+Talk'),jdecode(''),'/2311.html','true',[],''],
	['PAGE','1134',jdecode('Live+Chat+Room'),jdecode(''),'/1134.html','true',[],''],
	['PAGE','3257',jdecode('Entertainment++*News*'),jdecode(''),'/3257/index.html','true',[ 
		['PAGE','3266',jdecode('Arclinks'),jdecode(''),'/3257/3266.html','true',[],'']
	],''],
	['PAGE','3040',jdecode('Parties+-+Events+Photos'),jdecode(''),'/3040.html','true',[],''],
	['PAGE','2706',jdecode('Download+%2F+mp3+%2F+video'),jdecode(''),'/2706.html','true',[],''],
	['PAGE','2260',jdecode('Guestbook'),jdecode(''),'/2260/index.html','true',[ 
		['PAGE','2259',jdecode('Read+Guestbook'),jdecode(''),'/2260/2259.html','true',[],'']
	],''],
	['PAGE','1152',jdecode('Press'),jdecode(''),'/1152.html','true',[],''],
	['PAGE','2715',jdecode('Mailing+List+*News*'),jdecode(''),'/2715.html','true',[],''],
	['PAGE','1161',jdecode('Contact'),jdecode(''),'/1161.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Stars';
theSitetree.paletteFamily='3C5284';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10510';
theSitetree.graphicsetId='10913';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3C5284';
var theTemplate={
				name: 			'Stars'
,				paletteFamily: 	'3C5284'
,				keyvisualId: 	'-1'
,				keyvisualName: 	'keyv.jpg'
,				fontsetId: 		'10510'
,				graphicsetId: 	'10913'
,				contentColor: 	'FFFFFF'
,				contentBGColor: '3C5284'
,				a_color: 		'3C5284'
,				b_color: 		'000000'
,				c_color: 		'000000'
,				d_color: 		'FFFFFF'
,				e_color: 		'FFFFFF'
,				f_color: 		'FFFFFF'
 			  };					                                                                    
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 */					                                                            

