/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','6501',jdecode('Aktualno%C5%9Bci'),jdecode(''),'/6501.html','true',[],'',''],
	['PAGE','31401',jdecode('Informacje+Og%C3%B3lne'),jdecode(''),'/31401/index.html','true',[ 
		['PAGE','31422',jdecode('W%C5%82adze'),jdecode(''),'/31401/31422.html','true',[],'',''],
		['PAGE','31443',jdecode('Historia'),jdecode(''),'/31401/31443.html','true',[],'',''],
		['PAGE','31485',jdecode('Sk%C5%82adki'),jdecode(''),'/31401/31485.html','true',[],'','']
	],'',''],
	['PAGE','12443',jdecode('Lista+Cz%C5%82onk%C3%B3w'),jdecode(''),'/12443.html','true',[],'',''],
	['PAGE','30301',jdecode('Festiwal+Plakatu'),jdecode(''),'/30301/index.html','true',[ 
		['PAGE','30406',jdecode('5.+Festiwal+Plakatu'),jdecode(''),'/30301/30406.html','true',[],'',''],
		['PAGE','30385',jdecode('4.+Festiwal+Plakatu'),jdecode(''),'/30301/30385.html','true',[],'',''],
		['PAGE','30322',jdecode('3.+Festiwal+Plakatu'),jdecode(''),'/30301/30322.html','true',[],'',''],
		['PAGE','30343',jdecode('2.+Festiwal+Plakatu'),jdecode(''),'/30301/30343.html','true',[],'',''],
		['PAGE','30364',jdecode('1.+Festiwal+Plakatu'),jdecode(''),'/30301/30364.html','true',[],'','']
	],'',''],
	['PAGE','12422',jdecode('OOH+w+Polsce'),jdecode(''),'/12422.html','true',[],'',''],
	['PAGE','12464',jdecode('Raporty'),jdecode(''),'/12464.html','true',[],'',''],
	['PAGE','12485',jdecode('Badania'),jdecode(''),'/12485.html','true',[],'',''],
	['PAGE','32201',jdecode('Prawo%2FStatut'),jdecode(''),'/32201/index.html','true',[ 
		['PAGE','32222',jdecode('Regulamin+Rady'),jdecode(''),'/32201/32222.html','true',[],'',''],
		['PAGE','32243',jdecode('Regulamin+S%C4%85du'),jdecode(''),'/32201/32243.html','true',[],'',''],
		['PAGE','32285',jdecode('Kodeks+Etyki'),jdecode(''),'/32201/32285.html','true',[],'','']
	],'',''],
	['PAGE','12506',jdecode('Kontakt'),jdecode(''),'/12506.html','true',[],'',''],
	['PAGE','36401',jdecode('pkm'),jdecode(''),'/36401.html','false',[],'',''],
	['PAGE','37101',jdecode('wosr'),jdecode(''),'/37101.html','false',[],'',''],
	['PAGE','46601',jdecode('PDSA'),jdecode(''),'/46601.html','false',[],'',''],
	['PAGE','49001',jdecode('projekt+AMS'),jdecode(''),'/49001.html','false',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Bow';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='12025';
theSitetree.keyvisualName='kv_12025.jpg';
theSitetree.fontsetId='36225';
theSitetree.graphicsetId='14117';
theSitetree.contentColor='333333';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pl',
  country: 'PL'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Bow',
				paletteFamily: 	'000000',
				keyvisualId: 	'12025',
				keyvisualName: 	'kv_12025.jpg',
				fontsetId: 		'36225',
				graphicsetId: 	'14117',
				contentColor: 	'333333',
				contentBGColor: 'FFFFFF',
				a_color: 		'F2F5F8',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20100309-111701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32201',
internalId:  '',
customField: '20100129-130934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36401',
internalId:  '',
customField: '20100129-195842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12485',
internalId:  '',
customField: '20100129-230415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12443',
internalId:  '',
customField: '20100201-221814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12464',
internalId:  '',
customField: '20100203-112311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12422',
internalId:  '',
customField: '20100130-010321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12506',
internalId:  '',
customField: '20100302-121503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30301',
internalId:  '',
customField: '20100309-111311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31401',
internalId:  '',
customField: '20100129-225028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31422',
internalId:  '',
customField: '20100129-170752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31443',
internalId:  '',
customField: '20100129-125434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31485',
internalId:  '',
customField: '20100129-225910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32222',
internalId:  '',
customField: '20100129-131054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32243',
internalId:  '',
customField: '20100129-131225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32285',
internalId:  '',
customField: '20100129-131401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30406',
internalId:  '',
customField: '20100309-110818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37101',
internalId:  '',
customField: '20100129-203055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30385',
internalId:  '',
customField: '20100130-011053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30322',
internalId:  '',
customField: '20100130-005536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30343',
internalId:  '',
customField: '20100130-005012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30364',
internalId:  '',
customField: '20100130-004409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46601',
internalId:  '',
customField: '20100201-222949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49001',
internalId:  '',
customField: '20100211-232039'
};
var canonHostname = 'wsc2.home.net.pl';
var accountId     = 'AHPL10INPIAR';
var companyName   = 'Izba+Gospodarcza+Reklamy+Zewn%C4%99trznej';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};

