/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],''],
	['PAGE','7001',jdecode('Owner+Benefits'),jdecode(''),'/7001/index.html','true',[ 
		['PAGE','58101',jdecode('On+Location+Assurance'),jdecode(''),'/7001/58101.html','true',[],'']
	],''],
	['PAGE','7022',jdecode('Architect%2FDesigner+Support'),jdecode(''),'/7022.html','true',[],''],
	['PAGE','7064',jdecode('Tailored+Production+Values'),jdecode(''),'/7064.html','true',[],''],
	['PAGE','7127',jdecode('International+Experience'),jdecode(''),'/7127.html','true',[],''],
	['PAGE','8901',jdecode('Confidential+Consultation'),jdecode(''),'/8901.html','true',[],''],
	['PAGE','8943',jdecode('Contact'),jdecode(''),'/8943.html','true',[],''],
	['PAGE','9301',jdecode('Contributors+Blog'),jdecode(''),'/9301.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='669999';
theSitetree.keyvisualId='1338';
theSitetree.keyvisualName='handwerker.jpg';
theSitetree.fontsetId='234';
theSitetree.graphicsetId='288';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Startup',
				paletteFamily: 	'669999',
				keyvisualId: 	'1338',
				keyvisualName: 	'handwerker.jpg',
				fontsetId: 		'234',
				graphicsetId: 	'288',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				a_color: 		'669999',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
var canonHostname = 'wsc01.cm4all.affinity.com';
var accountId     = 'AAFF10INZ1E6';
var companyName   = 'think+global+-+build+local';
var htmlTitle	  = 'www.caleyconstruction.com';
var metaKeywords  = 'general+contractor+manhattan+seattle+hamptons+owner+representative+building+bahamas+project+management+construction+estates+custom+builder+san+juan+islands+palm+springs+rockies+japan+new+zealand+new+mexico+easthampton+southampton+bridgehampton+sag+harbor+anacortes+friday+harbor+jaimaca+st+barts+craftman+modern+beachouse+beach+house+estate+residential';
var metaContents  = 'general+contractor+and+builder++custom+builder+owner+representative+++meta+name%3Dverify-v1+content%3DZ4vxt8jwH1nbnzlB3U88c1Z1MTrp%2FmDuC5RvN5Z3x3s%3D+%2F';
					                                                                    
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 */					                                                            

