/* [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','22',jdecode('Home'),jdecode(''),'/22.html','true',[],''],
	['PAGE','1302',jdecode('linux+cctv'),jdecode(''),'/1302.html','true',[],''],
	['PAGE','1251',jdecode('cctv+stuff'),jdecode(''),'/1251.html','true',[],''],
	['PAGE','1380',jdecode('cctv+FAQ'),jdecode(''),'/1380.html','true',[],''],
	['PAGE','2122',jdecode('why+linux%3F'),jdecode(''),'/2122.html','true',[],''],
	['PAGE','1225',jdecode('Guestbook'),jdecode(''),'/1225/index.html','true',[ 
		['PAGE','1224',jdecode('Read+Guestbook'),jdecode(''),'/1225/1224.html','true',[],'']
	],''],
	['PAGE','2223',jdecode('contact+us'),jdecode(''),'/2223.html','true',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Analyzer';
theSitetree.paletteFamily='BC2025';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10557';
theSitetree.graphicsetId='10575';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='000000';
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Analyzer',
				paletteFamily: 	'BC2025',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10557',
				graphicsetId: 	'10575',
				contentColor: 	'DDDDDD',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '22',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '1225',
internalId:  '1225AHW050INX2XG',
customField: 'action=form&icq=false'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '1251',
internalId:  '11aaded0f5d',
customField: 'g.13amuq3qt.4dc6al64pkar3.h5a40'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '1224',
internalId:  '1225AHW050INX2XG',
customField: 'action=list'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '22',
internalId:  '148377',
customField: '1501'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX2XG';
var companyName   = 'H.J.Linux+digital+solutions.';
var htmlTitle	  = 'linux+cctv+surveillance';
var metaKeywords  = 'surveillance%2C+video+surveillance%2C+spy+camera%2C+dvr%2C+dvr+card%2C+linux+surveillance+system%2Ccamera%2Cvideo+system%2C+video+server%2C+cctv%2C+nanny+camera';
var metaContents  = 'linux+cctv%2Ccctv+surveillance%2C+video+surveillance%2C+spy+camera%2C+dvr%2C+dvr+card%2Clinux+surveillance+system%2Ccctv+linux%2Clinux+cctv+camera%2Clinux+cctv+system';
					                                                                    
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 */					                                                            
