/* [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','1515',jdecode('Home'),jdecode(''),'/1515.html','true',[],''],
	['PAGE','1572',jdecode('Services'),jdecode(''),'/1572/index.html','true',[ 
		['PAGE','2202',jdecode('Services+%28follow+up+page%29'),jdecode(''),'/1572/2202.html','false',[],'']
	],'']];
var siteelementCount=3;
theSitetree.topTemplateName='Snapshot';
theSitetree.paletteFamily='555F8C';
theSitetree.keyvisualId='3632';
theSitetree.keyvisualName='kv_3632.jpg';
theSitetree.fontsetId='10755';
theSitetree.graphicsetId='10876';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='555F8C';
var theTemplate={
				name: 			'Snapshot',
				paletteFamily: 	'555F8C',
				keyvisualId: 	'3632',
				keyvisualName: 	'kv_3632.jpg',
				fontsetId: 		'10755',
				graphicsetId: 	'10876',
				contentColor: 	'FFFFFF',
				contentBGColor: '555F8C',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FC5E7B',
				e_color: 		'BFBFBF',
				f_color: 		'050001',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1001']={
webappId:    '1001',
documentId:  '1572',
internalId:  'aam010in2hsmfe496cc1e4',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '2202',
internalId:  'aam010in2hsmfe496cc1e4',
customField: 'followUp'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '1515',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '1515',
internalId:  '',
customField: '20110401-151414'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '1572',
internalId:  '',
customField: '20110401-152447'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '2202',
internalId:  '',
customField: '20040810-175917'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010IN2HSM';
var companyName   = 'LOCKWISE+LTD.';
var htmlTitle	  = 'Lockwise+Ltd-Locksmiths++Safe+Engineers';
var metaKeywords  = 'lock%2C+key%2C+safe%2C+padlock%2C+locksmith%2C+master+locksmith%2C+combination%2C+digital%2C+magnets%2C+assa%2C+abloy%2C+yale%2C+chubb%2C+unican%2C+simplex%2C+lockey%2C+codelocks%2C+era%2C+union%2C+silca%2C+keycutting%2C+smp%2C+dudley%2C+securikey%2C+automatic+door%2C+ditec%2C+asec%2C+avocet%2C+briton%2C+adams+rite%2C+churchill%2C+cisa%2C+evva%2C+esla%2C+gibbons%2C+hoppe%2C+ingersoll%2C+legge%2C+lf%2C+camlock%2C+abus%2C+la+gard%2C+sargent++greenleaf%2C+squire%2C+tesa%2C+willenhall%2C+zone%2C+paxton%2C+pac%2C+kaba%2C+lockwood%2C+videx%2C+taylor%2C+shearmag%2C+comelit+swipecard%2C+proximity%2C+access+control%2C+panic+bar%2C+tyneside%2C+wallsend%2C+newcastle%2C+north+shields%2C+northumberland%2C+durham%2C+cleveland%2C+tyne++wear%2C+whitley+bay%2C+ponteland%2C+blyth%2C+morpeth%2C+gateshead%2C+sunderland%2Ccramlington%2C+gosforth%2C+jesmond%2C+hebburn%2C+jarrow%2C+south+shields%2C+carlisle%2C+vingcard%2C+timelox%2C+fireproof%2C+burglar%2C+protec%2C+FAAC%2C+assisted+door%2C+door+opener%2C+power+door%2C+DDA%2C+BS7036%2C+maglock';
var metaContents  = 'Locksmiths%2C+safe+engineers%2C+automatic+door+manufacturers+based+in+Wallsend+near+Newcastle+upon+Tyne+England.';
					                                                                    
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 */					                                                            

