/* [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('Home'),jdecode(''),'/701.html','true',[],''],
	['PAGE','773',jdecode('Vinhos+Portugu%C3%AAs+'),jdecode(''),'/773/index.html','true',[ 
		['PAGE','857',jdecode('Qt%C2%AA+Murta+Branco'),jdecode(''),'/773/857.html','true',[],''],
		['PAGE','17001',jdecode('Qt%C2%AA+Murta+Classico'),jdecode(''),'/773/17001.html','true',[],''],
		['PAGE','17022',jdecode('Qt%C2%AA+Murta+Esp+Res+Bruto'),jdecode(''),'/773/17022.html','true',[],''],
		['PAGE','17043',jdecode('Qt%C2%AA+Murta+Esp+Rose'),jdecode(''),'/773/17043.html','true',[],''],
		['PAGE','17064',jdecode('Qt%C2%AA+Murta+Tinto+'),jdecode(''),'/773/17064.html','true',[],''],
		['PAGE','17085',jdecode('Qt%C2%AA+Murta+Rose'),jdecode(''),'/773/17085.html','true',[],''],
		['PAGE','17106',jdecode('Vale+da+Murta+Branco'),jdecode(''),'/773/17106.html','true',[],''],
		['PAGE','17127',jdecode('Vale+da+Murta+Tinto'),jdecode(''),'/773/17127.html','true',[],''],
		['PAGE','17148',jdecode('Myrtus+Reserva+Branco'),jdecode(''),'/773/17148.html','true',[],'']
	],''],
	['PAGE','30722',jdecode('Wines+English'),jdecode(''),'/30722/index.html','true',[ 
		['PAGE','32301',jdecode('Qt%C2%AA+Murta+White+Inox'),jdecode(''),'/30722/32301.html','true',[],''],
		['PAGE','32322',jdecode('Qt%C2%AA+Murta+White+Classico'),jdecode(''),'/30722/32322.html','true',[],''],
		['PAGE','32343',jdecode('Qt%C2%AA+Murta+Sparkling+Reserva+Bruto'),jdecode(''),'/30722/32343.html','true',[],''],
		['PAGE','32364',jdecode('Qt%C2%AA+Murta+Sparkling+Rose'),jdecode(''),'/30722/32364.html','true',[],''],
		['PAGE','32385',jdecode('Qt%C2%AA+Murta+Red+'),jdecode(''),'/30722/32385.html','true',[],''],
		['PAGE','32406',jdecode('Qt%C2%AA+Murta+Rose'),jdecode(''),'/30722/32406.html','true',[],''],
		['PAGE','32427',jdecode('Vale+da+Murta+White'),jdecode(''),'/30722/32427.html','true',[],''],
		['PAGE','32448',jdecode('Vale+da+Murta+Red'),jdecode(''),'/30722/32448.html','true',[],''],
		['PAGE','32469',jdecode('Myrtus+Reserva+White'),jdecode(''),'/30722/32469.html','true',[],'']
	],''],
	['PAGE','836',jdecode('Pr%C3%A9mios+e+Imprensa'),jdecode(''),'/836.html','true',[],''],
	['PAGE','28001',jdecode('Eventos'),jdecode(''),'/28001.html','true',[],''],
	['PAGE','815',jdecode('Enoturismo'),jdecode(''),'/815.html','true',[],''],
	['PAGE','26901',jdecode('Galeria+de+fotos'),jdecode(''),'/26901.html','true',[],''],
	['PAGE','794',jdecode('Contactos'),jdecode(''),'/794.html','true',[],''],
	['PAGE','878',jdecode('Onde+estamos'),jdecode(''),'/878.html','true',[],''],
	['PAGE','45001',jdecode('Loja+on-line'),jdecode(''),'/45001.html','true',[],''],
	['PAGE','47101',jdecode('Curiosidades'),jdecode(''),'/47101.html','true',[],'']];
var siteelementCount=29;
theSitetree.topTemplateName='Neon';
theSitetree.paletteFamily='6699CC';
theSitetree.keyvisualId='842';
theSitetree.keyvisualName='weinglaeser.jpg';
theSitetree.fontsetId='160';
theSitetree.graphicsetId='186';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Neon',
				paletteFamily: 	'6699CC',
				keyvisualId: 	'842',
				keyvisualName: 	'weinglaeser.jpg',
				fontsetId: 		'160',
				graphicsetId: 	'186',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'6699CC',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20110505-164509'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32322',
internalId:  '',
customField: '20110215-153510'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20110214-133355'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20110429-120057'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20110322-170359'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20110412-172510'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20111013-164742'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20110412-153227'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20111004-160540'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20110412-153916'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17001',
internalId:  '',
customField: '20110215-183546'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17127',
internalId:  '',
customField: '20110215-184759'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17148',
internalId:  '',
customField: '20110215-184850'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17043',
internalId:  '',
customField: '20110215-184343'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17022',
internalId:  '',
customField: '20110215-183759'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17064',
internalId:  '',
customField: '20110412-153347'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17085',
internalId:  '',
customField: '20110215-184413'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17106',
internalId:  '',
customField: '20110321-182544'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '26901',
internalId:  '12dcda49ab5',
customField: 'g.15n6q1lg1.1vt90vud3f.0'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '26901',
internalId:  '',
customField: '20110322-181550'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '30722',
internalId:  '',
customField: '20110412-182810'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32343',
internalId:  '',
customField: '20110322-170012'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32364',
internalId:  '',
customField: '20110412-160045'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32385',
internalId:  '',
customField: '20110215-155249'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32406',
internalId:  '',
customField: '20110412-160119'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32427',
internalId:  '',
customField: '20110215-163903'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32448',
internalId:  '',
customField: '20110215-164906'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '32469',
internalId:  '',
customField: '20110215-185815'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '47101',
internalId:  '',
customField: '20111013-164914'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '45001',
internalId:  '',
customField: '20111019-160246'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INZTCI';
var companyName   = 'Quinta+da+Murta';
var htmlTitle	  = 'www.quintadamurta.pt';
var metaKeywords  = '';
var metaContents  = '';
					                                                                    
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 */					                                                            

