/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','67301',jdecode('Mappa+di+Accesso'),jdecode(''),'/67301.html','true',[],''],
	['PAGE','66701',jdecode('FORUM'),jdecode(''),'/66701.html','true',[],''],
	['PAGE','415',jdecode('Chi+siamo'),jdecode(''),'/415.html','true',[],''],
	['PAGE','14001',jdecode('Notizie'),jdecode(''),'/14001.html','true',[],''],
	['PAGE','13601',jdecode('Contatto%2FGare'),jdecode(''),'/13601.html','true',[],''],
	['PAGE','32401',jdecode('Spazio+Comune'),jdecode(''),'/32401.html','true',[],''],
	['PAGE','14022',jdecode('Album+fotografici'),jdecode(''),'/14022/index.html','true',[ 
		['PAGE','14043',jdecode('Spazio+staff'),jdecode(''),'/14022/14043.html','true',[],''],
		['PAGE','80101',jdecode('pagina+new'),jdecode(''),'/14022/80101.html','true',[],''],
		['PAGE','80901',jdecode('News'),jdecode(''),'/14022/80901.html','true',[],'']
	],''],
	['PAGE','70301',jdecode('Blog'),jdecode(''),'/70301/index.html','true',[ 
		['PAGE','70901',jdecode('NelForum'),jdecode(''),'/70301/70901.html','true',[],''],
		['PAGE','73801',jdecode('Priv%C3%A8'),jdecode(''),'/70301/73801.html','true',[],'']
	],''],
	['PAGE','74801',jdecode('MotoPriv%C3%A8'),jdecode(''),'/74801/index.html','true',[ 
		['PAGE','93801',jdecode('locandina'),jdecode(''),'/74801/93801.html','true',[],''],
		['PAGE','93822',jdecode('Locandina'),jdecode(''),'/74801/93822.html','true',[],''],
		['PAGE','93843',jdecode('Locandina2'),jdecode(''),'/74801/93843.html','true',[],''],
		['PAGE','100801',jdecode('locandina3'),jdecode(''),'/74801/100801.html','true',[],''],
		['PAGE','100822',jdecode('locandina4'),jdecode(''),'/74801/100822.html','true',[],'']
	],''],
	['PAGE','103501',jdecode('privato'),jdecode(''),'/103501/index.html','true',[ 
		['PAGE','114001',jdecode('GARE+2011'),jdecode(''),'/103501/114001.html','true',[],'']
	],'']];
var siteelementCount=22;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='1256';
theSitetree.keyvisualName='teltastatur.jpg';
theSitetree.fontsetId='192';
theSitetree.graphicsetId='233';
theSitetree.contentColor='006633';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Profile',
				paletteFamily: 	'990000',
				keyvisualId: 	'1256',
				keyvisualName: 	'teltastatur.jpg',
				fontsetId: 		'192',
				graphicsetId: 	'233',
				contentColor: 	'006633',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'990000',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20111011-182421'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20120113-185151'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '13601',
internalId:  '3984609',
customField: 'it:IT:'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20111025-190508'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '415',
internalId:  '',
customField: '20090311-184809'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20111024-184421'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '14043',
internalId:  '',
customField: '20101128-183258'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20110510-184001'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '14043',
internalId:  '4188479',
customField: 'it:IT:'
};
webappMappings['2001']={
webappId:    '2001',
documentId:  '67301',
internalId:  'location',
customField: 'language:it;country:IT;isIncluded:false;'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '93801',
internalId:  '',
customField: '20110521-184529'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '93843',
internalId:  '',
customField: '20110511-174930'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '80101',
internalId:  '',
customField: '20110510-185030'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '80901',
internalId:  '',
customField: '20110511-173235'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '103501',
internalId:  '1310fe82f0b',
customField: 'g.1647ucn4g.2qac6fl5ve.3o'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '70901',
internalId:  '124da41f902',
customField: 'g.14jd3tisi.474l7fcr0q3.1s'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '66701',
internalId:  '',
customField: '20110827-193030'
};
webappMappings['1003']={
webappId:    '1003',
documentId:  '66701',
internalId:  'aam010inz1c3124da1cd105',
customField: 'it:IT:'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '67301',
internalId:  '',
customField: '20100131-175112'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '301',
internalId:  '6253100',
customField: '1501'
};
webappMappings['3030']={
webappId:    '3030',
documentId:  '70301',
internalId:  '70301',
customField: 'language:it;country:IT;'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '70301',
internalId:  '',
customField: '20100427-185106'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '70901',
internalId:  '',
customField: '20091129-125325'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '73801',
internalId:  '',
customField: '20091129-132428'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '73801',
internalId:  '12531a6087c',
customField: 'g.14koq8bap.10vfedh4hf.1s'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '74801',
internalId:  '12531b9e5ea',
customField: 'g.14korhfuu.h95fejvuh.1s'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '74801',
internalId:  '',
customField: '20110521-184204'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '93822',
internalId:  '',
customField: '20110511-173829'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '100801',
internalId:  '',
customField: '20110622-180049'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '100822',
internalId:  '',
customField: '20110622-180244'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '103501',
internalId:  '',
customField: '20110709-192640'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '114001',
internalId:  '',
customField: '20120113-181848'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INZ1C3';
var companyName   = 'MOTOSTAFFETTEBRIANZA';
var htmlTitle	  = 'motostaffette+brianza';
var metaKeywords  = 'motostaffette%2Cgare+ciclistiche%2Cciclismo%2Cscorta+tecnica%2Cradio+corsa%2Cciclismo%2Cmoto+club%2Cgiro+in+giro.';
var metaContents  = 'ciclismo%2Cgare+ciclistiche%2Cmotostaffette%2Cscorta+tecnica%2Cfci%2Cendas%2Cudace%2Cradio+corsa%2Cmoto+club%2Cbrianza';
					                                                                    
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 */					                                                            

