/* [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','1513',jdecode('Home'),jdecode(''),'/1513/index.html','true',[ 
		['PAGE','10002',jdecode('Latest+News'),jdecode(''),'/1513/10002.html','true',[],'']
	],''],
	['PAGE','1597',jdecode('Process+Engineering'),jdecode(''),'/1597/index.html','true',[ 
		['PAGE','1624',jdecode('FASTBLANK'),jdecode(''),'/1597/1624.html','true',[],''],
		['PAGE','10083',jdecode('BLANKWORKS'),jdecode(''),'/1597/10083.html','true',[],''],
		['PAGE','10029',jdecode('FASTFORM'),jdecode(''),'/1597/10029.html','true',[],''],
		['PAGE','10110',jdecode('CATFORM'),jdecode(''),'/1597/10110.html','true',[],''],
		['PAGE','10137',jdecode('BLANKNEST'),jdecode(''),'/1597/10137.html','true',[],''],
		['PAGE','14432',jdecode('Cost+Optimizer'),jdecode(''),'/1597/14432.html','true',[],'']
	],''],
	['PAGE','1651',jdecode('Tooling+Simulation'),jdecode(''),'/1651/index.html','true',[ 
		['PAGE','10056',jdecode('FASTFORM+Advanced'),jdecode(''),'/1651/10056.html','true',[],''],
		['PAGE','14401',jdecode('CATSTAMP'),jdecode(''),'/1651/14401.html','true',[],''],
		['PAGE','10164',jdecode('eta%2FDYNAFORM'),jdecode(''),'/1651/10164.html','true',[],''],
		['PAGE','11930',jdecode('Die+Face+Engineering+'),jdecode(''),'/1651/11930.html','true',[],'']
	],''],
	['PAGE','1678',jdecode('Related+Services'),jdecode(''),'/1678/index.html','true',[ 
		['PAGE','10191',jdecode('Pre%2FPost+Processing'),jdecode(''),'/1678/10191.html','true',[],''],
		['PAGE','14463',jdecode('Analysis+%26+Development'),jdecode(''),'/1678/14463.html','true',[],''],
		['PAGE','14494',jdecode('Reverse+Engineering'),jdecode(''),'/1678/14494.html','true',[],'']
	],''],
	['PAGE','1705',jdecode('Training+Courses'),jdecode(''),'/1705/index.html','true',[ 
		['PAGE','10245',jdecode('Metal+Formability'),jdecode(''),'/1705/10245.html','true',[],''],
		['PAGE','10272',jdecode('Sheet+Metal+Assembly'),jdecode(''),'/1705/10272.html','true',[],''],
		['PAGE','10299',jdecode('Software+Training'),jdecode(''),'/1705/10299.html','true',[],'']
	],''],
	['PAGE','1570',jdecode('About+us'),jdecode(''),'/1570/index.html','true',[ 
		['PAGE','10218',jdecode('Publications'),jdecode(''),'/1570/10218.html','true',[],'']
	],''],
	['PAGE','1732',jdecode('Contact'),jdecode(''),'/1732.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 */					                                                            
