/* [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('Inicio'),jdecode(''),'/701.html','true',[],''],
	['PAGE','773',jdecode('Productos+y+Servicios'),jdecode(''),'/773.html','true',[],''],
	['PAGE','5001',jdecode('Promociones+y+Obras'),jdecode(''),'/5001/index.html','true',[ 
		['PAGE','29601',jdecode('Residencial+MiraSierra'),jdecode(''),'/5001/29601.html','true',[],''],
		['PAGE','35001',jdecode('Obra+a+la+carta'),jdecode(''),'/5001/35001.html','true',[],'']
	],''],
	['PAGE','27101',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/27101.html','true',[],'']];
var siteelementCount=6;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='006666';
theSitetree.keyvisualId='1002';
theSitetree.keyvisualName='maurer.jpg';
theSitetree.fontsetId='168';
theSitetree.graphicsetId='198';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'NewYork',
				paletteFamily: 	'006666',
				keyvisualId: 	'1002',
				keyvisualName: 	'maurer.jpg',
				fontsetId: 		'168',
				graphicsetId: 	'198',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'003333',
				b_color: 		'006666',
				c_color: 		'000000',
				d_color: 		'009999',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20090426-010514'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20090421-200631'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20090414-002333'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '27101',
internalId:  '',
customField: '20090425-234735'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '29601',
internalId:  '',
customField: '20090624-130857'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20090624-145320'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'AARS20INVPVS';
var companyName   = 'Construcciones+Hnos.+Navarro';
var htmlTitle	  = 'Construcciones+Hnos.+Navarro+-+Chiva';
var metaKeywords  = 'construccionesnavarro.es%2C+construcciones%2C+hermanos%2C+navarro%2C+chiva%2C+valencia%2C+rehabilitaciones%2C+venta%2C+viviendas%2C+pisos%2C+construccion%2C+rehabilitacion%2C+vivienda%2C+promocion%2C+inmobiliaria%2C+garajes%2C+alquiler%2C+alquiler+con+opcion+de+compra%2C+hogar%2C+calidad%2C+confianza%2C+alquiler+joven%2C+ayudas+alquiler%2C+mirasierra%2C+construccionesnavarro.es+construcciones+hermanos+navarro+chiva+valencia+rehabilitaciones+venta+viviendas+pisos+construccion+rehabilitacion+vivienda+promocion+inmobiliaria+garajes+alquiler+alquiler+con+opcion+de+compra+hogar+calidad+confianza+alquiler+joven+ayudas+alquiler+mirasierra';
var metaContents  = 'Rehabilitaciones+y+Construcciones+Hermanos+Navarro+de+Chiva+%28Valencia%29%2C+m%C3%A1s+de+40+a%C3%B1os+dedicada+a+la+construccion%2C+rehabilitacion%2C+promoci%C3%B3n+y+venta+de+viviendas.';
					                                                                    
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 */					                                                            
