/* [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','501',jdecode('Quien+soy'),jdecode(''),'/501.html','true',[],''],
	['PAGE','5001',jdecode('Que+es+una+reuni%C3%B3n'),jdecode(''),'/5001.html','true',[],''],
	['PAGE','5022',jdecode('Organiza+una'),jdecode(''),'/5022/index.html','true',[ 
		['PAGE','10901',jdecode('Quiero+hacer+una+reuni%C3%B3n+%28follow+up+page%29'),jdecode(''),'/5022/10901.html','false',[],'']
	],'']];
var siteelementCount=4;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='938';
theSitetree.keyvisualName='seerose.jpg';
theSitetree.fontsetId='166';
theSitetree.graphicsetId='197';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'NewYork',
				paletteFamily: 	'660000',
				keyvisualId: 	'938',
				keyvisualName: 	'seerose.jpg',
				fontsetId: 		'166',
				graphicsetId: 	'197',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'660000',
				c_color: 		'000000',
				d_color: 		'990000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20090305-214050'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20090305-214150'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20090305-214629'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '5022',
internalId:  'aars20invb9r11f1f19a98d',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '10901',
internalId:  'aars20invb9r11f1f19a98d',
customField: 'followUp'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20090128-221629'
};
var canonHostname = 'wsc01a.arsys.es';
var accountId     = 'AARS20INVB9R';
var companyName   = 'TU+ASESORA';
var htmlTitle	  = 'REUNIONES+DIVERTIDAS...QUE+ESPERAS%3F';
var metaKeywords  = 'Tuppersex%2C+Tappersex%2C+maleta+er%C3%B3tica%2C+Tupper%2C+sex%2C+taper%2C+tapper%2C+erotismo%2C+reuniones%2C+divertidas%2C+juguetes+er%C3%B3ticos%2C+lencer%C3%ADa%2C+Madrid%2C+vibradores%2C+anillos%2C+aceites%2C+masajes%2C+solo+mujeres%2C+asesora+Tupper';
var metaContents  = 'Me+dedico+a+organizar+reuniones+TUPPER+SEX+donde+nos+divertiremos+un+buen+rato%2C+aprendiendo%2C+probando%2C+tocando+y+oliendo+todos+los+productos+que+llevo+en+mi+maleta+er%C3%B3tica....contacta+conmigo+la+diversi%C3%B3n+est%C3%A1+garantizada.';
					                                                                    
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 */					                                                            
