/* [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','4599',jdecode('Home'),jdecode(''),'/4599.html','true',[],''],
	['PAGE','9063',jdecode('Djerba'),jdecode(''),'/9063.html','true',[],''],
	['PAGE','9090',jdecode('Wanouk'),jdecode(''),'/9090.html','true',[],''],
	['PAGE','26003',jdecode('Welpen'),jdecode(''),'/26003/index.html','true',[ 
		['PAGE','26603',jdecode('Unser+Heim'),jdecode(''),'/26003/26603.html','true',[],''],
		['PAGE','26630',jdecode('Geburt'),jdecode(''),'/26003/26630.html','true',[],''],
		['PAGE','26657',jdecode('1.+Woche'),jdecode(''),'/26003/26657.html','true',[],''],
		['PAGE','26684',jdecode('2.+Woche'),jdecode(''),'/26003/26684.html','true',[],''],
		['PAGE','29703',jdecode('3.+Woche'),jdecode(''),'/26003/29703.html','true',[],''],
		['PAGE','31003',jdecode('4.+Woche'),jdecode(''),'/26003/31003.html','true',[],''],
		['PAGE','32903',jdecode('5.+Woche'),jdecode(''),'/26003/32903.html','true',[],''],
		['PAGE','34103',jdecode('6.+Woche'),jdecode(''),'/26003/34103.html','true',[],''],
		['PAGE','34903',jdecode('7.+Woche'),jdecode(''),'/26003/34903.html','true',[],''],
		['PAGE','36927',jdecode('8.+Woche'),jdecode(''),'/26003/36927.html','true',[],'']
	],''],
	['PAGE','37903',jdecode('NEU%21+Teenager+NEU%21'),jdecode(''),'/37903/index.html','true',[ 
		['PAGE','37957',jdecode('Einzug+ins+neue+Zuhause'),jdecode(''),'/37903/37957.html','true',[],''],
		['PAGE','37930',jdecode('kleiner+Weiberhaushalt'),jdecode(''),'/37903/37930.html','true',[],''],
		['PAGE','37984',jdecode('Urlaub+im+Schnee'),jdecode(''),'/37903/37984.html','true',[],''],
		['PAGE','38011',jdecode('Urlaub+am+See'),jdecode(''),'/37903/38011.html','true',[],''],
		['PAGE','38038',jdecode('1.+Geburtstag'),jdecode(''),'/37903/38038.html','true',[],'']
	],''],
	['PAGE','9144',jdecode('Kontakt'),jdecode(''),'/9144.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Speed';
theSitetree.paletteFamily='CC0000';
theSitetree.keyvisualId='2342';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='378';
theSitetree.graphicsetId='423';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='CC0000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				name: 			'Speed',
				paletteFamily: 	'CC0000',
				keyvisualId: 	'2342',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'378',
				graphicsetId: 	'423',
				contentColor: 	'FFFFFF',
				contentBGColor: 'CC0000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'CC0000',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-2289799']={
webappId:    '1501',
documentId:  '4599',
internalId:  '2289799',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4599',
internalId:  '',
customField: '20060108-134911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9063',
internalId:  '',
customField: '20041024-172009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9090',
internalId:  '',
customField: '20041024-172605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26003',
internalId:  '',
customField: '20041220-070112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26603',
internalId:  '',
customField: '20041107-205703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26630',
internalId:  '',
customField: '20041107-230529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26657',
internalId:  '',
customField: '20041107-230731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26684',
internalId:  '',
customField: '20041107-225717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29703',
internalId:  '',
customField: '20041114-195630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31003',
internalId:  '',
customField: '20041121-223707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32903',
internalId:  '',
customField: '20041205-191103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34103',
internalId:  '',
customField: '20041205-192936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34903',
internalId:  '',
customField: '20041215-070609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36927',
internalId:  '',
customField: '20041220-071542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37903',
internalId:  '',
customField: '20060103-215321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37957',
internalId:  '',
customField: '20060108-135740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37930',
internalId:  '',
customField: '20060103-231201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37984',
internalId:  '',
customField: '20060103-231724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38011',
internalId:  '',
customField: '20060108-135225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38038',
internalId:  '',
customField: '20060104-063908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9144',
internalId:  '',
customField: '20040930-123113'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXVZ2';
var companyName   = 'Tervueren+of+Amber+Eye+%28FCI%29';
var htmlTitle	  = 'Tervueren+of+Amber+Eye';
var metaKeywords  = 'Tervueren+of+Amber+Eye';
var metaContents  = 'Tervueren+belgischer+Sch%EF%BF%BDfer+Amber+Eye';
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();
};
