/* [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('Quienes+somos'),jdecode(''),'/301.html','true',[],''],
	['PAGE','352',jdecode('D%C3%B3nde+encontrarnos'),jdecode(''),'/352.html','true',[],'']];
var siteelementCount=2;
theSitetree.topTemplateName='Sedan';
theSitetree.paletteFamily='9C5852';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10747';
theSitetree.graphicsetId='11104';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Sedan',
				paletteFamily: 	'9C5852',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10747',
				graphicsetId: 	'11104',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'9C5852',
				e_color: 		'9C5852',
				f_color: 		'9C5852',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20090914-191519'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20090914-191457'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INZDOM';
var companyName   = 'Cerrajeros+-+Urgencias+24h';
var htmlTitle	  = 'Cerrajeros+-+Urgencias+24h+-+Electricistas+%2C+Fontaneria+%2C+Calefaccion+%2C+Gas+y+otros+servicios';
var metaKeywords  = '%C3%81lava+%E2%80%93+Albacete+%E2%80%93Alicante+%E2%80%93+Almer%C3%ADa+%E2%80%93+%C3%81vila+%E2%80%93Badajoz+%E2%80%93+Baleares+%E2%80%93+Barcelona+%E2%80%93+Burgos+%E2%80%93+C%C3%A1ceres+%E2%80%93+C%C3%A1diz+%E2%80%93+Castell%C3%B3n+%E2%80%93+Ciudad+Real+%E2%80%93+C%C3%B3rdoba+%E2%80%93+La+Coru%C3%B1a+%E2%80%93+Cuenca+%E2%80%93+Gerona+%E2%80%93+Granada+%E2%80%93+Guadalajara+%E2%80%93+Guip%C3%BAzcoa+%E2%80%93+Huelva+%E2%80%93+Huesca+%E2%80%93+Ja%C3%A9n+%E2%80%93+Le%C3%B3n+%E2%80%93+L%C3%A9rida+%E2%80%93+La+Rioja+%E2%80%93+Lugo+%E2%80%93+Madrid+%E2%80%93+M%C3%A1laga+%E2%80%93+Murcia+%E2%80%93+Navarra+%E2%80%93+Orense+%E2%80%93+Asturias+%E2%80%93+Palencia+%E2%80%93+Las+Palmas+%E2%80%93+Pontevedra+%E2%80%93+Salamanca+%E2%80%93+S.C.+Tenerife+%E2%80%93+Cantabria+%E2%80%93+Segovia+%E2%80%93+Sevilla+%E2%80%93+Soria+%E2%80%93+Tarragona++-+Teruel+%E2%80%93+Toledo+%E2%80%93+Valencia+%E2%80%93+Valladolid+%E2%80%93+Vizcaya+%E2%80%93+Zamora+%E2%80%93+Zaragoza+%E2%80%93+Ceuta+%E2%80%93+Melilla++Mantenimiento+%E2%80%93+Cerrajeros+%E2%80%93+Fontaneros+%E2%80%93+Electricistas+%E2%80%93+Desatrancos+%E2%80%93+Aire+acondicionado+%E2%80%93+Puertas+mec%C3%A1nicas+%E2%80%93+Automatismos+%E2%80%93+Antenas+%E2%80%93+Rejas+y+vallas+%E2%80%93+Fabricaci%C3%B3n+%E2%80%93+Electrodom%C3%A9sticos+%E2%80%93+Exportaci%C3%B3n+%E2%80%93+Importaci%C3%B3n+%E2%80%93+Seguros+hogar+%E2%80%93+Seguros+veh%C3%ADculos+%E2%80%93+Viajes+%E2%80%93+Otros+servicios';
var metaContents  = 'Ofrecemos+un+servicio+de+urgencia+24h+o+concertado+a+nuestros+clientes+de+manera+rapida+y+eficaz%2C+todo+tipo+de+puertas+y+cerraduras%2C+mecanicas+%2C+motorizadas.+Contacte+con+nosotros+y+solicite+su+presupuesto+sin+compromiso.';
					                                                                    
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 */					                                                            

