/* [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','4520',jdecode('Home'),jdecode(''),'/4520/index.html','true',[ 
		['PAGE','4577',jdecode('Localizacion'),jdecode(''),'/4520/4577.html','true',[],''],
		['PAGE','4604',jdecode('Master+Plan'),jdecode(''),'/4520/4604.html','true',[],''],
		['PAGE','4631',jdecode('Golf'),jdecode(''),'/4520/4631.html','true',[],''],
		['PAGE','4658',jdecode('Hoteles'),jdecode(''),'/4520/4658.html','true',[],''],
		['PAGE','4712',jdecode('Infraestructura'),jdecode(''),'/4520/4712.html','true',[],''],
		['PAGE','4739',jdecode('Villas+Residenciales'),jdecode(''),'/4520/4739.html','true',[],''],
		['PAGE','5903',jdecode('Apartamentos'),jdecode(''),'/4520/5903.html','true',[],''],
		['PAGE','7503',jdecode('Contacto'),jdecode(''),'/4520/7503.html','true',[],'']
	],''],
	['PAGE','7802',jdecode('Libro+de+visitas'),jdecode(''),'/7802/index.html','true',[ 
		['PAGE','7803',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/7802/7803.html','true',[],'']
	],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='6683B6';
theSitetree.keyvisualId='2465';
theSitetree.keyvisualName='restaurant.jpg';
theSitetree.fontsetId='403';
theSitetree.graphicsetId='461';
theSitetree.contentColor='2F325F';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Collage',
				paletteFamily: 	'6683B6',
				keyvisualId: 	'2465',
				keyvisualName: 	'restaurant.jpg',
				fontsetId: 		'403',
				graphicsetId: 	'461',
				contentColor: 	'2F325F',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFFFFF',
				b_color: 		'6683B6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4520',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '7802',
internalId:  '7802aam010in264i',
customField: 'action=form&icq=false'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '7803',
internalId:  '7802aam010in264i',
customField: 'action=list'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '4520',
internalId:  '1278283',
customField: '1501'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4520',
internalId:  '',
customField: '20071019-120653'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '7503',
internalId:  '',
customField: '20080423-084436'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4604',
internalId:  '',
customField: '20050914-103719'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4631',
internalId:  '',
customField: '20071019-120302'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4658',
internalId:  '',
customField: '20071019-120455'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4712',
internalId:  '',
customField: '20050914-110421'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4739',
internalId:  '',
customField: '20071019-120614'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5903',
internalId:  '',
customField: '20050914-113222'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '7802',
internalId:  '',
customField: '20050914-120750'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4577',
internalId:  '',
customField: '20040507-013205'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '7803',
internalId:  '',
customField: '20050914-120750'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010IN264I';
var companyName   = 'Punta+Blanca+Golf+%26+Resort';
var htmlTitle	  = 'Punta+Blanca+Golf+++Beach+Resort+Bavaro+-+Punta+Cana';
var metaKeywords  = 'Caribe+Santo+Domingo+Republica+Dominicana+Punta+Cana+Bavaro+Golf+Inversion+Villa+playa+apartamentos+residencial+Nick+Price+Macao+Cap+Cana+Roco+Ki';
var metaContents  = 'Villas+y+apartamentos+en+Bavaro%2C+Punta+Cana%2C+Santo+Domingo%2C+Republica+Dominicana.+Campo+de+Golf+y+Playa+de+arena+blanca+y+aguas+cristalinas%2C+';
					                                                                    
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 */					                                                            

