/* [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','601',jdecode('Inicio'),jdecode(''),'/601.html','true',[],''],
	['PAGE','652',jdecode('Contacto'),jdecode(''),'/652.html','true',[],''],
	['PAGE','673',jdecode('Titiriteros'),jdecode(''),'/673.html','true',[],''],
	['PAGE','7901',jdecode('Turismo'),jdecode(''),'/7901.html','true',[],''],
	['PAGE','7922',jdecode('Municipio'),jdecode(''),'/7922.html','true',[],''],
	['PAGE','9806',jdecode('Libro+de+Visitas'),jdecode(''),'/9806/index.html','true',[ 
		['PAGE','9801',jdecode('Lea+el+Libro+de+Visitas'),jdecode(''),'/9806/9801.html','true',[],'']
	],''],
	['PAGE','10201',jdecode('Amigos'),jdecode(''),'/10201.html','true',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Sonnemond';
theSitetree.paletteFamily='F9FBBF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10759';
theSitetree.graphicsetId='10816';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F9FBBF';
var theTemplate={
				name: 			'Sonnemond',
				paletteFamily: 	'F9FBBF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10759',
				graphicsetId: 	'10816',
				contentColor: 	'000000',
				contentBGColor: 'F9FBBF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5C5898',
				e_color: 		'ED4747',
				f_color: 		'437D3B',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1008']={
webappId:    '1008',
documentId:  '652',
internalId:  '4374992',
customField: 'en:US:'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '9806',
internalId:  '9806aendu0in2moj',
customField: 'action=form&icq=false'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '9801',
internalId:  '9806aendu0in2moj',
customField: 'action=list'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2MOJ';
var companyName   = 'V+Festival+de+Titeres+en+San+Miguel+de+Allende';
var htmlTitle	  = '5to.+Festival+de+Titeres+en+San+Miguel+de+Allende';
var metaKeywords  = 'Titeres%2C+T%C3%ADteres%2C+titiriteros%2C+Festival%2C+Vacaciones%2C+Semana+Santa%2C+Marionetas%2C+Pascua%2C+Espectaculos+Infantiles%2C+Atotonilco%2C+Teatro%2C+ni%C3%B1os%2C+familia%2C+Exposicion%2C+Athanor%2C+Cornisa20%2C+La+Salamandra';
var metaContents  = 'Espect%C3%A1culos+del+Quinto+Festival+de+Titeres+en+San+Miguel+de+Allende+Guanajuato';
					                                                                    
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 */					                                                            
