/* [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','612',jdecode('Home'),jdecode(''),'/612.html','true',[],''],
	['PAGE','801',jdecode('Contact'),jdecode(''),'/801.html','true',[],''],
	['PAGE','5806',jdecode('Guestbook'),jdecode(''),'/5806/index.html','true',[ 
		['PAGE','5801',jdecode('Read+Guestbook'),jdecode(''),'/5806/5801.html','true',[],'']
	],'']];
var siteelementCount=4;
theSitetree.topTemplateName='Borders';
theSitetree.paletteFamily='C9DFEE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10572';
theSitetree.graphicsetId='10771';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F0F2F4';
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Borders',
				paletteFamily: 	'C9DFEE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10572',
				graphicsetId: 	'10771',
				contentColor: 	'000000',
				contentBGColor: 'F0F2F4',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5003']={
webappId:    '5003',
documentId:  '612',
internalId:  'tid:1;pid:WSCSYSSSSLYTCPXC',
customField: 'en:US:'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '5806',
internalId:  '5806ahw050in39q0',
customField: 'action=form&icq=false'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '5801',
internalId:  '5806ahw050in39q0',
customField: 'action=list'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN39Q0';
var companyName   = 'Wing+Gong+Laundry+Inc.';
var htmlTitle	  = 'WING+GONG+LAUNDRY+INC.';
var metaKeywords  = 'laundry%2C+wash%2C+stone+wash%2C+bleach%2C+dye%2C+enzyme.+hand+pressed+shirt%2C+pants.+sheets%2C+pillow+cases%2C+quilts%2C+blankets.+covers%2C+towels.';
var metaContents  = 'commercial+laundry%2C+stone+wash%2C+enzyme+wash%2C+dye%2C+bleach+and+other+specialty+washes.+Folded+hand+press+shirts+and+shirts+on+a+hanger.';
					                                                                    
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 */					                                                            
