/* [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','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],''],
	['PAGE','7601',jdecode('Jeweler%26%23x27%3Bs+Tools+%26+Equipment'),jdecode(''),'/7601/index.html','true',[ 
		['PAGE','7622',jdecode('Gram+Scales'),jdecode(''),'/7601/7622.html','true',[],''],
		['PAGE','11301',jdecode('Carat+Scales'),jdecode(''),'/7601/11301.html','true',[],''],
		['PAGE','7643',jdecode('Testers'),jdecode(''),'/7601/7643.html','true',[],''],
		['PAGE','46701',jdecode('UltraSonics'),jdecode(''),'/7601/46701.html','true',[],''],
		['PAGE','24201',jdecode('Cleaning+Solutions+%26+Supplies'),jdecode(''),'/7601/24201.html','true',[],''],
		['PAGE','24222',jdecode('Watch+and+Jewelry+Tools'),jdecode(''),'/7601/24222.html','true',[],''],
		['PAGE','24901',jdecode('Jewelry+Displays'),jdecode(''),'/7601/24901.html','true',[],''],
		['PAGE','44601',jdecode('Engravers'),jdecode(''),'/7601/44601.html','true',[],''],
		['PAGE','44622',jdecode('Steamers'),jdecode(''),'/7601/44622.html','true',[],'']
	],''],
	['PAGE','24501',jdecode('Batteries'),jdecode(''),'/24501.html','true',[],''],
	['PAGE','45101',jdecode('Wholesale+Specials'),jdecode(''),'/45101.html','true',[],''],
	['PAGE','24543',jdecode('Industry+Links'),jdecode(''),'/24543.html','true',[],''],
	['PAGE','42001',jdecode('Warranty+Page'),jdecode(''),'/42001.html','true',[],''],
	['PAGE','7685',jdecode('F.A.Q.'),jdecode(''),'/7685.html','true',[],''],
	['PAGE','42601',jdecode('Orders'),jdecode(''),'/42601.html','true',[],''],
	['PAGE','46022',jdecode('Customer+Service'),jdecode(''),'/46022.html','true',[],''],
	['PAGE','46043',jdecode('About+Us'),jdecode(''),'/46043.html','true',[],''],
	['PAGE','46722',jdecode('Our+Policies'),jdecode(''),'/46722.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='385CA9';
theSitetree.keyvisualId='7156';
theSitetree.keyvisualName='kv_7156.jpg';
theSitetree.fontsetId='16411';
theSitetree.graphicsetId='12134';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Capri',
				paletteFamily: 	'385CA9',
				keyvisualId: 	'7156',
				keyvisualName: 	'kv_7156.jpg',
				fontsetId: 		'16411',
				graphicsetId: 	'12134',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
var canonHostname = 'localhost';
var accountId     = 'AAFF10IN3DZ4';
var companyName   = 'C.+R.+Time+Company';
var htmlTitle	  = 'C.R.Time+Company-Watch+and+Jewelry+Supplies';
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 */					                                                            

