/* [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','4519',jdecode('HOME'),jdecode(''),'/4519.html','true',[],''],
	['PAGE','15603',jdecode('ARTICLES'),jdecode(''),'/15603/index.html','true',[ 
		['PAGE','39281',jdecode('Hypnosis'),jdecode(''),'/15603/39281.html','true',[],''],
		['PAGE','74681',jdecode('Brief+Therapy'),jdecode(''),'/15603/74681.html','true',[],''],
		['PAGE','39308',jdecode('Relaxation'),jdecode(''),'/15603/39308.html','true',[],''],
		['PAGE','39335',jdecode('Child+Psychology'),jdecode(''),'/15603/39335.html','true',[],''],
		['PAGE','72281',jdecode('Trauma'),jdecode(''),'/15603/72281.html','true',[],'']
	],''],
	['PAGE','15630',jdecode('INTERVIEWS'),jdecode(''),'/15630/index.html','true',[ 
		['PAGE','37581',jdecode('Self-Hypnosis'),jdecode(''),'/15630/37581.html','true',[],''],
		['PAGE','37608',jdecode('Stress'),jdecode(''),'/15630/37608.html','true',[],'']
	],''],
	['PAGE','5902',jdecode('PSYCHOLOGIST'),jdecode(''),'/5902.html','true',[],''],
	['PAGE','95481',jdecode('NEWS'),jdecode(''),'/95481.html','true',[],''],
	['PAGE','15657',jdecode('WISDOM'),jdecode(''),'/15657.html','true',[],''],
	['PAGE','15711',jdecode('WHO+WE+ARE'),jdecode(''),'/15711.html','true',[],''],
	['PAGE','15684',jdecode('CONTACT+US'),jdecode(''),'/15684.html','true',[],''],
	['PAGE','47152',jdecode('EU-DIRECTORY'),jdecode(''),'/47152.html','true',[],''],
	['PAGE','45481',jdecode('LINKS'),jdecode(''),'/45481.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Eatdrink';
theSitetree.paletteFamily='6CAB7D';
theSitetree.keyvisualId='3373';
theSitetree.keyvisualName='kv_3373.jpg';
theSitetree.fontsetId='10621';
theSitetree.graphicsetId='10739';
theSitetree.contentColor='035117';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Eatdrink',
				paletteFamily: 	'6CAB7D',
				keyvisualId: 	'3373',
				keyvisualName: 	'kv_3373.jpg',
				fontsetId: 		'10621',
				graphicsetId: 	'10739',
				contentColor: 	'035117',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'757676',
				e_color: 		'757676',
				f_color: 		'757676',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4519',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4519',
internalId:  '',
customField: '20070526-190437'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '15603',
internalId:  '',
customField: '20070704-190103'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '45481',
internalId:  '',
customField: '20080622-154150'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '39281',
internalId:  '',
customField: '20061030-223452'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '74681',
internalId:  '',
customField: '20070925-142203'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '39308',
internalId:  '',
customField: '20061030-223535'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '39335',
internalId:  '',
customField: '20061220-215551'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '72281',
internalId:  '',
customField: '20070512-142510'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '15630',
internalId:  '',
customField: '20060925-194446'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37581',
internalId:  '',
customField: '20081212-215226'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37608',
internalId:  '',
customField: '20061109-193526'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '15657',
internalId:  '',
customField: '20070511-223855'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5902',
internalId:  '',
customField: '20100718-200028'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '15711',
internalId:  '',
customField: '20090323-201820'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '95481',
internalId:  '',
customField: '20100703-202349'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '15684',
internalId:  '',
customField: '20091220-204859'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '47152',
internalId:  '',
customField: '20071128-213557'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INVQTW';
var companyName   = 'Psychology+Readers';
var htmlTitle	  = 'www.psychologyreaders.co.uk';
var metaKeywords  = 'psychology%2C+psicologi%2C+italiani%2C+londra%2C+articles%2C+readers%2C+articles%2C+psychologist%2Cnews%2C+health%2C+free%2C+relationship%2C+self+help';
var metaContents  = 'psychology%2C+meditation%2C+psicologi%2C+italiani%2C+Londra%2C+child+psychology%2C+medicine%2C+health+news%2C+stress+management%2C+sex+therapy%2C+relaxation+techniques%2C+free+articles%2C+psychology+articles%2C+news';
					                                                                    
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 */					                                                            
