/* [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','4301',jdecode('Home'),jdecode(''),'/4301.html','true',[],''],
	['PAGE','4352',jdecode('About+Annie+Bean'),jdecode(''),'/4352.html','true',[],''],
	['PAGE','4394',jdecode('House+Drawings'),jdecode(''),'/4394.html','true',[],''],
	['PAGE','4415',jdecode('Church+Drawings'),jdecode(''),'/4415.html','true',[],''],
	['PAGE','27701',jdecode('Ordering+from+Annie+Bean'),jdecode(''),'/27701.html','true',[],''],
	['PAGE','4499',jdecode('How+to+reach+us'),jdecode(''),'/4499.html','true',[],''],
	['PAGE','30506',jdecode('Guestbook'),jdecode(''),'/30506/index.html','true',[ 
		['PAGE','30501',jdecode('Read+Guestbook'),jdecode(''),'/30506/30501.html','true',[],'']
	],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Snapshot';
theSitetree.paletteFamily='AB354B';
theSitetree.keyvisualId='3627';
theSitetree.keyvisualName='kv_3627.jpg';
theSitetree.fontsetId='10458';
theSitetree.graphicsetId='10874';
theSitetree.contentColor='CCCCCC';
theSitetree.contentBGColor='AB354B';
var theTemplate={
				name: 			'Snapshot',
				paletteFamily: 	'AB354B',
				keyvisualId: 	'3627',
				keyvisualName: 	'kv_3627.jpg',
				fontsetId: 		'10458',
				graphicsetId: 	'10874',
				contentColor: 	'CCCCCC',
				contentBGColor: 'AB354B',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FC5E7B',
				e_color: 		'BFBFBF',
				f_color: 		'050001',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '30506',
internalId:  '30506awh020in2ask',
customField: 'action=form&icq=false'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '30501',
internalId:  '30506awh020in2ask',
customField: 'action=list'
};
var canonHostname = 'cm4all.west-datacenter.net';
var accountId     = 'AWH020IN2ASK';
var companyName   = 'Annie+Bean...artist';
var htmlTitle	  = 'House+Drawings+-+Portraits+of+your+Home+in+Pen+and+Ink';
var metaKeywords  = 'Annie+Bean%2C+pen+and+ink+drawings%2C+home+drawings%2C+house+portraits%2C+home+images%2C+pen+and+ink+illustrations%2C+homes+in+ink%2C+architectural+illustrations%2C+building+illustrations%2C+images%2C+church+drawings%2C+image+of+first+school%2C+important+buildings%2C+significant+structures%2C+artist%2C+art%2C+artistic%2C+gifts+of+drawings%2C+house+artist%2C+greeting+card+art%2C+Christmas+card+art%2C+house+warming+gift%2C+realtor+gift%2C+thank+you+gift%2C+stationery%2C+note+card%2C+postcard%2C+drawings+on+CD%2C+free+digital+copy.+';
var metaContents  = 'Annie+Bean+does+pen+and+ink+drawings+of+your+home+or+church+from+your+photograph.++Reasonable+prices%2C+various+sizes%2C+either+india+or+sepia+ink.++Annie+shows+examples+of+drawings+done%2C+with+photographs.++Easy+order+site.++Also+receive+CD+with+image+of+drawing+for+reproduction.+Fast+response.';
					                                                                    
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 */					                                                            
