/* [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','701',jdecode('Home+page1'),jdecode(''),'/701.html','true',[],''],
	['PAGE','13901',jdecode('service%2Crepairs%2C+page2'),jdecode(''),'/13901.html','true',[],'']];
var siteelementCount=2;
theSitetree.topTemplateName='Amaze';
theSitetree.paletteFamily='0A2447';
theSitetree.keyvisualId='2421';
theSitetree.keyvisualName='jobsuche.jpg';
theSitetree.fontsetId='399';
theSitetree.graphicsetId='444';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='0A2447';
var theTemplate={
				name: 			'Amaze',
				paletteFamily: 	'0A2447',
				keyvisualId: 	'2421',
				keyvisualName: 	'jobsuche.jpg',
				fontsetId: 		'399',
				graphicsetId: 	'444',
				contentColor: 	'FFFFFF',
				contentBGColor: '0A2447',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'0A2447',
				b_color: 		'081B35',
				c_color: 		'3268E2',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100718-183601'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20100718-183640'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '13901',
internalId:  '4640649',
customField: 'en:GB:'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INZ0JA';
var companyName   = 'Gloucestershire+microwave+services';
var htmlTitle	  = 'microwave+oven+repairs+and+service+domestic+and+commercial+in+gloucester+gloucestershire';
var metaKeywords  = '+microwave+oven%2C+repairs%2C+maintenance%2C+commercial%2C+gloucester%2Cgloucestershire%2Cservice+%2Cdomestic%2Cmicrowave+oven+parts%2C+microwave+oven+repair%2C+microwave+oven+rating%2C+microwave+spares%2C+uk+microwave+ovens%2C+microwave+oven+spare+parts%2C+microwave+spare+parts%2C+panasonic+microwave+oven%2C+whirlpool+microwave+part%2C+amana+microwave+parts%2C+lg+microwave+oven%2C+sanyo+microwave+oven%2C+litton+microwave%2C+sharp+microwave+repair%2C+amana+commercial+microwave%2C+panasonic+commercial+microwave%2C+sharp+microwave+spare%2C+samsung+commercial+microwave%2C+catering+equipment+suppliers%2C+uk+catering+equipment%2C+commercial+catering+equipment%2C+kitchen%2C+catering+equipment%2C++repair%2Cgloucestershire+microwave+co+uk%2C+microwave+oven+parts%2C+microwave+oven+repair%2C+microwave+oven+rating%2C+microwave+spares%2C+uk+microwave+ovens%2C+microwave+oven+spare+parts%2C+microwave+spare+parts%2C+panasonic+microwave+oven%2C+whirlpool+microwave+part%2C+amana+microwave+parts%2C+lg+microwave+oven%2C+++';
var metaContents  = 'microwave+oven+repairs+and+service+in+gloucester+and+gloucestershire+and+surrounding+areas+panasonic+sharp+sanyo+amana+samsung+merrychef+and+most+other+makes+of+microwave+oven+repairs+and+service+%2Ccommercial+maintenance+contracts';
					                                                                    
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 */					                                                            
