/* [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','901',jdecode('Strona+g%C5%82%C3%B3wna'),jdecode(''),'/901.html','true',[],'',''],
	['PAGE','11401',jdecode('%22Rozmowy+Trzecie%22'),jdecode(''),'/11401.html','true',[],'',''],
	['PAGE','54912',jdecode('Trzeszcz%C4%85ce+p%C5%82yty'),jdecode(''),'/54912.html','true',[],'',''],
	['PAGE','10401',jdecode('Sklep'),jdecode(''),'/10401.html','true',[],'',''],
	['PAGE','70726',jdecode('Warunki+sprzeda%C5%BCy+i+wysy%C5%82ki'),jdecode(''),'/70726.html','true',[],'',''],
	['PAGE','973',jdecode('Regulamin'),jdecode(''),'/973.html','true',[],'',''],
	['PAGE','952',jdecode('Kontakt'),jdecode(''),'/952.html','true',[],'',''],
	['PAGE','31001',jdecode('Linki'),jdecode(''),'/31001.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Liveliness';
theSitetree.paletteFamily='C8B451';
theSitetree.keyvisualId='3265';
theSitetree.keyvisualName='kv_3265.jpg';
theSitetree.fontsetId='29660';
theSitetree.graphicsetId='10734';
theSitetree.contentColor='BE9A5B';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'pl',
  country: 'PL'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Liveliness',
				paletteFamily: 	'C8B451',
				keyvisualId: 	'3265',
				keyvisualName: 	'kv_3265.jpg',
				fontsetId: 		'29660',
				graphicsetId: 	'10734',
				contentColor: 	'BE9A5B',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'C8B451',
				e_color: 		'BCBCBC',
				f_color: 		'737373',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20100308-195210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '952',
internalId:  '',
customField: '20080826-111149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '973',
internalId:  '',
customField: '20100609-102454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54912',
internalId:  '',
customField: '20100308-194053'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70726',
internalId:  '',
customField: '20100612-073819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20100612-073715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20100611-102552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31001',
internalId:  '',
customField: '20091205-175411'
};
var canonHostname = 'cm4all.az.pl';
var accountId     = 'AAZ010IN28R1';
var companyName   = 'FotoJana';
var htmlTitle	  = 'FotoJana+-+Piotr+Kaczkowski+Rozmowy+Trzecie';
var metaKeywords  = 'FotoJana%2C+Foto+Jana%2C+Piotr+Kaczkowski%2C+Rozmowy+trzecie%2C+foto+jana%2C+Tr%C3%B3jka%2C+wywiady%2C+muzyka%2C+Program+Trzeci%2C+Fish%2C+Ian+Gillan%2C+Pye+Hastings%2C+Peter+Hammill%2C+Dan+McCafferty%2C+Marek+Piekarczyk%2C+Piotr+Wiwczarek%2C+Vader%2C+Ronnie+James+Dio%2C+Max+Cavalera%2C+Bruce+Dickinson%2C+Billy+Duffy%2C+Renata+Przemyk%2C+Yogi+Lang%2C+Mike+Vennart%2C+Darius+Keeler%2C+Steven+Wilson%2C+Steve+Hogarth%2C+Butch+Vig%2C+Mack%2C+J%C3%B3zef+Skrzek%2C+SBB%2C+Jean+Michel+Jarre%2C+Suzanne+Vega%2C+Jim+Kerr%2C+Yoko+Ono%2C+Alan+Parsons%2C+Roger+Waters%2C+David+Gilmour%2C+Aubrey+Powell%2C+Zbigniew+Preisner%2C+Nick+Mason%2C+Buddy+Guy%2C+Bill+Wyman%2C+Chris+Rea%2C+Stanislaw+Sojka%2C+Jon+Anderson%2C+Tori+Amos%2C+Michael+Stipe%2C+Daniel+Ash%2C+Lisa+Gerrard%2C+Ry+Cooder%2C+Led+Zeppelin%2C+REM%2C+Marillion%2C+Pink+Floyd%2C+Bauhaus%2C+Iron+Maiden%2C+Deep+Purple%2C+Caravan%2C+Simple+Minds%2C+Cavalera+Conspiracy%2C+The+Cult%2C+Oceansize%2C+Archive%2C+Blackfield%2C+Alan+Parsons%2C+Buddy+Guy%2C+Nazareth%2C+Chris+Rea';
var metaContents  = 'Piotr+Kaczkowski%2C+Rozmowy+Trzecie+2008%2C+FotoJana';
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();
};
