/* [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','34812',jdecode('Strona+g%C5%82%C3%B3wna'),jdecode(''),'/34812.html','true',[],'',''],
	['PAGE','34854',jdecode('Dysfunkcje+kt%C3%B3re+lecz%C4%99'),jdecode(''),'/34854.html','true',[],'',''],
	['PAGE','4901',jdecode('Uko%C5%84czone+szkolenia'),jdecode(''),'/4901.html','true',[],'',''],
	['PAGE','34833',jdecode('Metody+terapeutyczne'),jdecode(''),'/34833.html','true',[],'',''],
	['PAGE','36112',jdecode('Badania+naukowe'),jdecode(''),'/36112.html','true',[],'',''],
	['PAGE','36812',jdecode('Spis+publikacji'),jdecode(''),'/36812/index.html','true',[ 
		['PAGE','36212',jdecode('Publikacje'),jdecode(''),'/36812/36212.html','true',[],'',''],
		['PAGE','36233',jdecode('Referaty%2C+konferencje'),jdecode(''),'/36812/36233.html','true',[],'','']
	],'',''],
	['PAGE','15922',jdecode('Pe%C5%82ne+teksty+%28artyku%C5%82y%29'),jdecode(''),'/15922/index.html','true',[ 
		['PAGE','11801',jdecode('1.+Techniki+rozci%C4%85gaj%C4%85ce'),jdecode(''),'/15922/11801.html','true',[],'',''],
		['PAGE','11901',jdecode('+++-+Teoria'),jdecode(''),'/15922/11901.html','true',[],'',''],
		['PAGE','11922',jdecode('+++-+Praktyka'),jdecode(''),'/15922/11922.html','true',[],'',''],
		['PAGE','12801',jdecode('+++-+Inne+techniki'),jdecode(''),'/15922/12801.html','true',[],'',''],
		['PAGE','15943',jdecode('2.+Sauna'),jdecode(''),'/15922/15943.html','true',[],'',''],
		['PAGE','38212',jdecode('3.+Praca+z+blizn%C4%85'),jdecode(''),'/15922/38212.html','true',[],'','']
	],'',''],
	['PAGE','41012',jdecode('Publikacje+prasowe'),jdecode(''),'/41012.html','true',[],'',''],
	['PAGE','11822',jdecode('Kontakt'),jdecode(''),'/11822.html','true',[],'',''],
	['PAGE','39612',jdecode('Maraton+-+Pozna%C5%84'),jdecode(''),'/39612.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Leaves';
theSitetree.paletteFamily='153951';
theSitetree.keyvisualId='11690';
theSitetree.keyvisualName='kv_11690.jpg';
theSitetree.fontsetId='34991';
theSitetree.graphicsetId='13999';
theSitetree.contentColor='153951';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pl',
  country: 'PL'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Leaves',
				paletteFamily: 	'153951',
				keyvisualId: 	'11690',
				keyvisualName: 	'kv_11690.jpg',
				fontsetId: 		'34991',
				graphicsetId: 	'13999',
				contentColor: 	'153951',
				contentBGColor: 'FFFFFF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20100115-114451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20100115-134005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20100115-134123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11922',
internalId:  '',
customField: '20100115-134209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11822',
internalId:  '',
customField: '20101028-225758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20100115-134243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36812',
internalId:  '',
customField: '20100115-133149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15922',
internalId:  '',
customField: '20100205-141431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15943',
internalId:  '',
customField: '20100115-134406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38212',
internalId:  '',
customField: '20100207-165803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34854',
internalId:  '',
customField: '20100118-215045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34812',
internalId:  '',
customField: '20101028-232453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34833',
internalId:  '',
customField: '20100115-132242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36212',
internalId:  '',
customField: '20100115-125112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36233',
internalId:  '',
customField: '20100115-133406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36112',
internalId:  '',
customField: '20100118-214627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39612',
internalId:  '',
customField: '20101028-230332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41012',
internalId:  '',
customField: '20101028-225213'
};
var canonHostname = 'wsc0.home.net.pl';
var accountId     = 'AHPL10INZXIL';
var companyName   = 'dr+S%C5%82awomir+Marsza%C5%82ek+-+dyplomowany+osteopata';
var htmlTitle	  = 'Osteopatia+%2C+Osteopathy+%2C+dr+S%C5%82awomir+Marsza%C5%82ek+-+dyplomowany+osteopata+%2C+fizjoterapeuta%2C+terapia+manualna+blizn';
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();
};

