/* [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','4201',jdecode('Home'),jdecode(''),'/4201.html','true',[],''],
	['PAGE','32201',jdecode('Our+office'),jdecode(''),'/32201.html','true',[],''],
	['PAGE','4252',jdecode('Office+hours'),jdecode(''),'/4252.html','true',[],''],
	['PAGE','4273',jdecode('About+us'),jdecode(''),'/4273/index.html','true',[ 
		['PAGE','4315',jdecode('Doctor'),jdecode(''),'/4273/4315.html','true',[],''],
		['PAGE','21701',jdecode('Staff'),jdecode(''),'/4273/21701.html','true',[],'']
	],''],
	['PAGE','4357',jdecode('Contact'),jdecode(''),'/4357.html','true',[],''],
	['PAGE','26001',jdecode('FAQ'),jdecode(''),'/26001.html','true',[],''],
	['PAGE','38601',jdecode('Orthodontic+info'),jdecode(''),'/38601/index.html','true',[ 
		['PAGE','36301',jdecode('Name+of+teeth'),jdecode(''),'/38601/36301.html','true',[],''],
		['PAGE','35722',jdecode('Molar+morphology'),jdecode(''),'/38601/35722.html','true',[],''],
		['PAGE','36322',jdecode('Types+of+malocclusion'),jdecode(''),'/38601/36322.html','true',[],''],
		['PAGE','41001',jdecode('Treatment+stages'),jdecode(''),'/38601/41001.html','true',[],''],
		['PAGE','45901',jdecode('Retainer'),jdecode(''),'/38601/45901.html','true',[],''],
		['PAGE','35701',jdecode('Orthodontics+terms'),jdecode(''),'/38601/35701.html','true',[],'']
	],''],
	['PAGE','36343',jdecode('Orthodontic+treatments'),jdecode(''),'/36343.html','true',[],''],
	['PAGE','37201',jdecode('Our+motto'),jdecode(''),'/37201.html','true',[],''],
	['PAGE','47601',jdecode('Map'),jdecode(''),'/47601.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Boston';
theSitetree.paletteFamily='832A2A';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11067';
theSitetree.graphicsetId='11840';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='A34242';
var theTemplate={
				name: 			'Boston',
				paletteFamily: 	'832A2A',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11067',
				graphicsetId: 	'11840',
				contentColor: 	'FFFFFF',
				contentBGColor: 'A34242',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4201',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']={
webappId:    '2001',
documentId:  '47601',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
var canonHostname = 'wsc01.cm4all.affinity.com';
var accountId     = 'AAFF10IN3V3L';
var companyName   = 'James+Chen+Orthodontics';
var htmlTitle	  = 'James+Chen+Ortho+website';
var metaKeywords  = 'orthodontic%2C+braces%2C+invisalign%2C+twin+block%2C+james+chen%2C+san+mateo%2C+california%2C+orthodontics%2C+malocclusion%2C+bite%2C';
var metaContents  = 'orthodontic+service';
					                                                                    
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 */					                                                            
