/* [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','2452',jdecode('Info+zur+Hundeschule'),jdecode(''),'/2452.html','true',[],'',''],
	['PAGE','2473',jdecode('Team'),jdecode(''),'/2473.html','true',[],'',''],
	['PAGE','2494',jdecode('Angebote'),jdecode(''),'/2494.html','true',[],'',''],
	['PAGE','177301',jdecode('%22Problemhunde%22'),jdecode(''),'/177301.html','true',[],'',''],
	['PAGE','154001',jdecode('%C3%9Cbungszeiten%3A'),jdecode(''),'/154001.html','true',[],'',''],
	['PAGE','176101',jdecode('Preise'),jdecode(''),'/176101.html','true',[],'',''],
	['PAGE','4101',jdecode('Anl%C3%A4sse+und+Infos'),jdecode(''),'/4101.html','true',[],'',''],
	['PAGE','10201',jdecode('Teilnehmer'),jdecode(''),'/10201.html','true',[],'',''],
	['PAGE','112001',jdecode('Unsere+Hunde'),jdecode(''),'/112001.html','true',[],'',''],
	['PAGE','162701',jdecode('Lehrreich'),jdecode(''),'/162701.html','true',[],'',''],
	['PAGE','4122',jdecode('Hundebilder'),jdecode(''),'/4122.html','true',[],'',''],
	['PAGE','118701',jdecode('Filmproduktion'),jdecode(''),'/118701.html','true',[],'',''],
	['PAGE','183101',jdecode('Wegbeschreibung'),jdecode(''),'/183101.html','true',[],'',''],
	['PAGE','158701',jdecode('Film+Provet'),jdecode(''),'/158701.html','false',[],'',''],
	['PAGE','120101',jdecode('Hundehalterseite'),jdecode(''),'/120101.html','false',[],'',''],
	['PAGE','4401',jdecode('Links'),jdecode(''),'/4401.html','true',[],'',''],
	['PAGE','2515',jdecode('G%C3%A4stebuch'),jdecode(''),'/2515.html','true',[],'',''],
	['PAGE','9001',jdecode('Kontakt'),jdecode(''),'/9001.html','true',[],'',''],
	['PAGE','182601',jdecode('Wegbeschreibung'),jdecode(''),'/182601.html','false',[],'',''],
	['PAGE','121301',jdecode('Sachkundenachweis'),jdecode(''),'/121301.html','false',[],'',''],
	['PAGE','125801',jdecode('Hund2'),jdecode(''),'/125801.html','false',[],'',''],
	['PAGE','137101',jdecode('Hundeah'),jdecode(''),'/137101.html','false',[],'',''],
	['PAGE','137801',jdecode('Familienhunde+Bilder'),jdecode(''),'/137801.html','false',[],'',''],
	['PAGE','146601',jdecode('Alfons'),jdecode(''),'/146601.html','false',[],'',''],
	['PAGE','150101',jdecode('Andrea'),jdecode(''),'/150101.html','false',[],'',''],
	['PAGE','161501',jdecode('Alfons'),jdecode(''),'/161501.html','false',[],'',''],
	['PAGE','167501',jdecode('Nora+'),jdecode(''),'/167501.html','false',[],'',''],
	['PAGE','168401',jdecode('Hunde+Daniela'),jdecode(''),'/168401.html','false',[],'',''],
	['PAGE','171401',jdecode('Mein+Film'),jdecode(''),'/171401.html','false',[],'',''],
	['PAGE','171901',jdecode('Schlusswort'),jdecode(''),'/171901.html','false',[],'',''],
	['PAGE','173101',jdecode('jasmin'),jdecode(''),'/173101.html','false',[],'',''],
	['PAGE','174701',jdecode('Junge+hunde'),jdecode(''),'/174701.html','false',[],'',''],
	['PAGE','175301',jdecode('reginabild'),jdecode(''),'/175301.html','false',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Simple';
theSitetree.paletteFamily='C1BCB6';
theSitetree.keyvisualId='4621';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='10346';
theSitetree.graphicsetId='10456';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='c1bcb6';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Simple',
				paletteFamily: 	'C1BCB6',
				keyvisualId: 	'4621',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'10346',
				graphicsetId: 	'10456',
				contentColor: 	'000000',
				contentBGColor: 'c1bcb6',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20100321-185949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2452',
internalId:  '',
customField: '20100328-105926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2473',
internalId:  '',
customField: '20100719-235900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2494',
internalId:  '',
customField: '20100404-012219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2515',
internalId:  '',
customField: '20091110-125500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20100727-235738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4122',
internalId:  '',
customField: '20100421-201719'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2452',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-2515ahp340inva0g']={
webappId:    '1002',
documentId:  '2515',
internalId:  '2515ahp340inva0g',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-1827']={
webappId:    '7008',
documentId:  '9001',
internalId:  '1827',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20091206-024003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20100107-212823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112001',
internalId:  '',
customField: '20100106-104132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118701',
internalId:  '',
customField: '20100321-190048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120101',
internalId:  '',
customField: '20091213-002109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121301',
internalId:  '',
customField: '20100210-211245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125801',
internalId:  '',
customField: '20091130-183535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137101',
internalId:  '',
customField: '20091212-014959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '137801',
internalId:  '',
customField: '20091212-233832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146601',
internalId:  '',
customField: '20100108-021359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150101',
internalId:  '',
customField: '20100109-191102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '154001',
internalId:  '',
customField: '20100408-103428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158701',
internalId:  '',
customField: '20100114-195806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '161501',
internalId:  '',
customField: '20100302-125246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '162701',
internalId:  '',
customField: '20100302-015539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167501',
internalId:  '',
customField: '20100224-004234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168401',
internalId:  '',
customField: '20100228-140345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171401',
internalId:  '',
customField: '20100302-130809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171901',
internalId:  '',
customField: '20100302-021903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173101',
internalId:  '',
customField: '20100302-122642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '174701',
internalId:  '',
customField: '20100303-171113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175301',
internalId:  '',
customField: '20100304-135050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '176101',
internalId:  '',
customField: '20100308-133956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177301',
internalId:  '',
customField: '20100404-005658'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '182601',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '182601',
internalId:  '',
customField: '20100803-163325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183101',
internalId:  '',
customField: '20100805-002621'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHP340INVA0G';
var companyName   = 'Hundeschule+Seiler++5012+W%C3%B6schnau++++++';
var htmlTitle	  = 'Hundeschule+Seiler+W%C3%B6schnau';
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();
};
