/* [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','2901',jdecode('Inicio'),jdecode(''),'/2901.html','true',[],''],
	['PAGE','2952',jdecode('Servicios'),jdecode(''),'/2952.html','true',[],''],
	['PAGE','2973',jdecode('Contacto'),jdecode(''),'/2973/index.html','true',[ 
		['PAGE','10501',jdecode('Contacto+%28follow+up+page%29'),jdecode(''),'/2973/10501.html','false',[],'']
	],'']];
var siteelementCount=4;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='003333';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='74';
theSitetree.graphicsetId='79';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D0D5DB';
var theTemplate={
				name: 			'Galerie',
				paletteFamily: 	'003333',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'74',
				graphicsetId: 	'79',
				contentColor: 	'000000',
				contentBGColor: 'D0D5DB',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'003333',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20081116-101411'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '2952',
internalId:  '',
customField: '20081116-101922'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '2901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '2973',
internalId:  '',
customField: '20080831-123616'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '2973',
internalId:  'aars20in38tg117e65cef46',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '10501',
internalId:  'aars20in38tg117e65cef46',
customField: 'followUp'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20080204-223206'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'AARS20IN38TG';
var companyName   = 'SERVICIOS+DE+COMUNICACI%C3%93N+ESCRITA+PARA+EMPRESAS++';
var htmlTitle	  = 'Servicios+de+comunicacion+escrita.+Expertos+en+redaccion+de+textos.';
var metaKeywords  = 'Escritura%2C+comunicacion%2C+comunicaci%C3%B3n%2C+escrita%2C+empresa%2C+empresas%2C+expertos%2C+redaccion%2C+redacci%C3%B3n%2C+textos%2C+documentos%2C+correcci%C3%B3n%2C+correccion%2C+edicion%2C+escritores%2C+traduccion%2C+traducci%C3%B3n%2C+ingl%C3%A9s%2C+ingles%2C+espa%C3%B1ol';
var metaContents  = 'Servicios+de+comunicacion+escrita+para+empresas+y+profesionales.+Redaccion+de+todo+tipo+de+escritos+empresariales.+Correccion%2C+revision+y+edicion+de+documentos+de+empresa.+Traduccion+ingles-espa%C3%B1ol.';
					                                                                    
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 */					                                                            
