/* [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('Empresa'),jdecode(''),'/301.html','true',[],''],
	['PAGE','5543',jdecode('Productos'),jdecode(''),'/5543/index.html','true',[ 
		['PAGE','40701',jdecode('Escaleras'),jdecode(''),'/5543/40701.html','true',[],''],
		['PAGE','21101',jdecode('Barandillas'),jdecode(''),'/5543/21101.html','true',[],''],
		['PAGE','5564',jdecode('Puertas'),jdecode(''),'/5543/5564.html','true',[],''],
		['PAGE','40722',jdecode('Rejas'),jdecode(''),'/5543/40722.html','true',[],''],
		['PAGE','40743',jdecode('Ventanas'),jdecode(''),'/5543/40743.html','true',[],''],
		['PAGE','40764',jdecode('R%C3%B3tulos+y+varios'),jdecode(''),'/5543/40764.html','true',[],'']
	],''],
	['PAGE','5648',jdecode('Contacto'),jdecode(''),'/5648.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'5E5E5E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20091215-125510'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '40701',
internalId:  '',
customField: '20100114-174541'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5543',
internalId:  '',
customField: '20091216-084243'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5648',
internalId:  '',
customField: '20091216-133834'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '40743',
internalId:  '',
customField: '20091217-131739'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20100114-173306'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5564',
internalId:  '',
customField: '20100114-175843'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '40722',
internalId:  '',
customField: '20100115-132223'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '40764',
internalId:  '',
customField: '20091217-162609'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'AARS20INL6KC';
var companyName   = 'MET%C3%81LICAS+MARTINCA';
var htmlTitle	  = 'Met%C3%A1licas+Martinca';
var metaKeywords  = '';
var metaContents  = '';
					                                                                    
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 */					                                                            
