/* [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','4436',jdecode('Home'),jdecode(''),'/4436.html','true',[],''],
	['PAGE','11869',jdecode('About+PBX.NET'),jdecode(''),'/11869.html','true',[],''],
	['PAGE','16701',jdecode('Management+Team'),jdecode(''),'/16701.html','true',[],''],
	['PAGE','19701',jdecode('What+%26+Where+is+VOIP%3F+'),jdecode(''),'/19701.html','true',[],''],
	['PAGE','11923',jdecode('Service+Area+Map'),jdecode(''),'/11923.html','true',[],''],
	['PAGE','21301',jdecode('PBX.NET+Services'),jdecode(''),'/21301.html','true',[],''],
	['PAGE','24001',jdecode('Benefits+%26+Features'),jdecode(''),'/24001.html','true',[],''],
	['PAGE','49807',jdecode('PBX.NET+Broadband'),jdecode(''),'/49807.html','true',[],''],
	['PAGE','16801',jdecode('PBX.NET+Products'),jdecode(''),'/16801.html','true',[],''],
	['PAGE','25504',jdecode('Avaya+Phone+Products'),jdecode(''),'/25504.html','true',[],''],
	['PAGE','40604',jdecode('Plantronics+Headsets'),jdecode(''),'/40604.html','true',[],''],
	['PAGE','37304',jdecode('Customer+Phone+Portal'),jdecode(''),'/37304.html','true',[],''],
	['PAGE','47407',jdecode('Customer+Billing+Portal'),jdecode(''),'/47407.html','true',[],''],
	['PAGE','38004',jdecode('Support+Center%2FForums'),jdecode(''),'/38004.html','true',[],''],
	['PAGE','18401',jdecode('Terms+%26+Conditions'),jdecode(''),'/18401.html','true',[],''],
	['PAGE','17101',jdecode('Satisfaction+Guarantee'),jdecode(''),'/17101.html','true',[],''],
	['PAGE','11896',jdecode('Consulting+Services'),jdecode(''),'/11896.html','true',[],''],
	['PAGE','32604',jdecode('Partner+Programs'),jdecode(''),'/32604.html','true',[],''],
	['PAGE','42204',jdecode('Customer+Promotions'),jdecode(''),'/42204.html','true',[],''],
	['PAGE','26304',jdecode('Alliances+%26+Resources'),jdecode(''),'/26304.html','true',[],''],
	['PAGE','26104',jdecode('Voip%2FTelecom+Cartoons'),jdecode(''),'/26104.html','true',[],''],
	['PAGE','33404',jdecode('News+%26+Events'),jdecode(''),'/33404.html','true',[],''],
	['PAGE','40644',jdecode('911+%2F+E911+Information'),jdecode(''),'/40644.html','true',[],''],
	['PAGE','18201',jdecode('FAQ%26%23x27%3BS'),jdecode(''),'/18201.html','true',[],''],
	['PAGE','11950',jdecode('Contact+us'),jdecode(''),'/11950.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Global';
					                                                                    
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 */					                                                            
