/* [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','85245',jdecode('Home'),jdecode(''),'/85245.html','true',[],'',''],
	['PAGE','84823',jdecode('Antystresy'),jdecode(''),'/84823.html','true',[],'',''],
	['PAGE','84844',jdecode('Biurowe'),jdecode(''),'/84844.html','true',[],'',''],
	['PAGE','84865',jdecode('Breloki++Serca'),jdecode(''),'/84865.html','true',[],'',''],
	['PAGE','127123',jdecode('Breloki++Postacie'),jdecode(''),'/127123.html','true',[],'',''],
	['PAGE','127144',jdecode('Breloki++Zawieszki'),jdecode(''),'/127144.html','true',[],'',''],
	['PAGE','84886',jdecode('Ceramika'),jdecode(''),'/84886.html','true',[],'',''],
	['PAGE','84907',jdecode('Dom'),jdecode(''),'/84907.html','true',[],'',''],
	['PAGE','84928',jdecode('Elektronika'),jdecode(''),'/84928.html','true',[],'',''],
	['PAGE','99723',jdecode('Maskotki'),jdecode(''),'/99723.html','true',[],'',''],
	['PAGE','102023',jdecode('Opakowania'),jdecode(''),'/102023.html','true',[],'',''],
	['PAGE','84949',jdecode('Osobiste'),jdecode(''),'/84949.html','true',[],'',''],
	['PAGE','84970',jdecode('Ozdoby'),jdecode(''),'/84970.html','true',[],'',''],
	['PAGE','99823',jdecode('Pami%C4%99ci+USB'),jdecode(''),'/99823.html','true',[],'',''],
	['PAGE','84991',jdecode('Pi%C5%9Bmienne'),jdecode(''),'/84991.html','true',[],'',''],
	['PAGE','85012',jdecode('R%C3%B3%C5%BCno%C5%9Bci'),jdecode(''),'/85012.html','true',[],'',''],
	['PAGE','85033',jdecode('%C5%9Awiece'),jdecode(''),'/85033.html','true',[],'',''],
	['PAGE','85054',jdecode('Tekstylia'),jdecode(''),'/85054.html','true',[],'',''],
	['PAGE','85096',jdecode(''),jdecode(''),'/85096.html','true',[],'',''],
	['PAGE','85117',jdecode('Kontakt'),jdecode(''),'/85117.html','true',[],'',''],
	['PAGE','85203',jdecode(''),jdecode(''),'/85203.html','true',[],'',''],
	['PAGE','100623',jdecode(''),jdecode(''),'/100623.html','true',[],'',''],
	['ITEM','81912',jdecode('AP68'),jdecode(''),'http://www.ap68.pl','true',[],'','_blank'],
	['ITEM','85159',jdecode('IDEAS'),jdecode(''),'http://www.ideas.com.pl','true',[],'','_blank'],
	['ITEM','85160',jdecode('Reflects'),jdecode(''),'http://www.reflects.ap68.pl','true',[],'','_blank'],
	['ITEM','99744',jdecode('Upominki+i+Prezenty'),jdecode(''),'http://www.firmowe-upominki.pl','true',[],'','_blank'],
	['PAGE','85182',jdecode(''),jdecode(''),'/85182.html','true',[],'',''],
	['PAGE','100644',jdecode(''),jdecode(''),'/100644.html','true',[],'',''],
	['PAGE','2112',jdecode('Strona+g%C5%82%C3%B3wna'),jdecode(''),'/2112.html','false',[],'',''],
	['PAGE','41112',jdecode('1-+4+dni+Pendrive'),jdecode(''),'/41112.html','false',[],'',''],
	['PAGE','2163',jdecode('Metr%C3%B3wki+drewniane'),jdecode(''),'/2163.html','false',[],'',''],
	['PAGE','41512',jdecode('1+tydzie%C5%84+Pendrive'),jdecode(''),'/41512.html','false',[],'',''],
	['PAGE','41533',jdecode('2+tygodnie+Pendrive'),jdecode(''),'/41533.html','false',[],'',''],
	['PAGE','45012',jdecode('Opakowania'),jdecode(''),'/45012.html','false',[],'',''],
	['PAGE','45033',jdecode('Smycze%2C+breloki+'),jdecode(''),'/45033.html','false',[],'',''],
	['PAGE','42012',jdecode('Wyszukiwarka'),jdecode(''),'/42012.html','false',[],'',''],
	['PAGE','42033',jdecode('Kontakt'),jdecode(''),'/42033.html','false',[],'','']];
var siteelementCount=37;
theSitetree.topTemplateName='Porthole';
theSitetree.paletteFamily='920707';
theSitetree.keyvisualId='6707';
theSitetree.keyvisualName='kv_6707.jpg';
theSitetree.fontsetId='30912';
theSitetree.graphicsetId='12017';
theSitetree.contentColor='4E0101';
theSitetree.contentBGColor='FAEEEE';
var localeDef={
  language: 'pl',
  country: 'PL'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Porthole',
				paletteFamily: 	'920707',
				keyvisualId: 	'6707',
				keyvisualName: 	'kv_6707.jpg',
				fontsetId: 		'30912',
				graphicsetId: 	'12017',
				contentColor: 	'4E0101',
				contentBGColor: 'FAEEEE',
				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',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2112',
internalId:  '',
customField: '20090616-135113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2163',
internalId:  '',
customField: '20090218-181420'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '85245',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41112',
internalId:  '',
customField: '20091123-105055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41512',
internalId:  '',
customField: '20091123-104633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41533',
internalId:  '',
customField: '20091123-104705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84823',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['7008']=webappMappings['7008-3519']={
webappId:    '7008',
documentId:  '42033',
internalId:  '3519',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42033',
internalId:  '',
customField: '20090606-184302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42012',
internalId:  '',
customField: '20090606-184408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45012',
internalId:  '',
customField: '20091006-194626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45033',
internalId:  '',
customField: '20091123-104744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85245',
internalId:  '',
customField: '20100107-163957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84865',
internalId:  '',
customField: '20100105-200311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100644',
internalId:  '',
customField: '20100105-174056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84844',
internalId:  '',
customField: '20100105-182248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84886',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84907',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84928',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99723',
internalId:  '',
customField: '20100105-172105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84949',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84970',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99823',
internalId:  '',
customField: '20100105-172720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84991',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85012',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85033',
internalId:  '',
customField: '20100105-182542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85054',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85096',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85117',
internalId:  '',
customField: '20100105-182113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100623',
internalId:  '',
customField: '20100105-174056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85182',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85203',
internalId:  '',
customField: '20100105-163136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102023',
internalId:  '',
customField: '20100105-182438'
};
var canonHostname = 'wsc0.home.net.pl';
var accountId     = 'AHPL10INLOAY';
var companyName   = '++++++++++++++++++++GAD%C5%BBETY+WALENTYNKOWE';
var htmlTitle	  = 'www.GadzetyWalentynkowe.pl+++Gad%C5%BCety+Walentynkowe%2C+Upominki+Walentynkowe%2C+gadzety+reklamowe+walentynkowe%2C+serca%2C+w+kszta%C5%82cie+serduszka%2C+z+motywem+serduszek.+Gad%C5%BCety+Reklamowe+na+Walentynki%2C+Walentynkowe+upominki+firmowe.+Warszawa';
var metaKeywords  = 'poduszki+rozgrzewaj%C4%85ce%2C+magnesy+na+spinacze%2C+serca%2C+serduszka%2C+kubki%2C+antystresy%2C+breloki%2C+breloczki';
var metaContents  = 'Walentynkowe+upominki+firmowe%2C+gad%C5%BCety+reklamowe+na+Walentynki.+Wszystko+w+kszta%C5%82cie+serca+i+nie+tylko%3A++przyciski+do+papieru%2C+no%C5%BCyczki%2C+temper%C3%B3wki%2C+magnesy+na+spinacze%2C+poduszki+rozgrzewaj%C4%85ce%2C+breloki%2C+breloczki%2C+antystresy';
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();
};

