/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','14101',jdecode('Wheels+of+Chicago'),jdecode(''),'/14101.html','true',[],''],
	['PAGE','14122',jdecode('Reparaci%C3%B3n+auto'),jdecode(''),'/14122.html','true',[],'']];
var siteelementCount=3;
theSitetree.topTemplateName='Amaze';
theSitetree.paletteFamily='0A2447';
theSitetree.keyvisualId='2436';
theSitetree.keyvisualName='zeitplanung.jpg';
theSitetree.fontsetId='399';
theSitetree.graphicsetId='444';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='0A2447';
var theTemplate={
				name: 			'Amaze',
				paletteFamily: 	'0A2447',
				keyvisualId: 	'2436',
				keyvisualName: 	'zeitplanung.jpg',
				fontsetId: 		'399',
				graphicsetId: 	'444',
				contentColor: 	'FFFFFF',
				contentBGColor: '0A2447',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				a_color: 		'0A2447',
				b_color: 		'081B35',
				c_color: 		'3268E2',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
var canonHostname = 'wsc01.cm4all.affinity.com';
var accountId     = 'AAFF10INL0TS';
var companyName   = 'WHEELS+OF+CHICAGO+';
var htmlTitle	  = 'AUTOS+EN+CHICAGO%21+LOS+MEJORES+CARROS+A+PRESCIOS+SUPER+BARATOS%21';
var metaKeywords  = 'compra%2Cnuevos%2Cusados%2Cvehiculos%2Cventa%2Cauto%2Cautos%2Cchicago%2Cdealership%2Cfinanciamiento%2Ccompras%2Cbajos%2Cmotores%2Cprecios%2Cs%C3%BAbete%2Cmovimiento%2CIllinois%2CAcura%2C+Alfa+Romeo%2C+AM+General%2C+Aston+Martin%2C+Audi%2C+Bentley%2C+BMW%2C+Buick%2C+Cadillac%2C+Chevrolet%2C+Chevy%2C+Chrysler%2C+Daewoo%2C+Daihatsu%2C+Classic+Cars%2C+Dodge%2C+Eagle%2C+Ferrari%2C+Ford%2C+Geo%2C+car%2C+trucks%2C+limousine%2C+van%2C+mini+van%2C+coupe%2C+compact%2C+motorcycle%2C+General+Motors%2C+GMC%2C+Honda%2C+HUMMER%2C+Hyundai%2C+Infiniti%2C+Isuzu%2C+Jaguar%2C+Jeep%2C+Kia%2C+Lamborghini%2C+Land+Rover%2C+Lexus%2C+Lincoln%2C+Lotus%2C+Maserati%2C+Maybach%2C+Mazda%2C+Mercedes-Benz%2C+Mercury%2C+Merkur%2C+MINI%2C+Mitsubishi%2C+Nissan%2C+Oldsmobile%2C+Panoz%2C+Peugeot%2C+Plymouth%2C+Pontiac%2C+Porsche%2C+Rolls-Royce%2C+Saab%2C+Saleen%2C+Saturn%2C+Scion%2C+Sterling%2C+Subaru%2C+Suzuki%2C+Toyota%2C+Volkswagen%2C+Volvo%2C+Yugo%2C+Illinois%2C+Indiana%2C+Wisconsin';
var metaContents  = 'Ayuda+para+conseguir+un+buen+auto+a+un+bajo+precio+-+Compra+de+autos+usados+en+Chicago%2C+LOCALIZADO+EN+CHICAGO+IL+INFORMADOLES+DE+CARROS+NUEVOS+Y+USADOS%2C+Illinois+Latino+sirve+a+la+comunidad+latina+en+Chicago%2C+Auto+Sales+Directory+-+Car+Dealerships%2C+Auto+Dealerships%2C+Cars%2C+Trucks%2C+Vans%2C+SERVICIOS%2C+PARTES%2C+HORARIOS%2C+DIRECTIONES%2C+Y+MAS';
					                                                                    
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 */					                                                            
