/* [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','601',jdecode('Tremie+Pipes'),jdecode(''),'/601.html','true',[],''],
	['PAGE','652',jdecode('Other+products'),jdecode(''),'/652.html','true',[],'']];
var siteelementCount=2;
theSitetree.topTemplateName='Seifenblase';
theSitetree.paletteFamily='C8E2FF';
theSitetree.keyvisualId='2353';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='381';
theSitetree.graphicsetId='427';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Seifenblase',
				paletteFamily: 	'C8E2FF',
				keyvisualId: 	'2353',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'381',
				graphicsetId: 	'427',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'6666CC',
				e_color: 		'3333CC',
				f_color: 		'9999CC',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100224-164315'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20090728-152833'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INLVV7';
var companyName   = 'W.E.+Couplings+Ltd++++++++++++Tremie+Pipes';
var htmlTitle	  = 'W.E.+Couplings+Ltd';
var metaKeywords  = 'meta+name%3Drevisit-after+content%3D1+day++meta+name%3Drobots+content%3DALL++meta+name%3Ddescription+content%3Dsupplier+of+industrial+hose+fittings%2Cinternal+and+external+swaging+facilities+concrete+pumping+line+adaptors+groundwork+de-watering+unions++meta+name%3Dkeywords+content%3Dhose+adaptors+concrete+sexual+fittings+layflat+hose+couplings+swivel+camlock+bauer+baur+agrilok+pvc+flange+welding+fabrication+%E2%80%98rotary+pipe+swivels%E2%80%99+offshore+balls+plugs+tremmie+tremie+tremi+wellmaster+pump+primer+washout+pipe+layflat+hose+hydraulic+hose+anderton+chorley+northwest+north+west+international+pipeline+pipe+lancashire+uk+hose+swage+swaging+hose+%E2%80%98rotary+pipe+joints%E2%80%99+dragline+couplings+lay+flat+hose+roof+drain+hose+tank+drain+hose+tank+farm+hose+pipe+adaptors+pipe+adapters+tremie+couplings+swage+hose+fittings+concrete+boom+kits+concrete+hose+auger+ropes+steel+loop+wires+concrete+adaptors+concrete+adapters+hose+connections+swivel+joint+steel+flange+adaptors+steel+flange+adapters+hose+adaptors+%E2%80%98swivel+pipe+couplings%E2%80%99+hose+adapter+sexual+fittings+hose+layflathose+tremies+pipe+hose+manifold+swivel+coupling+line+prime+lineprime+starship+coupling+tremie+pipe+tremiepipe+swivel+joint+disposable+auger+plugs+disposable+auger+caps+disposable+CFA+caps+disposable+CFA+plugs+nitrile+tank+drain+hose+tankdrain+hose+meta+name%3Dclassification+content%3DConstruction+manufacturing+fittings+concrete+hose+meta+name%3Drating+content%3DGeneral++meta+name%3Dauthor+content%3DW.E.+Couplings+Ltd++meta+name%3Dreply-to+content%3Dtina%40we-couplings.com++titleW.E.+Couplings+Ltd%2Ftitle+++++';
var metaContents  = 'Supplier+of+industrial+hose++fittings%2C+internal+%2F+external+swaging+facilities%2C+concrete+pumping%2C+line+adaptors%2C+groundwork%2C+de-watering+unions';
					                                                                    
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 */					                                                            

