/* [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(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','254601',jdecode('News+2012'),jdecode(''), jdecode('%2F254601%2Findex.html'), 'true',[ 
		['PAGE','224901',jdecode('Archiv+2011'),jdecode(''), jdecode('%2F254601%2F224901.html'), 'true',[],'',''],
		['PAGE','181601',jdecode('ARCHIV+2010'),jdecode(''), jdecode('%2F254601%2F181601.html'), 'true',[],'',''],
		['PAGE','615',jdecode('Archiv'),jdecode(''), jdecode('%2F254601%2F615.html'), 'true',[],'',''],
		['PAGE','127901',jdecode('Archiv+2009'),jdecode(''), jdecode('%2F254601%2F127901.html'), 'true',[],'','']
	],'',''],
	['PAGE','573',jdecode('Nicole+und+Rolf'),jdecode(''), jdecode('%2F573.html'), 'true',[],'',''],
	['PAGE','226801',jdecode('%C3%9Cber+uns'),jdecode(''), jdecode('%2F226801.html'), 'true',[],'',''],
	['PAGE','64701',jdecode('Unsere+Hunde'),jdecode(''), jdecode('%2F64701%2Findex.html'), 'true',[ 
		['PAGE','55901',jdecode('Zidane'),jdecode(''), jdecode('%2F64701%2F55901.html'), 'true',[],'',''],
		['PAGE','55922',jdecode('Kiwi'),jdecode(''), jdecode('%2F64701%2F55922.html'), 'true',[],'',''],
		['PAGE','55943',jdecode('Blue'),jdecode(''), jdecode('%2F64701%2F55943.html'), 'true',[],'',''],
		['PAGE','138501',jdecode('Flash'),jdecode(''), jdecode('%2F64701%2F138501.html'), 'true',[],'',''],
		['PAGE','232601',jdecode('Ace'),jdecode(''), jdecode('%2F64701%2F232601.html'), 'true',[],'',''],
		['PAGE','26601',jdecode('In+Memoriam+Ajsha'),jdecode(''), jdecode('%2F64701%2F26601.html'), 'true',[],'','']
	],'',''],
	['PAGE','5901',jdecode('Petra+'),jdecode(''), jdecode('%2F5901.html'), 'true',[],'',''],
	['PAGE','5922',jdecode('Petra%26%23x27%3Bs+Hunde'),jdecode(''), jdecode('%2F5922%2Findex.html'), 'true',[ 
		['PAGE','55964',jdecode('Jeanny'),jdecode(''), jdecode('%2F5922%2F55964.html'), 'true',[],'',''],
		['PAGE','55985',jdecode('Inka'),jdecode(''), jdecode('%2F5922%2F55985.html'), 'true',[],'',''],
		['PAGE','56069',jdecode('Aitch'),jdecode(''), jdecode('%2F5922%2F56069.html'), 'true',[],'',''],
		['PAGE','141101',jdecode('Patch'),jdecode(''), jdecode('%2F5922%2F141101.html'), 'true',[],'',''],
		['PAGE','230401',jdecode('H%26%23x27%3BIry'),jdecode(''), jdecode('%2F5922%2F230401.html'), 'true',[],'','']
	],'',''],
	['PAGE','48701',jdecode('Videos'),jdecode(''), jdecode('%2F48701.html'), 'true',[],'',''],
	['PAGE','636',jdecode('Agilitytrainig'),jdecode(''), jdecode('%2F636.html'), 'true',[],'',''],
	['PAGE','657',jdecode('Baby-Agility'),jdecode(''), jdecode('%2F657%2Findex.html'), 'true',[ 
		['PAGE','98801',jdecode('Fotos'),jdecode(''), jdecode('%2F657%2F98801.html'), 'true',[],'','']
	],'',''],
	['PAGE','5001',jdecode('Kurse'),jdecode(''), jdecode('%2F5001.html'), 'true',[],'',''],
	['PAGE','234101',jdecode('JUNGHUNDE-KURS'),jdecode(''), jdecode('%2F234101.html'), 'true',[],'',''],
	['PAGE','66301',jdecode('Rund+um+den+Hund'),jdecode(''), jdecode('%2F66301.html'), 'true',[],'',''],
	['PAGE','105101',jdecode('Hunde-Horoskop'),jdecode(''), jdecode('%2F105101.html'), 'true',[],'',''],
	['PAGE','217101',jdecode('Ferien+Korsika+2010'),jdecode(''), jdecode('%2F217101.html'), 'true',[],'',''],
	['PAGE','158301',jdecode('Ferien+2009'),jdecode(''), jdecode('%2F158301.html'), 'true',[],'',''],
	['PAGE','105801',jdecode('Ferien+2008'),jdecode(''), jdecode('%2F105801.html'), 'true',[],'',''],
	['PAGE','5022',jdecode('Kontakt'),jdecode(''), jdecode('%2F5022.html'), 'true',[],'',''],
	['PAGE','9501',jdecode('links'),jdecode(''), jdecode('%2F9501.html'), 'true',[],'',''],
	['PAGE','19236',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F19236%2Findex.html'), 'true',[ 
		['PAGE','19231',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F19236%2F19231.html'), 'false',[],'','']
	],'',''],
	['PAGE','118401',jdecode('28%26%23x27%3B737+seit+Juli+07'),jdecode(''), jdecode('%2F118401.html'), 'true',[],'',''],
	['PAGE','126301',jdecode('Fotos'),jdecode(''), jdecode('%2F126301.html'), 'true',[],'',''],
	['PAGE','197401',jdecode('WM-Quali+2010'),jdecode(''), jdecode('%2F197401.html'), 'true',[],'',''],
	['PAGE','253601',jdecode('Weihnachten+2011'),jdecode(''), jdecode('%2F253601.html'), 'true',[],'','']];
var siteelementCount=41;
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 prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
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: '20120130-000732'
};
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: '20110614-000248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64701',
internalId:  '',
customField: '20120111-230040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55901',
internalId:  '',
customField: '20111204-194116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55922',
internalId:  '',
customField: '20111204-194244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55943',
internalId:  '',
customField: '20111204-194403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20110831-163646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5922',
internalId:  '',
customField: '20120111-230901'
};
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:  '217101',
internalId:  '',
customField: '20100921-184948'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '253601',
internalId:  '-',
customField: '20111220-233859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56069',
internalId:  '',
customField: '20110831-163733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20090525-233854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48701',
internalId:  '',
customField: '20111109-162506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20110830-184930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20120102-032312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98801',
internalId:  '',
customField: '20080710-000044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '224901',
internalId:  '',
customField: '20111212-165202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20111020-001602'
};
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: '20110919-223043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20110616-213501'
};
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: '20110810-163849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138501',
internalId:  '',
customField: '20111204-194858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158301',
internalId:  '',
customField: '20091222-224333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141101',
internalId:  '',
customField: '20111220-233312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181601',
internalId:  '',
customField: '20101031-215015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '226801',
internalId:  '',
customField: '20110121-185031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '230401',
internalId:  '',
customField: '20111220-233237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '232601',
internalId:  '',
customField: '20120130-000712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '234101',
internalId:  '',
customField: '20110426-230616'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '254601',
internalId:  '-',
customField: '20120129-234643'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
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();
};

