/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','181601',jdecode('NEWS+2010'),jdecode(''),'/181601/index.html','true',[ 
		['PAGE','615',jdecode('Archiv'),jdecode(''),'/181601/615.html','true',[],'',''],
		['PAGE','127901',jdecode('Archiv+2009'),jdecode(''),'/181601/127901.html','true',[],'','']
	],'',''],
	['PAGE','573',jdecode('Nicole+und+Rolf'),jdecode(''),'/573.html','true',[],'',''],
	['PAGE','64701',jdecode('Unsere+Hunde'),jdecode(''),'/64701/index.html','true',[ 
		['PAGE','55901',jdecode('Zidane'),jdecode(''),'/64701/55901.html','true',[],'',''],
		['PAGE','55922',jdecode('Kiwi'),jdecode(''),'/64701/55922.html','true',[],'',''],
		['PAGE','55943',jdecode('Blue'),jdecode(''),'/64701/55943.html','true',[],'',''],
		['PAGE','138501',jdecode('Flash'),jdecode(''),'/64701/138501.html','true',[],'',''],
		['PAGE','26601',jdecode('In+Memoriam+Ajsha'),jdecode(''),'/64701/26601.html','true',[],'','']
	],'',''],
	['PAGE','5901',jdecode('Petra+'),jdecode(''),'/5901.html','true',[],'',''],
	['PAGE','5922',jdecode('Petra%26%23x27%3Bs+Hunde'),jdecode(''),'/5922/index.html','true',[ 
		['PAGE','55964',jdecode('Jeanny'),jdecode(''),'/5922/55964.html','true',[],'',''],
		['PAGE','55985',jdecode('Inka'),jdecode(''),'/5922/55985.html','true',[],'',''],
		['PAGE','56069',jdecode('Aitch'),jdecode(''),'/5922/56069.html','true',[],'',''],
		['PAGE','141101',jdecode('Patch'),jdecode(''),'/5922/141101.html','true',[],'',''],
		['PAGE','56048',jdecode('Quick'),jdecode(''),'/5922/56048.html','true',[],'','']
	],'',''],
	['PAGE','48701',jdecode('Videos'),jdecode(''),'/48701.html','true',[],'',''],
	['PAGE','636',jdecode('Agilitytrainig'),jdecode(''),'/636.html','true',[],'',''],
	['PAGE','657',jdecode('Baby-Agility+***neue+Kurse***'),jdecode(''),'/657/index.html','true',[ 
		['PAGE','98801',jdecode('Fotos'),jdecode(''),'/657/98801.html','true',[],'','']
	],'',''],
	['PAGE','94001',jdecode('Welpen-Schule+***neu***'),jdecode(''),'/94001.html','true',[],'',''],
	['PAGE','5001',jdecode('Kurse'),jdecode(''),'/5001.html','true',[],'',''],
	['PAGE','66301',jdecode('Rund+um+den+Hund'),jdecode(''),'/66301.html','true',[],'',''],
	['PAGE','105101',jdecode('Hunde-Horoskop'),jdecode(''),'/105101.html','true',[],'',''],
	['PAGE','158301',jdecode('Ferien+2009'),jdecode(''),'/158301.html','true',[],'',''],
	['PAGE','105801',jdecode('Ferien+2008'),jdecode(''),'/105801.html','true',[],'',''],
	['PAGE','5022',jdecode('Kontakt'),jdecode(''),'/5022.html','true',[],'',''],
	['PAGE','9501',jdecode('links'),jdecode(''),'/9501.html','true',[],'',''],
	['PAGE','19236',jdecode('G%C3%A4stebuch'),jdecode(''),'/19236/index.html','true',[ 
		['PAGE','19231',jdecode('Eintr%C3%A4ge'),jdecode(''),'/19236/19231.html','false',[],'','']
	],'',''],
	['PAGE','118401',jdecode('20%26%23x27%3B758+seit+Juli+07'),jdecode(''),'/118401.html','true',[],'',''],
	['PAGE','126301',jdecode('Fotos'),jdecode(''),'/126301.html','true',[],'',''],
	['PAGE','190201',jdecode('EIGENTUMSWOHNUNG'),jdecode(''),'/190201.html','true',[],'',''],
	['PAGE','197401',jdecode('WM-Quali+2010'),jdecode(''),'/197401.html','true',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Delta';
theSitetree.paletteFamily='080245';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10615';
theSitetree.graphicsetId='10811';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='080245';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Delta',
				paletteFamily: 	'080245',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10615',
				graphicsetId: 	'10811',
				contentColor: 	'FFFFFF',
				contentBGColor: '080245',
				a_color: 		'221785',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-19236abw0x0in2ldn']={
webappId:    '1002',
documentId:  '19236',
internalId:  '19236abw0x0in2ldn',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100829-145233'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127901',
internalId:  '',
customField: '20100105-002216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20090103-124249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20100616-000840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64701',
internalId:  '',
customField: '20100422-145329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55901',
internalId:  '',
customField: '20100615-235852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55922',
internalId:  '',
customField: '20100117-230101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55943',
internalId:  '',
customField: '20100117-230232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20100520-224303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5922',
internalId:  '',
customField: '20100430-003538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55964',
internalId:  '',
customField: '20100424-214645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55985',
internalId:  '',
customField: '20080901-001611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '197401',
internalId:  '',
customField: '20100507-152637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56048',
internalId:  '',
customField: '20100430-003632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56069',
internalId:  '',
customField: '20100501-124047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20090525-233854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48701',
internalId:  '',
customField: '20100829-194106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20100130-103358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20100826-003750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98801',
internalId:  '',
customField: '20080710-000044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94001',
internalId:  '',
customField: '20100110-025334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100713-235141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66301',
internalId:  '',
customField: '20090910-152638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105101',
internalId:  '',
customField: '20090510-224650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105801',
internalId:  '',
customField: '20080901-225657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20100430-002530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20091117-231414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19236',
internalId:  '',
customField: '20070716-141947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19231',
internalId:  '',
customField: '20070716-141743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118401',
internalId:  '',
customField: '20081205-144142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126301',
internalId:  '',
customField: '20100714-001112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138501',
internalId:  '',
customField: '20100829-195834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158301',
internalId:  '',
customField: '20091222-224333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141101',
internalId:  '',
customField: '20100501-123948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181601',
internalId:  '',
customField: '20100829-154339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190201',
internalId:  '',
customField: '20100824-232809'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2LDN';
var companyName   = 'Agilityrun';
var htmlTitle	  = '';
var metaKeywords  = 'Agilitytraining++Baby-Agility+ab+16+Wochen+++Border-Collie++Aussie++Appenzeller++Jack+Russel';
var metaContents  = 'Agilitytraining+f%C3%BCr+Anf%C3%A4nger+und+Fortgeschrittene%2C+Baby-Agility+f%C3%BCr+Junghunde+ab+16+Wochen+bieten+wir+im+Aargau+das+ganze+Jahr+durch+an+%21++Aktuelles+%C3%BCber+unsere+Bordercollies+Blue+und+Haitch%2C+%C3%BCber+den+Aussie+Kiwi+und+die+Appenzellerh%C3%BCndin+Finn+und+nat%C3%BCrlich+%C3%BCber+Inka+und+Jeanny+die+beiden+Jack+Russels+%21%21++Nicht+vergessen%2C+Pudelh%C3%BCndin+Itch+%21';
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();
};
