/* [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','801',jdecode('home'),jdecode(''),'/801.html','true',[],''],
	['PAGE','11601',jdecode('who+we+are'),jdecode(''),'/11601.html','true',[],''],
	['PAGE','5543',jdecode('how+it+works'),jdecode(''),'/5543.html','true',[],''],
	['PAGE','852',jdecode('current+menus'),jdecode(''),'/852/index.html','true',[ 
		['PAGE','33601',jdecode('may+19'),jdecode(''),'/852/33601.html','true',[],''],
		['PAGE','35001',jdecode('may+27'),jdecode(''),'/852/35001.html','true',[],''],
		['PAGE','35601',jdecode('june+2'),jdecode(''),'/852/35601.html','true',[],''],
		['PAGE','35622',jdecode('june+9'),jdecode(''),'/852/35622.html','true',[],''],
		['PAGE','36301',jdecode('june+16'),jdecode(''),'/852/36301.html','true',[],''],
		['PAGE','35643',jdecode('june+23'),jdecode(''),'/852/35643.html','true',[],''],
		['PAGE','5522',jdecode('cooking+instructions'),jdecode(''),'/852/5522.html','true',[],'']
	],''],
	['PAGE','14143',jdecode('menu+archives'),jdecode(''),'/14143.html','true',[],''],
	['PAGE','7501',jdecode('testimonials'),jdecode(''),'/7501.html','true',[],''],
	['PAGE','13201',jdecode('press'),jdecode(''),'/13201.html','true',[],''],
	['PAGE','5606',jdecode('contact+us'),jdecode(''),'/5606.html','true',[],''],
	['PAGE','5564',jdecode('inquiry+form'),jdecode(''),'/5564/index.html','true',[ 
		['PAGE','9701',jdecode('enrollment+form+%28follow+up+page%29'),jdecode(''),'/5564/9701.html','false',[],'']
	],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Billy';
theSitetree.paletteFamily='8D7C50';
theSitetree.keyvisualId='7102';
theSitetree.keyvisualName='kv_7102.jpg';
theSitetree.fontsetId='16379';
theSitetree.graphicsetId='12126';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='8D7C50';
var theTemplate={
				name: 			'Billy',
				paletteFamily: 	'8D7C50',
				keyvisualId: 	'7102',
				keyvisualName: 	'kv_7102.jpg',
				fontsetId: 		'16379',
				graphicsetId: 	'12126',
				contentColor: 	'FFFFFF',
				contentBGColor: '8D7C50',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '5564',
internalId:  'aaff10inl54d1156d4a2e01',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '9701',
internalId:  'aaff10inl54d1156d4a2e01',
customField: 'followUp'
};
var canonHostname = 'wsc01.cm4all.affinity.com';
var accountId     = 'AAFF10INL54D';
var companyName   = '+++++++++++++++++++';
var htmlTitle	  = 'ate+foods';
var metaKeywords  = 'HEADdinner+delivery+forks+good+food+organic+value+baby+austin+home+catering+gourmet+ate+cooking+table+family+prepared+delivered+home-cooked+dining-in+scratch+cooking+monday+cycle+weekly+fresh+ingredients+ingredient+convenient+jessica+rodolfo+buonocore+campanile+santa+monica+daily+sandwich+california+texas+los+angeles+foods+week+weekday+weekend+easy+time%2FHEAD';
var metaContents  = '++++Sound+familiar+%3F++The+weekend+is+over%2C+its+5pm+on+Monday%2C++you+come+back+from+work+exhausted%2C+and+now+you+have+to+think+about+dinner.++Heres+where+we+come+in.++Or%2C+you+just+had+a+baby.++Your+family+has+finally+gone+back+home%2C+and+you+have+all+the+time+in+the+world+to+spend+bonding+with+your+baby.++But+at+the+end+of+the+day%2C+somehow+the+only+thing+you+can+come+up+with+to+have+for+dinner+is+cereal%21++Heres+where+we+come+in.++ATE+foods+dinner+delivery+answers+that+daily+question+of+what+are+we+going+to+have+for+dinner+with+our+weekly+delivery+service.++We+will+deliver+to+your+home+or+office+three+3-course+meals%2C+prepared+fresh%2C+ready+to+be+eaten%2C+or+refrigerated+or+frozen+to+be+consumed+at+your+convenience.++We+use+only+the+best+ingredients%2C+everything+is+homemade%2C+and+everything+is+delicious%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 */					                                                            

