/* [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('Inici'),jdecode(''),'/701.html','true',[],''],
	['PAGE','752',jdecode('Qui+som%3F'),jdecode(''),'/752.html','true',[],''],
	['PAGE','773',jdecode('Assemblees'),jdecode(''),'/773.html','true',[],''],
	['PAGE','794',jdecode('Premsa'),jdecode(''),'/794.html','true',[],''],
	['PAGE','815',jdecode('Contacta+i+enlla%C3%A7os'),jdecode(''),'/815/index.html','true',[ 
		['PAGE','5701',jdecode('Contacta+%28follow+up+page%29'),jdecode(''),'/815/5701.html','false',[],'']
	],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Konzept';
theSitetree.paletteFamily='FD9601';
theSitetree.keyvisualId='567';
theSitetree.keyvisualName='garten.jpg';
theSitetree.fontsetId='118';
theSitetree.graphicsetId='138';
theSitetree.contentColor='006633';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Konzept',
				paletteFamily: 	'FD9601',
				keyvisualId: 	'567',
				keyvisualName: 	'garten.jpg',
				fontsetId: 		'118',
				graphicsetId: 	'138',
				contentColor: 	'006633',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FD9601',
				b_color: 		'EEE2A0',
				c_color: 		'000000',
				d_color: 		'374B09',
				e_color: 		'C5B39F',
				f_color: 		'D78B1D',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20080327-231523'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20080319-162323'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20080327-231434'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20080319-193351'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '815',
internalId:  'aars20in3no4116db91afa3',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '5701',
internalId:  'aars20in3no4116db91afa3',
customField: 'followUp'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20080318-210902'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20071215-031106'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'AARS20IN3NO4';
var companyName   = 'ELS+VERDS+%28vo%29';
var htmlTitle	  = 'ELS+VERDS';
var metaKeywords  = 'Verds+Verdes+Ecologistes+Ecologistas';
var metaContents  = 'P%C3%A0gina+web+del+partit+politic+Els+Verds';
					                                                                    
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 */					                                                            
