/* [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 theSitetree=[ 
	['PAGE','5201',jdecode('Infolinie+TeleOK'),jdecode(''),'/5201/index.html','true',[ 
		['PAGE','5252',jdecode('Infolinie+0801-0'),jdecode(''),'/5201/5252.html','true',[],''],
		['PAGE','5273',jdecode('Infolinie+0800'),jdecode(''),'/5201/5273.html','true',[],''],
		['PAGE','5294',jdecode('Infolinie+0801'),jdecode(''),'/5201/5294.html','true',[],''],
		['PAGE','5315',jdecode('Us%C5%82ugi+Dodane'),jdecode(''),'/5201/5315.html','true',[],'']
	],''],
	['PAGE','5357',jdecode('10+korzy%C5%9Bci'),jdecode(''),'/5357.html','true',[],''],
	['PAGE','5378',jdecode('Infolinie+TeleOK%3F'),jdecode(''),'/5378.html','true',[],''],
	['PAGE','5399',jdecode('Inne+us%C5%82ugi+TeleOK'),jdecode(''),'/5399/index.html','true',[ 
		['PAGE','5420',jdecode('TeleKonferencje'),jdecode(''),'/5399/5420.html','true',[],''],
		['PAGE','5441',jdecode('Infolinie+703'),jdecode(''),'/5399/5441.html','true',[],''],
		['PAGE','5336',jdecode('Przeniesienie+800%2C+801'),jdecode(''),'/5399/5336.html','true',[],'']
	],''],
	['PAGE','5462',jdecode('Kilka+sl%C3%B3w+o+TeleOK'),jdecode(''),'/5462.html','true',[],''],
	['PAGE','15201',jdecode('Dokumenty+do+pobrania'),jdecode(''),'/15201.html','true',[],''],
	['PAGE','5483',jdecode('News%2C+Napisali+o+nas'),jdecode(''),'/5483.html','true',[],''],
	['PAGE','5504',jdecode('Kontakt+z+TeleOK'),jdecode(''),'/5504.html','true',[],''],
	['PAGE','5525',jdecode('Zapytanie'),jdecode(''),'/5525.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Simple';
theSitetree.paletteFamily='C1BCB6';
theSitetree.keyvisualId='2560';
theSitetree.keyvisualName='business.jpg';
theSitetree.fontsetId='27087';
theSitetree.graphicsetId='10456';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='c1bcb6';
var localeDef={
  language: 'pl',
  country: 'PL'
};
var theTemplate={
				name: 			'Simple',
				paletteFamily: 	'C1BCB6',
				keyvisualId: 	'2560',
				keyvisualName: 	'business.jpg',
				fontsetId: 		'27087',
				graphicsetId: 	'10456',
				contentColor: 	'000000',
				contentBGColor: 'c1bcb6',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'857157',
				e_color: 		'FFFFFF',
				f_color: 		'817E7E',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-6279']={
webappId:    '7008',
documentId:  '5525',
internalId:  '6279',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100623-170211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5357',
internalId:  '',
customField: '20100601-164027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5399',
internalId:  '',
customField: '20100525-134012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5252',
internalId:  '',
customField: '20100623-170005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5462',
internalId:  '',
customField: '20100601-163346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5378',
internalId:  '',
customField: '20100623-170355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5525',
internalId:  '',
customField: '20100601-162847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5420',
internalId:  '',
customField: '20100601-165749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5441',
internalId:  '',
customField: '20100425-193015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5504',
internalId:  '',
customField: '20100601-163151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5336',
internalId:  '',
customField: '20100602-150102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5273',
internalId:  '',
customField: '20100623-165754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5294',
internalId:  '',
customField: '20100623-165526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5315',
internalId:  '',
customField: '20100623-165327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5483',
internalId:  '',
customField: '20100425-202618'
};
webappMappings['7050']=webappMappings['7050-2588']={
webappId:    '7050',
documentId:  '5483',
internalId:  '2588',
customField: 'language:pl;country:PL;'
};
webappMappings['1501']=webappMappings['1501-12115204']={
webappId:    '1501',
documentId:  '5201',
internalId:  '12115204',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20100715-130843'
};
var canonHostname = 'cm4all.az.pl';
var accountId     = 'AAZ010IN3L4L';
var companyName   = 'TeleOK+-+Infolinie+0801%2C+Infolinie+0800%2C+Telekonferencje';
var htmlTitle	  = 'TeleOK+-+Infolinie+0801%2C+Infolinie+0800';
var metaKeywords  = 'Infolinie+801-0%2C+Infolinie+800%2C+Infolinie+801%2C+Infolinie+0800%2C+Infolinie+0801%2C+numery+0801%2C+numery+0800%2C+801%2C+800%2C+801-0%2C+0800%2C+0801%2C+804%2C+0804%2C+703%2C+0703%2C+704%2C+przeniesienie+numeru%2C+sieci+inteligentne%2C+telekonferencje%2C+us%C5%82ugi+dodane%2C+IVR%2C+ACD%2C+PRS%2C+toll+free%2C+split+charge%2C+80x%2C+teleinfo';
var metaContents  = 'TeleOK+%C5%9Bwiadczy+us%C5%82ugi+Infolinie+0801-0%2C+Infolinie+0800%2C+Infolinie+0801.+Opr%C3%B3cz+infolinii+0801-0%2C+0800%2C+0801%2C+TeleOK+dostarcza+us%C5%82ugi+IVR.Je%C5%BCeli+Pa%C5%84stwa+firma+posiada+infolini%C4%99+0801+lub+infolini%C4%99+0800%2C+zapraszamy+do+jej+przeniesienia+do+sieci+TeleOK.+Wszystkie+formalno%C5%9Bci+wykonujemy+w+imieniu+Klienta.Operatorem+sieci+TeleOK+jest+TeleInfo+Sp.+z+o.+o.';
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();
};
