/* [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','1801',jdecode('About+Us+%2F+Home'),jdecode(''),'/1801.html','true',[],''],
	['PAGE','1852',jdecode('Areas+Served'),jdecode(''),'/1852.html','true',[],''],
	['PAGE','1873',jdecode('Services'),jdecode(''),'/1873.html','true',[],''],
	['PAGE','1915',jdecode('Testimonials'),jdecode(''),'/1915.html','true',[],''],
	['PAGE','1894',jdecode('Contact+Us'),jdecode(''),'/1894/index.html','true',[ 
		['PAGE','7701',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/1894/7701.html','false',[],'']
	],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='000066';
theSitetree.keyvisualId='1425';
theSitetree.keyvisualName='elektriker2.jpg';
theSitetree.fontsetId='234';
theSitetree.graphicsetId='292';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Startup',
				paletteFamily: 	'000066',
				keyvisualId: 	'1425',
				keyvisualName: 	'elektriker2.jpg',
				fontsetId: 		'234',
				graphicsetId: 	'292',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				a_color: 		'000066',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1001']={
webappId:    '1001',
documentId:  '1894',
internalId:  'aaff10in2vn2117fa297f20',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '7701',
internalId:  'aaff10in2vn2117fa297f20',
customField: 'followUp'
};
var canonHostname = 'wsc01.cm4all.affinity.com';
var accountId     = 'AAFF10IN2VN2';
var companyName   = '773-775-8840';
var htmlTitle	  = 'JF+Industries%2C+Inc.+--+Chicago+Electrical+Contractor';
var metaKeywords  = 'Experienced%2C+High+Quality%2C+Professional%2C+Licensed%2C+Bonded%2C+Insured%2C+Electrical+Contractor%2C+Electrician%2C+Electrical+Installation%2C+Chicago%2C+Chicagoland%2C+Trusted%2C+J+F+Industries%2C+JF+Industries%2C+Electrical+Construction%2C+Knob+and+Tube%2C+Electric%2C+Electrical%2C+Electrician%2C+Wiring%2C+Wire%2C+Remodel%2C+Construction%2C+Safe%2C+Drug-free%2C+Maintenance%2C+Reliable%2C+Dependant%2C+Honest%2C+Value%2C+American%2C+English+Speaking%2C+Electrician+in+Chicago%2C+Electrical+Contractors';
var metaContents  = 'Chicago+Electrical+Contractors+providing+high+quality+workmanship+at+competitive+prices.++Chicago+Licensed+Contractor.++All+necessary+permits+obtained.++All+work+guaranteed+%21';
					                                                                    
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 */					                                                            

