/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','18101',jdecode('Attorney+Biography'),jdecode(''),'/18101.html','true',[],''],
	['PAGE','494',jdecode('Business+Immigration'),jdecode(''),'/494/index.html','true',[ 
		['PAGE','536',jdecode('Work+Temporarily+in+U.S.'),jdecode(''),'/494/536.html','true',[],''],
		['PAGE','557',jdecode('Permanent+Immigration'),jdecode(''),'/494/557.html','true',[],'']
	],''],
	['PAGE','8601',jdecode('Study+or+Train+in+the+U.S.'),jdecode(''),'/8601.html','true',[],''],
	['PAGE','6101',jdecode('Family+Immigration'),jdecode(''),'/6101.html','true',[],''],
	['PAGE','8901',jdecode('Become+a+U.S.+Citizen'),jdecode(''),'/8901.html','true',[],''],
	['PAGE','17501',jdecode('Consultation+Information'),jdecode(''),'/17501.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Delphi';
theSitetree.paletteFamily='2B3559';
theSitetree.keyvisualId='7579';
theSitetree.keyvisualName='kv_7579.jpg';
theSitetree.fontsetId='16657';
theSitetree.graphicsetId='12222';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='818181';
var theTemplate={
				name: 			'Delphi',
				paletteFamily: 	'2B3559',
				keyvisualId: 	'7579',
				keyvisualName: 	'kv_7579.jpg',
				fontsetId: 		'16657',
				graphicsetId: 	'12222',
				contentColor: 	'000000',
				contentBGColor: '818181',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'424242',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['2001']={
webappId:    '2001',
documentId:  '17501',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INX293';
var companyName   = 'The+Serifovic+Law+Firm%2C+P.C.';
var htmlTitle	  = 'Immigration+Law+Firm';
var metaKeywords  = 'business+in+US%2C+move+to+US%2C+US+immigration+law%2C++';
var metaContents  = 'immigration+law';
					                                                                    
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 */					                                                            

