/* [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','4555',jdecode('Home'),jdecode(''),'/4555.html','true',[],''],
	['PAGE','120221',jdecode('Aladdin+Magnifiers'),jdecode(''),'/120221/index.html','true',[ 
		['PAGE','129612',jdecode('Aladdin+Classic'),jdecode(''),'/120221/129612.html','true',[],''],
		['PAGE','129643',jdecode('Aladdin+Sunshine+Pro'),jdecode(''),'/120221/129643.html','true',[],''],
		['PAGE','130332',jdecode('Aladdin+Apex+Basic'),jdecode(''),'/120221/130332.html','true',[],''],
		['PAGE','129674',jdecode('Aladdin+Apex'),jdecode(''),'/120221/129674.html','true',[],''],
		['PAGE','129981',jdecode('Atlas+710'),jdecode(''),'/120221/129981.html','true',[],''],
		['PAGE','129705',jdecode('Aladdin+Genie+Pro'),jdecode(''),'/120221/129705.html','true',[],''],
		['PAGE','129767',jdecode('Vertex'),jdecode(''),'/120221/129767.html','true',[],'']
	],''],
	['PAGE','129736',jdecode('Re-conditioned'),jdecode(''),'/129736.html','true',[],''],
	['PAGE','121317',jdecode('Telesensory+Repairs'),jdecode(''),'/121317.html','true',[],''],
	['PAGE','130611',jdecode('Special+Offers'),jdecode(''),'/130611.html','true',[],''],
	['PAGE','34286',jdecode('Latest+News'),jdecode(''),'/34286.html','true',[],''],
	['PAGE','126711',jdecode('New+Products'),jdecode(''),'/126711.html','true',[],''],
	['PAGE','130922',jdecode('Assisted+Living'),jdecode(''),'/130922.html','true',[],''],
	['PAGE','130860',jdecode('TeleCare'),jdecode(''),'/130860.html','true',[],''],
	['PAGE','130891',jdecode('TeleHealth'),jdecode(''),'/130891.html','true',[],''],
	['PAGE','4612',jdecode('How+to+contact+us'),jdecode(''),'/4612.html','true',[],''],
	['PAGE','22182',jdecode('Directions'),jdecode(''),'/22182.html','true',[],''],
	['PAGE','22282',jdecode('Guestbook'),jdecode(''),'/22282/index.html','true',[ 
		['PAGE','22283',jdecode('Read+Guestbook'),jdecode(''),'/22282/22283.html','true',[],'']
	],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Profile';
					                                                                    
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 */					                                                            

