/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','5201',jdecode('O+nas'),jdecode(''),'/5201.html','true',[],''],
	['PAGE','5222',jdecode('Szkolenia'),jdecode(''),'/5222.html','true',[],''],
	['PAGE','13201',jdecode('Prawo+w+Internecie'),jdecode(''),'/13201.html','true',[],''],
	['PAGE','40201',jdecode('E-marketing+trendy'),jdecode(''),'/40201.html','true',[],''],
	['PAGE','41101',jdecode('Efektywno%C5%9B%C4%87+marketingu'),jdecode(''),'/41101.html','true',[],''],
	['PAGE','46301',jdecode('Szkolenia+wewn%C4%99trzne'),jdecode(''),'/46301.html','true',[],''],
	['PAGE','5243',jdecode('Aktualno%C5%9Bci'),jdecode(''),'/5243.html','true',[],''],
	['PAGE','5264',jdecode('Wsp%C3%B3%C5%82praca'),jdecode(''),'/5264.html','true',[],''],
	['PAGE','5285',jdecode('Kontakt'),jdecode(''),'/5285.html','true',[],'']];
var siteelementCount=10;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='923';
theSitetree.keyvisualName='agentur.jpg';
theSitetree.fontsetId='28614';
theSitetree.graphicsetId='197';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'NewYork',
				paletteFamily: 	'660000',
				keyvisualId: 	'923',
				keyvisualName: 	'agentur.jpg',
				fontsetId: 		'28614',
				graphicsetId: 	'197',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'660000',
				c_color: 		'000000',
				d_color: 		'990000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1008']={
webappId:    '1008',
documentId:  '5285',
internalId:  '1336902',
customField: 'pl:PL:'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc1.home.net.pl';
var accountId     = 'AHPL10IN29KD';
var companyName   = 'SzkoleniaIT.com';
var htmlTitle	  = 'SzkoleniaIT.com+Centrumszkolen.org';
var metaKeywords  = 'szkolenia%2C+prawo+internetowe%2C+inernet%2C+marketing+%2C+e+-+marketing%2C+web+2.0%2C+domena%2C+sie%C4%87%2C+szkolenia+dla+firm%2C+prawo%2C+wewn%C4%99trzne%2C+eventy%2C+profesjonalne%2C+najlepsi+trenerzy';
var metaContents  = 'Oferta+profesjonalnych+szkole%C5%84+dla+frm%2C+szkolenia+z+zaresu+nowoczesnych+technologii%2C+prawa+Internetowego%2C+marketingu+ponadto+szkolenia+wewn%C4%99trzne+-+na+miar%C4%99+oraz+eventy.';
					                                                                    
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 */					                                                            

