/* [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','452',jdecode('About+us'),jdecode(''),'/452.html','true',[],''],
	['PAGE','473',jdecode('Construction'),jdecode(''),'/473.html','true',[],''],
	['PAGE','494',jdecode('Retail'),jdecode(''),'/494.html','true',[],''],
	['PAGE','515',jdecode('Transport'),jdecode(''),'/515.html','true',[],''],
	['PAGE','536',jdecode('Shipping'),jdecode(''),'/536.html','true',[],''],
	['PAGE','557',jdecode('Protection'),jdecode(''),'/557.html','true',[],''],
	['PAGE','578',jdecode('Advice'),jdecode(''),'/578.html','true',[],''],
	['PAGE','599',jdecode('Contact+Us'),jdecode(''),'/599.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='C6E5F6';
theSitetree.keyvisualId='750';
theSitetree.keyvisualName='bauleiter.jpg';
theSitetree.fontsetId='142';
theSitetree.graphicsetId='160';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Metal',
				paletteFamily: 	'C6E5F6',
				keyvisualId: 	'750',
				keyvisualName: 	'bauleiter.jpg',
				fontsetId: 		'142',
				graphicsetId: 	'160',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'C6E5F6',
				b_color: 		'A4BDCC',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1008']={
webappId:    '1008',
documentId:  '599',
internalId:  '1897073',
customField: 'en:GB:'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20070803-124803'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20070518-160340'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20070518-163746'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20070518-163326'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20070518-160923'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20070518-160821'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20070518-161048'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20070518-161632'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20070518-162416'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10IN2C1M';
var companyName   = 'Advanced+Glass+Restoration+Ltd';
var htmlTitle	  = 'Glass+Renovation+and+Glass+Restoration+-+UK';
var metaKeywords  = 'glass+renovation%2C+glass+restoration%2C+scratch%2C+advanced%2C+construction+site%2C+retail%2C+advice%2C+damaged+glass%2C+weld+splatter%2C+angle+grind+damage%2C+protection++prevention%2C+graffiti+damage%2C+';
var metaContents  = 'Glass+renovation+and+glass+restoration+from+one+of+Europe%E2%80%99s+leading+experts+in+Glass+Restoration.+';
					                                                                    
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 */					                                                            

