/* [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','5501',jdecode('Home'),jdecode(''),'/5501.html','true',[],''],
	['PAGE','5552',jdecode('Contact'),jdecode(''),'/5552.html','true',[],''],
	['PAGE','5573',jdecode('Products'),jdecode(''),'/5573.html','true',[],'']];
var siteelementCount=3;
theSitetree.topTemplateName='Cinema';
theSitetree.paletteFamily='2F952F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16613';
theSitetree.graphicsetId='12210';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='2F952F';
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cinema',
				paletteFamily: 	'2F952F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16613',
				graphicsetId: 	'12210',
				contentColor: 	'000000',
				contentBGColor: '2F952F',
				a_color: 		'000000',
				b_color: 		'59AA59',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1008']={
webappId:    '1008',
documentId:  '5552',
internalId:  '1481926',
customField: 'en:US:'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '5501',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN30AK';
var companyName   = 'Huntingdon+Copy-Rite+%26+Banner+Zone';
var htmlTitle	  = 'Huntingdon+Copy+Rite++Banner+Zone';
var metaKeywords  = 'huntingdon+copyrite%2C+huntingdon+pa+copy+rite%2C+copies%2C+color+copies%2C+quick+service+copies%2C+quick+signs%2C+affordable+signs%2C+affordable+copies%2C+desk+top+publishing%2C+laminating%2C+custom+buttons%2C+banners%2C+quick+service+banners%2C+business+cards%2C+posters%2C+blue+prints%2C+blue+print+enlargements%2C+pennsylvania+copy+shop%2C+pa+copy+shop%2C+quick+ship+copies%2C+bindings%2C+folding%2C+machine+folding%2C+custom+envelopes%2C+paper+colors%2C+color+paper%2C+custom+banners%2C+photo+calenders%2C+photo+puzzles%2C+sublimation%2C+screen+printing%2C+custom+mouse+pads%2C+photo+mouse+pads%2C+engraved+name+tags%2C+passport+photos%2C+pa+quick+passport+photo%2C+huntingdon+pa+copy+shop%2C+huntingdon+copy+shop%2C+custom+printed+raffle+tickets%2C+magnetic+signs%2C+vinyl+banners%2C+vinyl+lettering';
var metaContents  = 'Copy%2C+Copies%2C+blue+print+enlargements%2C+banners%2C+custom+printing%2C+custom+screen+printing%2C+custom+signs%2C+affordable+signs';
					                                                                    
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 */					                                                            

