/* [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','1546',jdecode('Home'),jdecode(''), jdecode('%2F1546.html'), 'true',[],'',''],
	['PAGE','2922',jdecode('Jahresprogramm+DTV'),jdecode(''), jdecode('%2F2922.html'), 'true',[],'',''],
	['PAGE','2901',jdecode('Turnprogramm+DTV'),jdecode(''), jdecode('%2F2901.html'), 'true',[],'',''],
	['PAGE','30201',jdecode('%C3%BCber+uns'),jdecode(''), jdecode('%2F30201%2Findex.html'), 'true',[ 
		['PAGE','6201',jdecode('LeiterInnen-Team'),jdecode(''), jdecode('%2F30201%2F6201.html'), 'true',[],'',''],
		['PAGE','3132',jdecode('Kontaktadressen+Leitende'),jdecode(''), jdecode('%2F30201%2F3132.html'), 'true',[],'',''],
		['PAGE','30222',jdecode('unser+Vorstand'),jdecode(''), jdecode('%2F30201%2F30222.html'), 'true',[],'','']
	],'',''],
	['PAGE','17401',jdecode('NEWS'),jdecode(''), jdecode('%2F17401.html'), 'true',[],'',''],
	['PAGE','2943',jdecode('unsere+Aktivgruppen...'),jdecode(''), jdecode('%2F2943%2Findex.html'), 'true',[ 
		['PAGE','2985',jdecode('ElKi'),jdecode(''), jdecode('%2F2943%2F2985.html'), 'true',[],'',''],
		['PAGE','2964',jdecode('KiTu'),jdecode(''), jdecode('%2F2943%2F2964.html'), 'true',[],'',''],
		['PAGE','27201',jdecode('Kidsdance'),jdecode(''), jdecode('%2F2943%2F27201.html'), 'true',[],'',''],
		['PAGE','3006',jdecode('Jugimix+US%2FOS'),jdecode(''), jdecode('%2F2943%2F3006.html'), 'true',[],'',''],
		['PAGE','3048',jdecode('aktive+DTV'),jdecode(''), jdecode('%2F2943%2F3048.html'), 'true',[],'',''],
		['PAGE','3027',jdecode('Volleyball+4.+Liga'),jdecode(''), jdecode('%2F2943%2F3027.html'), 'true',[],'',''],
		['PAGE','4801',jdecode('Volleyball+Seniorinnen'),jdecode(''), jdecode('%2F2943%2F4801.html'), 'true',[],'','']
	],'',''],
	['PAGE','1598',jdecode('Fotos+2011%2B2010'),jdecode(''), jdecode('%2F1598%2Findex.html'), 'true',[ 
		['PAGE','40301',jdecode('DTV-Wanderung+2011'),jdecode(''), jdecode('%2F1598%2F40301.html'), 'true',[],'',''],
		['PAGE','39801',jdecode('Fotos+Jugi+OL+2011'),jdecode(''), jdecode('%2F1598%2F39801.html'), 'true',[],'',''],
		['PAGE','19101',jdecode('MTV-DTV-Anlass+Juli+2011'),jdecode(''), jdecode('%2F1598%2F19101.html'), 'true',[],'',''],
		['PAGE','35901',jdecode('Sponsorenlauf+Jugend+2011'),jdecode(''), jdecode('%2F1598%2F35901.html'), 'true',[],'',''],
		['PAGE','33201',jdecode('Brunch+2011'),jdecode(''), jdecode('%2F1598%2F33201.html'), 'true',[],'',''],
		['PAGE','15901',jdecode('Skiweekend+Hornflueh+2011'),jdecode(''), jdecode('%2F1598%2F15901.html'), 'true',[],'',''],
		['PAGE','19601',jdecode('Sponsorenlauf+2010'),jdecode(''), jdecode('%2F1598%2F19601.html'), 'true',[],'',''],
		['PAGE','18701',jdecode('Br%C3%B6tliabend+2010'),jdecode(''), jdecode('%2F1598%2F18701.html'), 'true',[],'',''],
		['PAGE','23101',jdecode('Sol.+Walking-Event+2010'),jdecode(''), jdecode('%2F1598%2F23101.html'), 'true',[],'','']
	],'',''],
	['PAGE','1577',jdecode('unser+Verein'),jdecode(''), jdecode('%2F1577.html'), 'true',[],'',''],
	['PAGE','1651',jdecode('e-mail+Kontakt'),jdecode(''), jdecode('%2F1651.html'), 'true',[],'',''],
	['PAGE','13001',jdecode('Vermietung+von...'),jdecode(''), jdecode('%2F13001.html'), 'true',[],'',''],
	['PAGE','3111',jdecode('unsere+Sponsoren'),jdecode(''), jdecode('%2F3111.html'), 'true',[],'',''],
	['PAGE','1630',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F1630.html'), 'true',[],'',''],
	['PAGE','13501',jdecode('Links'),jdecode(''), jdecode('%2F13501.html'), 'true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Heads';
theSitetree.paletteFamily='8688D3';
theSitetree.keyvisualId='7759';
theSitetree.keyvisualName='kv_7759.jpg';
theSitetree.fontsetId='16792';
theSitetree.graphicsetId='12270';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='BCBDED';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'webland',
  product: 'WSCSYSSSSLY0XFFS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Heads',
				paletteFamily: 	'8688D3',
				keyvisualId: 	'7759',
				keyvisualName: 	'kv_7759.jpg',
				fontsetId: 		'16792',
				graphicsetId: 	'12270',
				contentColor: 	'000000',
				contentBGColor: 'BCBDED',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20100712-184838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2922',
internalId:  '',
customField: '20111105-181949'
};
webappMappings['7002']=webappMappings['7002-6974']={
webappId:    '7002',
documentId:  '1630',
internalId:  '6974',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-7935']={
webappId:    '7008',
documentId:  '1651',
internalId:  '7935',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1546',
internalId:  '',
customField: '20111105-181335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1577',
internalId:  '',
customField: '20110606-220018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1598',
internalId:  '',
customField: '20100615-221128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20111105-180610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1630',
internalId:  '',
customField: '20100503-210844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1651',
internalId:  '',
customField: '20100511-220525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20100915-173344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20110329-213242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20111116-191907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2943',
internalId:  '',
customField: '20110606-215035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33201',
internalId:  '',
customField: '20110515-142449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3111',
internalId:  '',
customField: '20111105-180408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3132',
internalId:  '',
customField: '20111116-191646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40301',
internalId:  '',
customField: '20111010-212835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3027',
internalId:  '',
customField: '20110816-220420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20111116-193035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2964',
internalId:  '',
customField: '20110828-182447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2985',
internalId:  '',
customField: '20110828-183150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3006',
internalId:  '',
customField: '20111105-181209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3048',
internalId:  '',
customField: '20100511-222634'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1546',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20111116-192006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20111116-191147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20100516-190632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20110717-125158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19601',
internalId:  '',
customField: '20100718-230648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27201',
internalId:  '',
customField: '20101228-152533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30201',
internalId:  '',
customField: '20110122-175354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30222',
internalId:  '',
customField: '20110823-220145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20110717-140852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39801',
internalId:  '',
customField: '20110925-211014'
};
webappMappings['1501']=webappMappings['1501-11917446']={
webappId:    '1501',
documentId:  '1546',
internalId:  '11917446',
customField: '1501'
};
var webAppHostname = 'wsc-app.webland.ch:80';
var canonHostname = 'wsc02.webland.ch';
var accountId     = 'AWB010IN2RX4';
var companyName   = '';
var htmlTitle	  = 'DTV+Riedholz';
var metaKeywords  = 'Aerobic%2C+Step-Aerobic%2C+Jazzercise%2C+Jugimix%2C+KITU%2C+ELKI%2C+KITU';
var metaContents  = 'Aerobic%2C+Step-Aerobic%2C+Jazzercise%2C+Jugimix%2C+KITU%2C+ELKI%2C+KITU';
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();
};

