/* [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('Strona+g%C5%82%C3%B3wna'),jdecode(''),'/401.html','true',[],''],
	['PAGE','515',jdecode('Imprezy'),jdecode(''),'/515/index.html','true',[ 
		['PAGE','536',jdecode('Kalendarz'),jdecode(''),'/515/536.html','true',[],''],
		['PAGE','557',jdecode('Relacje'),jdecode(''),'/515/557.html','true',[],'']
	],''],
	['PAGE','11301',jdecode('Forum'),jdecode(''),'/11301/index.html','true',[ 
		['PAGE','11806',jdecode('Ksi%C4%99ga+go%C5%9Bci'),jdecode(''),'/11301/11806.html','true',[],''],
		['PAGE','11801',jdecode('Czytaj+Ksi%C4%99ga+go%C5%9Bci'),jdecode(''),'/11301/11801.html','true',[],'']
	],''],
	['PAGE','473',jdecode('O+nas'),jdecode(''),'/473.html','true',[],''],
	['PAGE','578',jdecode('Kontakt'),jdecode(''),'/578/index.html','true',[ 
		['PAGE','599',jdecode('Linki'),jdecode(''),'/578/599.html','true',[],'']
	],'']];
var siteelementCount=10;
theSitetree.topTemplateName='Diablo';
theSitetree.paletteFamily='CA2828';
theSitetree.keyvisualId='8770';
theSitetree.keyvisualName='kv_8770.jpg';
theSitetree.fontsetId='31392';
theSitetree.graphicsetId='12466';
theSitetree.contentColor='59696F';
theSitetree.contentBGColor='E6E6E6';
var theTemplate={
				name: 			'Diablo',
				paletteFamily: 	'CA2828',
				keyvisualId: 	'8770',
				keyvisualName: 	'kv_8770.jpg',
				fontsetId: 		'31392',
				graphicsetId: 	'12466',
				contentColor: 	'59696F',
				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['5000']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20080304-122150'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20080317-163317'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20080326-120711'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20080117-161852'
};
webappMappings['1003']={
webappId:    '1003',
documentId:  '11301',
internalId:  'ahpl10inv4sj1179d261ee8',
customField: 'pl:PL:'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20080201-124718'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20080121-155946'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20080319-160055'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20080122-143729'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '11806',
internalId:  '11806ahpl10inv4sj',
customField: 'action=form&icq=false'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '11801',
internalId:  '11806ahpl10inv4sj',
customField: 'action=list'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '11806',
internalId:  '',
customField: '20080122-165227'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20080122-165240'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc1.home.net.pl';
var accountId     = 'AHPL10INV4SJ';
var companyName   = 'KOMISJA+SPORTU+WOPR';
var htmlTitle	  = '';
var metaKeywords  = 'wopr%3B+sportowe+ratownictwo+wodne%3B+ks+wopr%3B+ratownictwo+wodne%3B+';
var metaContents  = 'komisja+sportu+wopr++sportowe+ratownictwo+wodne++';
					                                                                    
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 */					                                                            

