/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('Chi+siamo+%2F+Obiettivi'),jdecode(''),'/552.html','true',[],''],
	['PAGE','594',jdecode('Download'),jdecode(''),'/594/index.html','true',[ 
		['PAGE','9001',jdecode('Le+nostre+analisi'),jdecode(''),'/594/9001.html','true',[],''],
		['PAGE','9022',jdecode('Documenti+diversi'),jdecode(''),'/594/9022.html','true',[],''],
		['PAGE','9401',jdecode('Rassegna+stampa'),jdecode(''),'/594/9401.html','true',[],'']
	],''],
	['PAGE','10338',jdecode('Guestbook'),jdecode(''),'/10338/index.html','true',[ 
		['PAGE','10333',jdecode('Messaggi'),jdecode(''),'/10338/10333.html','true',[],'']
	],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Filofax';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='509';
theSitetree.keyvisualName='motorradtraum.jpg';
theSitetree.fontsetId='61';
theSitetree.graphicsetId='62';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Filofax',
				paletteFamily: 	'003366',
				keyvisualId: 	'509',
				keyvisualName: 	'motorradtraum.jpg',
				fontsetId: 		'61',
				graphicsetId: 	'62',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'003366',
				b_color: 		'66CCFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1002']={
webappId:    '1002',
documentId:  '10338',
internalId:  '10338abw0x0ine07x',
customField: 'action=form&icq=false'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '10333',
internalId:  '10338abw0x0ine07x',
customField: 'action=list'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INE07X';
var companyName   = 'Gruppo+del+NO+del+Consiglio+Comunale+di+Rivera';
var htmlTitle	  = 'Gruppo+del+NO+del+Consiglio+Comunale+di+Rivera';
var metaKeywords  = 'Poligono+di+tiro+Monte+Ceneri+zona+Poreggia+stand+di+tiro+regionale+arma+ordinanza+tiro+obbligatorio+tiro+300+metri+Rivera';
var metaContents  = 'Il+Gruppo+del+NO+del+Consiglio+Comunale+di+Rivera+%C3%A9+contrario+alledificazione+di+un+nuovo+poligono+di+tiro+a+300+metri+sul+Monte+Ceneri%2C+in+zona+Poreggia';
					                                                                    
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 */					                                                            
