/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('Services'),jdecode(''),'/552.html','true',[],''],
	['PAGE','85601',jdecode('Products'),jdecode(''),'/85601.html','true',[],''],
	['PAGE','636',jdecode('About+us'),jdecode(''),'/636/index.html','true',[ 
		['PAGE','12601',jdecode('news'),jdecode(''),'/636/12601.html','true',[],'']
	],''],
	['PAGE','678',jdecode('Contact'),jdecode(''),'/678/index.html','true',[ 
		['PAGE','11201',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/678/11201.html','false',[],'']
	],''],
	['PAGE','116622',jdecode('Online+order'),jdecode(''),'/116622.html','true',[],''],
	['PAGE','179901',jdecode('Journal'),jdecode(''),'/179901.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='385CA9';
theSitetree.keyvisualId='7154';
theSitetree.keyvisualName='kv_7154.jpg';
theSitetree.fontsetId='16412';
theSitetree.graphicsetId='12134';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Capri',
				paletteFamily: 	'385CA9',
				keyvisualId: 	'7154',
				keyvisualName: 	'kv_7154.jpg',
				fontsetId: 		'16412',
				graphicsetId: 	'12134',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: '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['1501']={
webappId:    '1501',
documentId:  '501',
internalId:  '7545718',
customField: '1501'
};
webappMappings['3030']={
webappId:    '3030',
documentId:  '179901',
internalId:  '179901',
customField: 'language:en;country:US;'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '85601',
internalId:  '11368614ab4',
customField: 'g.12dk5t9mp.mcoic9a8b4.7g'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '678',
internalId:  'aaplu0invpbg11300c540e2',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '11201',
internalId:  'aaplu0invpbg11300c540e2',
customField: 'followUp'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'AAPLU0INVPBG';
var companyName   = 'everything+for+your+Online+Business';
var htmlTitle	  = 'Web+Publishing+Services+07024+800-282-8550';
var metaKeywords  = 'web+design+new+york+city%2Cweb+development+new+jersey%2Cweb+design+ct%2Cweb+development+new+york%2Ccontent+management%2Cevent+management%2Cassociation+management+software%2Cweb+design+new+jersey';
var metaContents  = 'New+York+New+Jersey+web+Design+Services';
					                                                                    
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 */					                                                            

