/* [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','22201',jdecode('Strona+g%C5%82%C3%B3wna'),jdecode(''),'/22201.html','true',[],'',''],
	['PAGE','49901',jdecode('Willa'),jdecode(''),'/49901.html','true',[],'',''],
	['PAGE','19401',jdecode('Pokoje'),jdecode(''),'/19401.html','true',[],'',''],
	['PAGE','19422',jdecode('Galeria'),jdecode(''),'/19422/index.html','true',[ 
		['PAGE','26801',jdecode('Budynek+z+zewn%C4%85trz'),jdecode(''),'/19422/26801.html','true',[],'',''],
		['PAGE','26822',jdecode('Pokoje'),jdecode(''),'/19422/26822.html','true',[],'',''],
		['PAGE','26843',jdecode('Wn%C4%99trza'),jdecode(''),'/19422/26843.html','true',[],'','']
	],'',''],
	['PAGE','19464',jdecode('Cennik+%2F+rezerwacja'),jdecode(''),'/19464/index.html','true',[ 
		['PAGE','22601',jdecode('Regulamin'),jdecode(''),'/19464/22601.html','false',[],'',''],
		['PAGE','44843',jdecode('WAKACJE+U+%C5%B9R%C3%93DE%C5%81'),jdecode(''),'/19464/44843.html','true',[],'',''],
		['PAGE','44801',jdecode('RODZINNE+%C5%9AWI%C4%98TA'),jdecode(''),'/19464/44801.html','true',[],'',''],
		['PAGE','44822',jdecode('POWITAJ+NOWY+ROK+W+BUKOWINIE+'),jdecode(''),'/19464/44822.html','true',[],'',''],
		['PAGE','49401',jdecode('FERIE+2011+ORAZ+03.01.11+-+14.01.11'),jdecode(''),'/19464/49401.html','true',[],'','']
	],'',''],
	['PAGE','19485',jdecode('Kontakt'),jdecode(''),'/19485.html','true',[],'',''],
	['PAGE','24601',jdecode('Bukowina+Tatrza%C5%84ska'),jdecode(''),'/24601.html','true',[],'',''],
	['PAGE','32401',jdecode('Lokalizacja'),jdecode(''),'/32401.html','true',[],'',''],
	['PAGE','53401',jdecode('Ksi%C4%99ga+Go%C5%9Bci'),jdecode(''),'/53401.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Rivet';
theSitetree.paletteFamily='355F35';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32570';
theSitetree.graphicsetId='12689';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='374534';
var localeDef={
  language: 'pl',
  country: 'PL'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Rivet',
				paletteFamily: 	'355F35',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32570',
				graphicsetId: 	'12689',
				contentColor: 	'FFFFFF',
				contentBGColor: '374534',
				a_color: 		'000000',
				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['7060']=webappMappings['7060-ea5e419e74eeb51f0356af5f3c74cea6']={
webappId:    '7060',
documentId:  '26843',
internalId:  'ea5e419e74eeb51f0356af5f3c74cea6',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20100103-155709'
};
webappMappings['7060']=webappMappings['7060-e996b301bc2a77ef273d313b2c79df99']={
webappId:    '7060',
documentId:  '26801',
internalId:  'e996b301bc2a77ef273d313b2c79df99',
customField: 'language:pl;country:PL;'
};
webappMappings['1501']=webappMappings['1501-5664467']={
webappId:    '1501',
documentId:  '22201',
internalId:  '5664467',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20100720-204710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19422',
internalId:  '',
customField: '20100720-200028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19485',
internalId:  '',
customField: '20100409-161608'
};
webappMappings['7008']=webappMappings['7008-4883']={
webappId:    '7008',
documentId:  '19485',
internalId:  '4883',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19464',
internalId:  '',
customField: '20100819-125841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20100819-125825'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '22201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20100124-221213'
};
webappMappings['7060']=webappMappings['7060-e71eac26e72f60dc2a483bbff97d5079']={
webappId:    '7060',
documentId:  '26822',
internalId:  'e71eac26e72f60dc2a483bbff97d5079',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26822',
internalId:  '',
customField: '20100105-234618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20100105-234643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26843',
internalId:  '',
customField: '20100221-213418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20100106-160056'
};
webappMappings['7060']=webappMappings['7060-a922dc7faa934f299ff3ad4a32cf01bd']={
webappId:    '7060',
documentId:  '32401',
internalId:  'a922dc7faa934f299ff3ad4a32cf01bd',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44843',
internalId:  '',
customField: '20100721-110340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44801',
internalId:  '',
customField: '20100819-125305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44822',
internalId:  '',
customField: '20100819-125345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49401',
internalId:  '',
customField: '20100819-125043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49901',
internalId:  '',
customField: '20100723-161239'
};
webappMappings['7002']=webappMappings['7002-3283']={
webappId:    '7002',
documentId:  '53401',
internalId:  '3283',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53401',
internalId:  '',
customField: '20100824-101623'
};
var canonHostname = 'cm4all.az.pl';
var accountId     = 'AAZ010INXLYH';
var companyName   = 'Czas+biegnie+u+nas+inaczej+';
var htmlTitle	  = 'Noclegi+Bukowina+Tatrza%C5%84ska+baseny+termalne+wyci%C4%85gi+narciarskie+WILLA+SILENE+komfortowe+pokoje';
var metaKeywords  = 'Willa+Silene%2C+Bukowina+Tatrza%C5%84ska%2C+Bukowina+Tatrzanska+noclegi%2C+zakwaterowanie%2C++narty%2C+klin%2C+Zakopane%2C+Dom+wycieczkowy%2C+pensjonat%2C+kwatera%2C+kwatery%2C+nocleg%2C+wypoczynek%2C+g%C3%B3ry%2C+wyci%C4%85g+narciarski%2C+wyci%C4%85gi+narciarskie+bukowina%2C+apartamenty%2C+hotel%2C+pokoje+goscinne%2C+pokoje+go%C5%9Bcinne%2C+baza+turystyczna%2C+narciarstwo%2C+szarotka%2C+tatry%2C+bukowina%2C+tatrza%C5%84ska%2C+kotelnica%2C+bukowina+tatrza%C5%84ska+hotele%2C+basen+termalny%2C+baseny+w+bukowinie%2C+terma%2C+bia%C5%82ka+tatrza%C5%84ska%2C+kotelnica%2C+rusin+ski%2C+dla+grup%2C+oferta+dla+grup%2C+noclegi+dla+grup%2C+szkolenia%2C+konferencje';
var metaContents  = 'Szukasz++Pensjonatu+w+Bukowinie+Tatrza%C5%84skiej+-+Willa+Silene+to+pokoje+o+podwy%C5%BCszonym+standardzie+dla+wymagaj%C4%85cych+-+sprawd%C5%BA+nasz%C4%85+ofert%C4%99+%21';
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();
};
