/* [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','5901',jdecode('STRONA+G%C5%81%C3%93WNA'),jdecode(''), jdecode('%2F5901.html'), 'true',[],'',''],
	['PAGE','19301',jdecode('SPRZEDA%C5%BB+RATALNA'),jdecode(''), jdecode('%2F19301.html'), 'true',[],'',''],
	['PAGE','42501',jdecode('PELET+I+BRYKIET'),jdecode(''), jdecode('%2F42501%2Findex.html'), 'true',[ 
		['PAGE','33801',jdecode('BRYKIET+BARLINEK'),jdecode(''), jdecode('%2F42501%2F33801.html'), 'true',[],'',''],
		['PAGE','42601',jdecode('PELET+BARLINEK'),jdecode(''), jdecode('%2F42501%2F42601.html'), 'true',[],'',''],
		['PAGE','42001',jdecode('PELET+LAVA'),jdecode(''), jdecode('%2F42501%2F42001.html'), 'true',[],'','']
	],'',''],
	['PAGE','7601',jdecode('KOT%C5%81Y+C.O.'),jdecode(''), jdecode('%2F7601%2Findex.html'), 'true',[ 
		['PAGE','36501',jdecode('NOWO%C5%9A%C4%86+SOLID'),jdecode(''), jdecode('%2F7601%2F36501.html'), 'true',[],'',''],
		['PAGE','7622',jdecode('HKS+LAZAR'),jdecode(''), jdecode('%2F7601%2F7622.html'), 'true',[],'',''],
		['PAGE','7643',jdecode('STALMARK'),jdecode(''), jdecode('%2F7601%2F7643.html'), 'true',[],'',''],
		['PAGE','7664',jdecode('BUDMET'),jdecode(''), jdecode('%2F7601%2F7664.html'), 'true',[],'',''],
		['PAGE','7685',jdecode('TAURUS'),jdecode(''), jdecode('%2F7601%2F7685.html'), 'true',[],'',''],
		['PAGE','31801',jdecode('VIADRUS'),jdecode(''), jdecode('%2F7601%2F31801.html'), 'true',[],'','']
	],'',''],
	['PAGE','31401',jdecode('SERWIS++KOT%C5%81%C3%93W+C.O.'),jdecode(''), jdecode('%2F31401.html'), 'true',[],'',''],
	['PAGE','7727',jdecode('KOT%C5%81Y+GAZOWE'),jdecode(''), jdecode('%2F7727%2Findex.html'), 'true',[ 
		['PAGE','7748',jdecode('VIESSMANN'),jdecode(''), jdecode('%2F7727%2F7748.html'), 'true',[],'','']
	],'',''],
	['PAGE','7790',jdecode('PODGRZEWACZE+WODY'),jdecode(''), jdecode('%2F7790%2Findex.html'), 'true',[ 
		['PAGE','7811',jdecode('KOSPEL'),jdecode(''), jdecode('%2F7790%2F7811.html'), 'true',[],'','']
	],'',''],
	['PAGE','37901',jdecode('WYMIENNIKI'),jdecode(''), jdecode('%2F37901%2Findex.html'), 'true',[ 
		['PAGE','31822',jdecode('TAURUS'),jdecode(''), jdecode('%2F37901%2F31822.html'), 'true',[],'',''],
		['PAGE','37922',jdecode('KOSPEL'),jdecode(''), jdecode('%2F37901%2F37922.html'), 'true',[],'','']
	],'',''],
	['PAGE','7853',jdecode('KLIMATYZACJA'),jdecode(''), jdecode('%2F7853%2Findex.html'), 'true',[ 
		['PAGE','7874',jdecode('LG'),jdecode(''), jdecode('%2F7853%2F7874.html'), 'true',[],'',''],
		['PAGE','23201',jdecode('GREE'),jdecode(''), jdecode('%2F7853%2F23201.html'), 'true',[],'','']
	],'',''],
	['PAGE','7916',jdecode('SOLARY'),jdecode(''), jdecode('%2F7916%2Findex.html'), 'true',[ 
		['PAGE','7937',jdecode('HEWALEX'),jdecode(''), jdecode('%2F7916%2F7937.html'), 'true',[],'',''],
		['PAGE','7958',jdecode('VIESSMANN'),jdecode(''), jdecode('%2F7916%2F7958.html'), 'true',[],'','']
	],'',''],
	['PAGE','15601',jdecode('GRZEJNIKI+STALOWE'),jdecode(''), jdecode('%2F15601%2Findex.html'), 'true',[ 
		['PAGE','15622',jdecode('HENRAD'),jdecode(''), jdecode('%2F15601%2F15622.html'), 'true',[],'',''],
		['PAGE','31843',jdecode('Purmo'),jdecode(''), jdecode('%2F15601%2F31843.html'), 'true',[],'',''],
		['PAGE','15643',jdecode('IDMAR'),jdecode(''), jdecode('%2F15601%2F15643.html'), 'true',[],'','']
	],'',''],
	['PAGE','15664',jdecode('GRZEJNIKI+ALUMINIOWE'),jdecode(''), jdecode('%2F15664%2Findex.html'), 'true',[ 
		['PAGE','15685',jdecode('FERROLI'),jdecode(''), jdecode('%2F15664%2F15685.html'), 'true',[],'','']
	],'',''],
	['PAGE','7979',jdecode('NASZE+REALIZACJE'),jdecode(''), jdecode('%2F7979%2Findex.html'), 'true',[ 
		['PAGE','25001',jdecode('KOT%C5%81OWNIE'),jdecode(''), jdecode('%2F7979%2F25001.html'), 'true',[],'',''],
		['PAGE','25022',jdecode('KLIMATYZACJE'),jdecode(''), jdecode('%2F7979%2F25022.html'), 'true',[],'','']
	],'',''],
	['PAGE','22401',jdecode('CERTYFIKATY++I++REFERENCJE'),jdecode(''), jdecode('%2F22401.html'), 'true',[],'',''],
	['PAGE','8000',jdecode('KONTAKT'),jdecode(''), jdecode('%2F8000.html'), 'true',[],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Displace';
theSitetree.paletteFamily='2E2E2E';
theSitetree.keyvisualId='11075';
theSitetree.keyvisualName='kv_11075.jpg';
theSitetree.fontsetId='32833';
theSitetree.graphicsetId='13798';
theSitetree.contentColor='DDC18B';
theSitetree.contentBGColor='2E2E2E';
var localeDef={
  language: 'pl',
  country: 'PL'
};
var prodDef={
  wl_name: 'azpl',
  product: 'WSCSYSSSSLY0XKDV'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Displace',
				paletteFamily: 	'2E2E2E',
				keyvisualId: 	'11075',
				keyvisualName: 	'kv_11075.jpg',
				fontsetId: 		'32833',
				graphicsetId: 	'13798',
				contentColor: 	'DDC18B',
				contentBGColor: '2E2E2E',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20110813-125412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20111210-113904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7622',
internalId:  '',
customField: '20111210-122540'
};
webappMappings['1501']=webappMappings['1501-18232850']={
webappId:    '1501',
documentId:  '5901',
internalId:  '18232850',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8000',
internalId:  '',
customField: '20110726-092412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7643',
internalId:  '',
customField: '20110816-230128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7664',
internalId:  '',
customField: '20111213-133848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7685',
internalId:  '',
customField: '20110816-232128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37922',
internalId:  '',
customField: '20111213-155923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7727',
internalId:  '',
customField: '20110725-153049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7748',
internalId:  '',
customField: '20110726-155119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42601',
internalId:  '',
customField: '20120201-120409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7790',
internalId:  '',
customField: '20111213-160749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7811',
internalId:  '',
customField: '20110726-110533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42501',
internalId:  '',
customField: '20120201-115627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7853',
internalId:  '',
customField: '20110813-125225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7874',
internalId:  '',
customField: '20110810-231910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31801',
internalId:  '',
customField: '20110908-120750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7916',
internalId:  '',
customField: '20110727-164013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7937',
internalId:  '',
customField: '20110725-153049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7958',
internalId:  '',
customField: '20111216-121030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7979',
internalId:  '',
customField: '20110809-231128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20111213-163235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15664',
internalId:  '',
customField: '20110726-160743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15685',
internalId:  '',
customField: '20110726-160512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15622',
internalId:  '',
customField: '20110727-104533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15643',
internalId:  '',
customField: '20110820-172558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36501',
internalId:  '',
customField: '20111213-135538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20111213-154232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20111213-141338'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20110813-181859'
};
webappMappings['7008']=webappMappings['7008-8878']={
webappId:    '7008',
documentId:  '8000',
internalId:  '8878',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23201',
internalId:  '',
customField: '20110810-222812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25001',
internalId:  '',
customField: '20110809-230249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25022',
internalId:  '',
customField: '20110809-234147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42001',
internalId:  '',
customField: '20120201-115533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31401',
internalId:  '',
customField: '20110820-145750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31822',
internalId:  '',
customField: '20111213-153836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31843',
internalId:  '',
customField: '20111213-161911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33801',
internalId:  '',
customField: '20111120-182403'
};
var webAppHostname = 'cgi-kreatorstron.az.pl:80';
var canonHostname = 'cm4all.az.pl';
var accountId     = 'AAZ340INVEJJ';
var companyName   = 'INST+-+WOD';
var htmlTitle	  = 'KOT%C5%81Y+C.O++-++KLIMATYZACJE+-+MATERIA%C5%81Y+INSTALACYJNE';
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();
};

