/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','20601',jdecode('about+us'),jdecode(''),'/20601.html','true',[],''],
	['PAGE','22101',jdecode('framing'),jdecode(''),'/22101/index.html','true',[ 
		['PAGE','17201',jdecode('commended+framer'),jdecode(''),'/22101/17201.html','true',[],''],
		['PAGE','40201',jdecode('what+we+can+frame'),jdecode(''),'/22101/40201.html','true',[],''],
		['PAGE','40222',jdecode('framing+options'),jdecode(''),'/22101/40222.html','true',[],''],
		['PAGE','41001',jdecode('conservation+framing'),jdecode(''),'/22101/41001.html','true',[],''],
		['PAGE','40243',jdecode('e-mail+quote'),jdecode(''),'/22101/40243.html','true',[],'']
	],''],
	['PAGE','19501',jdecode('gallery'),jdecode(''),'/19501.html','true',[],''],
	['PAGE','452',jdecode('exhibitions'),jdecode(''),'/452.html','true',[],''],
	['PAGE','16701',jdecode('directions'),jdecode(''),'/16701.html','true',[],''],
	['PAGE','17222',jdecode('opening+hours'),jdecode(''),'/17222.html','true',[],''],
	['PAGE','17243',jdecode('contact+us'),jdecode(''),'/17243.html','true',[],'']];
var siteelementCount=13;
theSitetree.topTemplateName='Borders';
theSitetree.paletteFamily='CECEA9';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10571';
theSitetree.graphicsetId='10772';
theSitetree.contentColor='692643';
theSitetree.contentBGColor='F3F9FC';
var theTemplate={
				name: 			'Borders',
				paletteFamily: 	'CECEA9',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10571',
				graphicsetId: 	'10772',
				contentColor: 	'692643',
				contentBGColor: 'F3F9FC',
				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: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100616-135443'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100308-154204'
};
webappMappings['2001']={
webappId:    '2001',
documentId:  '16701',
internalId:  'location',
customField: 'language:en;country:GB;isIncluded:false;'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20100721-100931'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17201',
internalId:  '',
customField: '20100112-155856'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17243',
internalId:  '',
customField: '20100519-170646'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17222',
internalId:  '',
customField: '20100814-091040'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '19501',
internalId:  '',
customField: '20100705-122800'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20100113-084727'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20100116-123205'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '40201',
internalId:  '',
customField: '20100116-095238'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '40222',
internalId:  '',
customField: '20100116-104230'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '40243',
internalId:  '',
customField: '20100319-175144'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '41001',
internalId:  '',
customField: '20100715-175657'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INZ7XV';
var companyName   = '++Specialist+Framer+and+Contemporary+Gallery';
var htmlTitle	  = 'Seasons+Gallery+Durham';
var metaKeywords  = 'Picture+framer%2C+frame%2C+Seasons+Gallery%2C+Durham%2C+art+gallery%2C+Limited+edition+prints%2C+artwork%2C+paintings%2C+mounting%2C+greetings+cards%2C+conservation+framing';
var metaContents  = 'Gallery+with+high+quality%2C+personalised+picture+framing+service.+Exciting+range+of+limited+edition+prints+and+original+paintings';
					                                                                    
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 */					                                                            
