/* [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','24501',jdecode('English'),jdecode(''),'/24501.html','true',[],''],
	['PAGE','1508',jdecode('Fran%C3%A7ais'),jdecode(''),'/1508.html','true',[],'']];
var siteelementCount=2;
theSitetree.topTemplateName='Eatdrink';
theSitetree.paletteFamily='C63C41';
theSitetree.keyvisualId='3355';
theSitetree.keyvisualName='kv_3355.jpg';
theSitetree.fontsetId='10425';
theSitetree.graphicsetId='10736';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Eatdrink',
				paletteFamily: 	'C63C41',
				keyvisualId: 	'3355',
				keyvisualName: 	'kv_3355.jpg',
				fontsetId: 		'10425',
				graphicsetId: 	'10736',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'4E1416',
				e_color: 		'4E1416',
				f_color: 		'4E1416',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '1508',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '1508',
internalId:  '',
customField: '20110203-193033'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '24501',
internalId:  '',
customField: '20101031-073614'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '1508',
internalId:  '1254937',
customField: '1501'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010IN2AZ2';
var companyName   = 'VIN+de+MOURVIELS';
var htmlTitle	  = 'Vin%2C+wine%2C+wijn%2C+wein';
var metaKeywords  = 'vin%2Cvin+france%2Cpas+comme+les+autres%2Cmust%2Ccabardes%2Clanguedoc%2Csud+de+france%2C+south+of+france%2Cunique%2Coriginal%2Cdifferent%2Cwine%2Cwein%2Cvino%2Cfrance%2Caoc%2Cvdp%2Cvdt%2Ctable+vignoble%2Chistoire%2Cvinification%2Coenologie%2Cviticulture%2Csoleil%2Cbouteille%2Crouge%2Cblanc%2Crose%2Carome%2Cparfum%2Cstructure%2Cbouche%2Cnez%2Cbarriques%2Cfuts%2Cchene%2Cfruite%2Cfrancais%2Clitre%2Ccentilitre%2Cmillilitre%2Ceraflage%2Cqualite%2Ctop%2Cmeilleur%2Cexception%2Cmedaille%2Cprix%2Cor%2Cargent%2Cbronze%2Camour%2Cplaisir%2Cdetente%2Cfete%2Crepas%2Caccord%2Cmets%2Cboisson%2Cetiquette%2Cbeaute%2Cbeau%2Coriginal%2Csenteur%2Cfamille%2Camis%2Crecevoir%2Ccadeau%2Csatisfaction%2Cart%2Csensuel%2Cdoux%2Cpuissant%2Cfruits%2Cgras%2Cepices%2Ccorps%2Clevures%2Cfermentation%2Calcoolique%2Cmalolactique%2Csucre%2Cdegre%2Cconservation%2Celevage%2Cinertage%2Cembouteillage%2Cvieillissement%2Cclassement%2Csensuel%2Cpremier%2Cmeilleur%2Crecommand%C3%A9%2Cm%C3%A9daill%C3%A9%2Creconnu%2Cconcours%2Csommelier%2Cmourviels%2Cch%C3%A2teau%2Cdomaine%2Cgrandcru%2Ccru%2Cexception%2Cexceptionnel%2Crouge%2Cblanc%2Cros%C3%A9%2Cr%C3%A9gal%2Cwine%2Cwijn%2Cwein%2Cvigneron%2C';
var metaContents  = 'presentation+du+vin+de+Mourviels%2Cun+vin+de+france+pas+comme+les+autres%2C+compagnon+indispensable+favorisant+la+convivialite+de+vos+aperitifs%2C+repas%2C+receptions%2C+fetes+et+autres+reunions...';
					                                                                    
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 */					                                                            

