/* [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','12901',jdecode('Zamiast+wst%C4%99pu'),jdecode(''),'/12901.html','true',[],''],
	['PAGE','701',jdecode('Pierwszy+krok'),jdecode(''),'/701.html','true',[],''],
	['PAGE','2485',jdecode('Systemy+bezprzewodowe'),jdecode(''),'/2485.html','true',[],''],
	['PAGE','2443',jdecode('Us%C5%82ugi'),jdecode(''),'/2443.html','true',[],''],
	['PAGE','2422',jdecode('O+nas'),jdecode(''),'/2422.html','true',[],''],
	['PAGE','2506',jdecode('Kontakt'),jdecode(''),'/2506.html','true',[],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='333399';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26724';
theSitetree.graphicsetId='105';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Global',
				paletteFamily: 	'333399',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26724',
				graphicsetId: 	'105',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'242E8A',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'EAEAEA',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20080210-202150'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20070607-181741'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '2485',
internalId:  '',
customField: '20070607-182600'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '2443',
internalId:  '',
customField: '20070607-183155'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '2422',
internalId:  '',
customField: '20070607-183345'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '2506',
internalId:  '',
customField: '20070406-231613'
};
var canonHostname = 'wsc1.home.net.pl';
var accountId     = 'AHPL10INE64F';
var companyName   = 'elektroniczna+ochrona+mienia';
var htmlTitle	  = 'Bezprzewodowe+systemy+alarmowe+do+dom%C3%B3w%2C+mieszka%C5%84+i+firm.';
var metaKeywords  = 'alarmy%2C+systemy+alarmowe%2C+bezprzewodowy+alarm%2C+Jablotron%2C+alarmy+domowe%2Csystem+alarmowy%2C+telewizja+przemys%C5%82owa%2C+monitoring+wizyjny%2C+alarmy+%C5%9Awidnica%2C+bezprzewodowe+systemy+alarmowe%2C+monta%C5%BC+alarm%C3%B3w%2C+kontrast';
var metaContents  = 'Bezprzewodowe+systemy+alarmowe+szczeg%C3%B3lnie+nadaj%C4%85+si%C4%99+do+monta%C5%BCu+w+obiektach+wyko%C5%84czonych.+Ze+wzgl%C4%99du+na+brak+kabli+nie+ma+konieczno%C5%9Bci+kucia+w+%C5%9Bcianach+itp.brudnych+rob%C3%B3t.+Kontrast+jest+autoryzowanym+instalatorem+bezprzewodowych+alarm%C3%B3w+Jablotron+i+wykonuje+us%C5%82ugi+na+terenie+Dolnego+%C5%9Al%C4%85ska.';
					                                                                    
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 */					                                                            

