/* [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('Strona+g%C5%82%C3%B3wna'),jdecode(''),'/501.php','true',[],''],

	['PAGE','5701',jdecode('Filie+GOK'),jdecode(''),'/5701.php','true',[],''],

	['PAGE','636',jdecode('Kalendarz+imprez'),jdecode(''),'/636/index.php','true',[ 

		['PAGE','3222',jdecode('Planowane+imprezy'),jdecode(''),'/636/3222.php','true',[],''],

		['PAGE','3201',jdecode('Galeria+zdj%C4%99%C4%87'),jdecode(''),'/636/3201.php','true',[],'']

	],''],

	['PAGE','657',jdecode('K%C3%B3%C5%82ka+zainteresowa%C5%84'),jdecode(''),'/657.php','true',[],''],

	['PAGE','11101',jdecode('Tablica+og%C5%82osze%C5%84'),jdecode(''),'/11101.php','true',[],''],

	['PAGE','552',jdecode('Kontakt'),jdecode(''),'/552.php','true',[],'']];

var siteelementCount=8;

theSitetree.topTemplateName='Gaudy';

theSitetree.paletteFamily='5C5D96';

theSitetree.keyvisualId='5941';

theSitetree.keyvisualName='kv_5941.jpg';

theSitetree.fontsetId='27845';

theSitetree.graphicsetId='11905';

theSitetree.contentColor='FFFFFF';

theSitetree.contentBGColor='6E8BCE';

var theTemplate={

				name: 			'Gaudy',

				paletteFamily: 	'5C5D96',

				keyvisualId: 	'5941',

				keyvisualName: 	'kv_5941.jpg',

				fontsetId: 		'27845',

				graphicsetId: 	'11905',

				contentColor: 	'FFFFFF',

				contentBGColor: '6E8BCE',

				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: 	'false',

				contentFontFace:'Arial, Helvetica, sans-serif',

				contentFontSize:'12'

			  };

var webappMappings = {};

webappMappings['5000']={

webappId:    '5000',

documentId:  '501',

internalId:  '',

customField: '20080825-121627'

};

webappMappings['1006']={

webappId:    '1006',

documentId:  '501',

internalId:  '1006',

customField: '1006'

};

webappMappings['5000']={

webappId:    '5000',

documentId:  '3201',

internalId:  '',

customField: '20080825-121753'

};

webappMappings['5000']={

webappId:    '5000',

documentId:  '552',

internalId:  '',

customField: '20080825-121841'

};

webappMappings['5000']={

webappId:    '5000',

documentId:  '5701',

internalId:  '',

customField: '20080825-121646'

};

webappMappings['5000']={

webappId:    '5000',

documentId:  '636',

internalId:  '',

customField: '20080825-121706'

};

webappMappings['5000']={

webappId:    '5000',

documentId:  '657',

internalId:  '',

customField: '20080825-121817'

};

webappMappings['1008']={

webappId:    '1008',

documentId:  '552',

internalId:  '1910091',

customField: 'pl:PL:'

};

webappMappings['5000']={

webappId:    '5000',

documentId:  '11101',

internalId:  '',

customField: '20080825-121829'

};

webappMappings['5000']={

webappId:    '5000',

documentId:  '3222',

internalId:  '',

customField: '20080825-121729'

};

var canonHostname = 'cm4all.az.pl';

var accountId     = 'AAZ010IN28WL';

var companyName   = 'Gminny+O%C5%9Brodek+Kultury+w+Ha%C5%BClachu';

var htmlTitle	  = 'Gminny+O%C5%9Brodek+Kultury+w+Ha%C5%BClachu';

var metaKeywords  = 'Gminny+O%C5%9Brodek+Kultury+w+Ha%C5%BClachu%2C+imprezy%2C+wycieczki%2C+GOK+Ha%C5%BClach%2C+zabawy%2C+kursy+j%C4%99zyka+angielskiego';

var metaContents  = 'Gminny+O%C5%9Brodek+Kultury+w+Ha%C5%BClachu%2C+imprezy%2C+wycieczki%2C+GOK+Ha%C5%BClach%2C+zabawy%2C+kursy+j%C4%99zyka+angielskiego';

					                                                                    

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 */					                                                            


