/* [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','301',jdecode('O+NAS'),jdecode(''),'/301.html','true',[],''],
	['PAGE','352',jdecode('OFERTA'),jdecode(''),'/352/index.html','true',[ 
		['PAGE','373',jdecode('SPAWANIE+ELEKTRYCZNE'),jdecode(''),'/352/373.html','true',[],''],
		['PAGE','394',jdecode('SPAWANIE+GAZOWE'),jdecode(''),'/352/394.html','true',[],''],
		['PAGE','415',jdecode('CI%C4%98CIE'),jdecode(''),'/352/415.html','true',[],''],
		['PAGE','436',jdecode('MATERIA%C5%81Y+SPAWALNICZE'),jdecode(''),'/352/436.html','true',[],''],
		['PAGE','457',jdecode('AUTOMATYZACJA'),jdecode(''),'/352/457.html','true',[],''],
		['PAGE','478',jdecode('ARTYKU%C5%81Y+%C5%9ACIERNE'),jdecode(''),'/352/478.html','true',[],''],
		['PAGE','499',jdecode('AKCESORIA'),jdecode(''),'/352/499.html','true',[],'']
	],''],
	['PAGE','520',jdecode('KONTAKT'),jdecode(''),'/520.html','true',[],'']];
var siteelementCount=10;
theSitetree.topTemplateName='Diablo';
theSitetree.paletteFamily='1F53AB';
theSitetree.keyvisualId='8781';
theSitetree.keyvisualName='kv_8781.jpg';
theSitetree.fontsetId='31390';
theSitetree.graphicsetId='12467';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E6E6E6';
var theTemplate={
				name: 			'Diablo',
				paletteFamily: 	'1F53AB',
				keyvisualId: 	'8781',
				keyvisualName: 	'kv_8781.jpg',
				fontsetId: 		'31390',
				graphicsetId: 	'12467',
				contentColor: 	'000000',
				contentBGColor: 'E6E6E6',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '520',
internalId:  '4499804',
customField: 'pl:PL:'
};
var canonHostname = 'wsc1.home.net.pl';
var accountId     = 'AHPL10IN2P22';
var companyName   = 'PHU+MIGOMAX';
var htmlTitle	  = 'PHU+MIGOMAX+-+urz%C4%85dzenia+i+materia%C5%82y+spawalnicze';
var metaKeywords  = 'spaw%2C+spawanie%2C+mig%2C+mag%2C+tig%2C+przy%C5%82bice%2C+drut+do+spawania%2C+urz%C4%85dzenia+do+spawania%2C+materia%C5%82y%2C+sklep%2C+radom%2C+serwis%2C+ci%C4%99cie%2C+okulary+spawalnicze%2C+dysze';
var metaContents  = 'Urz%C4%85dzenia+i+Materia%C5%82y+do+spawania%2C+lutowania+i+ci%C4%99cia.';
					                                                                    
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 */					                                                            

