/* [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','1701',jdecode('Strona+g%C5%82%C3%B3wna%2FStartseite'),jdecode(''),'/1701.html','true',[],'',''],
	['PAGE','2001',jdecode('Aktualno%C5%9Bci%2FAktuelle+Infos'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','2022',jdecode('Psy%2FR%C3%BCden'),jdecode(''),'/2022.html','true',[],'',''],
	['PAGE','2043',jdecode('Suki%2FH%C3%BCndinnen'),jdecode(''),'/2043.html','true',[],'',''],
	['PAGE','2064',jdecode('M%C5%82odzie%C5%BC%2FJunghunde'),jdecode(''),'/2064.html','true',[],'',''],
	['PAGE','9901',jdecode('Mioty%2FW%C3%BCrfe'),jdecode(''),'/9901.html','true',[],'',''],
	['PAGE','2106',jdecode('Na+sprzeda%C5%BC%2FVerk%C3%A4ufe'),jdecode(''),'/2106.html','true',[],'',''],
	['PAGE','16201',jdecode('Galeria%2FBilder'),jdecode(''),'/16201.html','true',[],'',''],
	['PAGE','2127',jdecode('Linki%2FLinks'),jdecode(''),'/2127.html','true',[],'',''],
	['PAGE','2148',jdecode('Kontakt'),jdecode(''),'/2148.html','true',[],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='26898';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'pl',
  country: 'PL'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'26898',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-3674']={
webappId:    '7008',
documentId:  '2148',
internalId:  '3674',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20100411-103146'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-6230875']={
webappId:    '1501',
documentId:  '1701',
internalId:  '6230875',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20100816-215727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2022',
internalId:  '',
customField: '20100503-205455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2043',
internalId:  '',
customField: '20100401-230214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2064',
internalId:  '',
customField: '20100420-215742'
};
webappMappings['7060']=webappMappings['7060-7f344e0e2dd49696bc66bd3a3a1b9a6d']={
webappId:    '7060',
documentId:  '16201',
internalId:  '7f344e0e2dd49696bc66bd3a3a1b9a6d',
customField: 'language:pl;country:PL;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2106',
internalId:  '',
customField: '20100503-205129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2127',
internalId:  '',
customField: '20091101-211354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2148',
internalId:  '',
customField: '20100716-214232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20100816-220518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20100308-173324'
};
var canonHostname = 'cm4all.az.pl';
var accountId     = 'AAZ010INE2G5';
var companyName   = '%22von+Haus+Eve%22';
var htmlTitle	  = 'von+Haus+Eve';
var metaKeywords  = 'vegas+du+haut+mansard%2C+owczarek+niemiecki%2C+owczarek%2C+niemiecki%2C+owczarki%2C+niemieckie%2C+%C5%82%C3%B3dzkie%2C+piotrk%C3%B3w%2C+trybunalski%2C+w%C5%82odzimierz%C3%B3w%2C+sulej%C3%B3w%2C+suka%2C+suki%2C+hodowlana%2C+hodowlane%2C+psy%2C+pies%2C+reproduktor%2C+szczeni%C4%99ta%2C+szczeniaki%2C+m%C5%82odzie%C5%BC%2C+na+sprzeda%C5%BC%2C+sprzeda%C5%BC%2C+kupno%2C+von+haus+eve%2C+eve%2C+haus+eve%2C+piotr+sawicki%2C+sawicki%2C+sawicka%2C+ewa%2C+sawik%2C+ksi%C4%99%C5%BCycowa+12%2C+ksi%C4%99%C5%BCycowa%2C+biene%2C+artrox%2C+xanto%2C+v-max%2C+otto+von+haus+yu%2C+';
var metaContents  = 'Hodowla+Owczark%C3%B3w+Niemieckich+von+Haus+Eve.+Ewa+i+Piotr+Sawiccy%2C+ul.+Ksi%C4%99%C5%BCycowa+12%2C+97-330+W%C5%82odzimierz%C3%B3w+pod+Sulejowem%2C+woj.+%C5%81%C3%B3dzkie%2C+tel.+%2B48509913704%2C+mail%3A+haus-eve%40poczta.plPolecamy+szczeni%C4%99ta+po+Vegas+du+Haut+Mansard.';
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();
};
