/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','2301',jdecode('Project+Cars'),jdecode(''),'/2301.html','true',[],''],
	['PAGE','2322',jdecode('EV+Clubs+and+Discussion+Sites'),jdecode(''),'/2322.html','true',[],''],
	['PAGE','12701',jdecode('Component+knowlege'),jdecode(''),'/12701.html','true',[],''],
	['PAGE','12722',jdecode('Int+Component+supply'),jdecode(''),'/12722.html','true',[],''],
	['PAGE','12743',jdecode('Completed+vehicles'),jdecode(''),'/12743.html','true',[],''],
	['PAGE','12764',jdecode('NZ+Suppliers'),jdecode(''),'/12764.html','true',[],''],
	['PAGE','12785',jdecode('Possible+Breakthrough+Technology'),jdecode(''),'/12785.html','true',[],''],
	['PAGE','12806',jdecode('EV+Physics'),jdecode(''),'/12806.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='D43A3A';
theSitetree.keyvisualId='2469';
theSitetree.keyvisualName='verkehr.jpg';
theSitetree.fontsetId='404';
theSitetree.graphicsetId='460';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Collage',
				paletteFamily: 	'D43A3A',
				keyvisualId: 	'2469',
				keyvisualName: 	'verkehr.jpg',
				fontsetId: 		'404',
				graphicsetId: 	'460',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'D43A3A',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INPIW8';
var companyName   = 'GreenEV+Ltd++++Christchurch+New+Zealand';
var htmlTitle	  = 'GreenEV+Green+Electric+Vehicles+converted+from+ICE+cars+%28Internal+Combustion+Engined%29+in+Christchurch+New+Zealand.+Electric+car+stop+global+warming%2C+stop+burning+fossil+fuel%2C+drive+clean+green+plug+in+electric+cars.';
var metaKeywords  = 'electric+car+battery+electric+conversion+car+vehicle+ICE+green+alternative+efficient+100%25+BEV+EV+DIY+global+warming+Greenev+we+convert+your+car+or+supply+expertise+to+help+you+do+your+ownelectric+car+conversions+from+internal+combustion+ICE+helping+DIY+people+to+convert+thier+cars+to+battery+electric+so+they+are+not+dependant+on+global+warming+co2+gas+guzzlers+replace+petol+and+oil+with+green+fuel+sourced+cars+running+on+batteries+supplying+green+electricity+DC+electric+motors+engineered+for+top+efficiency+with+PWM+controllers+for+very+high+efficiency';
var metaContents  = 'electric+car+conversions+from+internal+combustion+ICE+helping+DIY+people+to+convert+thier+cars+to+battery+electric+so+they+are+not+dependant+on+global+warming+co2+gas+guzzlers+replace+petol+and+oil+with+green+fuel+sourced+cars+running+on+batteries+supplying+green+electricity+DC+electric+motors+engineered+for+top+efficiency+with+PWM+controllers+for+very+high+efficiency';
					                                                                    
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 */					                                                            
