/* [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','1814',jdecode('Home'),jdecode(''), jdecode('%2F1814.html'), 'true',[],'',''],
	['PAGE','26901',jdecode('Vorstand'),jdecode(''), jdecode('%2F26901.html'), 'true',[],'',''],
	['PAGE','11401',jdecode('Tagesordnung'),jdecode(''), jdecode('%2F11401%2Findex.html'), 'true',[ 
		['PAGE','11422',jdecode('Anmeldeformular'),jdecode(''), jdecode('%2F11401%2F11422.html'), 'true',[],'','']
	],'',''],
	['PAGE','11443',jdecode('Geschichtliches'),jdecode(''), jdecode('%2F11443%2Findex.html'), 'true',[ 
		['PAGE','11464',jdecode('Die+Schlacht+am+Grauholz'),jdecode(''), jdecode('%2F11443%2F11464.html'), 'true',[],'',''],
		['PAGE','11485',jdecode('Das+Grauholzdenkmal'),jdecode(''), jdecode('%2F11443%2F11485.html'), 'true',[],'',''],
		['PAGE','11506',jdecode('Das+Historische+Grauholzschiessen'),jdecode(''), jdecode('%2F11443%2F11506.html'), 'true',[],'','']
	],'',''],
	['PAGE','31312',jdecode('Schiessplan'),jdecode(''), jdecode('%2F31312.html'), 'true',[],'',''],
	['PAGE','31012',jdecode('Allgemeine+Bestimmungen'),jdecode(''), jdecode('%2F31012.html'), 'true',[],'',''],
	['PAGE','30412',jdecode('Auszeichnungen'),jdecode(''), jdecode('%2F30412%2Findex.html'), 'true',[ 
		['PAGE','30112',jdecode('Kranzabzeichen'),jdecode(''), jdecode('%2F30412%2F30112.html'), 'true',[],'',''],
		['PAGE','30512',jdecode('Gruppenauszeichnung'),jdecode(''), jdecode('%2F30412%2F30512.html'), 'true',[],'',''],
		['PAGE','30533',jdecode('Einzelauszeichnung'),jdecode(''), jdecode('%2F30412%2F30533.html'), 'true',[],'','']
	],'',''],
	['PAGE','11527',jdecode('Resultate'),jdecode(''), jdecode('%2F11527%2Findex.html'), 'true',[ 
		['PAGE','11548',jdecode('Resultate+2011'),jdecode(''), jdecode('%2F11527%2F11548.html'), 'true',[],'',''],
		['PAGE','11569',jdecode('Resultate+2010'),jdecode(''), jdecode('%2F11527%2F11569.html'), 'true',[],'',''],
		['PAGE','11590',jdecode('Resultate+2009'),jdecode(''), jdecode('%2F11527%2F11590.html'), 'true',[],'','']
	],'',''],
	['PAGE','11611',jdecode('Galerie'),jdecode(''), jdecode('%2F11611%2Findex.html'), 'true',[ 
		['PAGE','11632',jdecode('Galerie+2011'),jdecode(''), jdecode('%2F11611%2F11632.html'), 'true',[],'',''],
		['PAGE','11653',jdecode('Galerie+2010'),jdecode(''), jdecode('%2F11611%2F11653.html'), 'true',[],'',''],
		['PAGE','11674',jdecode('Galerie+2009'),jdecode(''), jdecode('%2F11611%2F11674.html'), 'true',[],'','']
	],'',''],
	['PAGE','11695',jdecode('Sponsoren'),jdecode(''), jdecode('%2F11695.html'), 'true',[],'',''],
	['PAGE','11716',jdecode('Kontakt'),jdecode(''), jdecode('%2F11716.html'), 'true',[],'',''],
	['PAGE','11737',jdecode('Archiv'),jdecode(''), jdecode('%2F11737.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Artless';
theSitetree.paletteFamily='828282';
theSitetree.keyvisualId='4540';
theSitetree.keyvisualName='kv_4540.jpg';
theSitetree.fontsetId='10795';
theSitetree.graphicsetId='11222';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='828282';
var localeDef={
  language: 'de',
  country: 'DE'
};
var prodDef={
  wl_name: 'dynamicnet',
  product: 'WSCSYSSSSLY0XJJH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Artless',
				paletteFamily: 	'828282',
				keyvisualId: 	'4540',
				keyvisualName: 	'kv_4540.jpg',
				fontsetId: 		'10795',
				graphicsetId: 	'11222',
				contentColor: 	'FFFFFF',
				contentBGColor: '828282',
				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:  '1814',
internalId:  '',
customField: '20111206-144228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11632',
internalId:  '',
customField: '20110418-155726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26901',
internalId:  '',
customField: '20111206-113617'
};
webappMappings['7008']=webappMappings['7008-343']={
webappId:    '7008',
documentId:  '11716',
internalId:  '343',
customField: 'language:de;country:DE;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20111214-081736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11422',
internalId:  '',
customField: '20111124-123610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11443',
internalId:  '',
customField: '20110418-161626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11464',
internalId:  '',
customField: '20110418-161733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11485',
internalId:  '',
customField: '20111110-083447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11506',
internalId:  '',
customField: '20110418-161849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11527',
internalId:  '',
customField: '20110418-164639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11548',
internalId:  '',
customField: '20110418-165136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11569',
internalId:  '',
customField: '20110418-165216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11590',
internalId:  '',
customField: '20110418-165242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11611',
internalId:  '',
customField: '20110418-165329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11653',
internalId:  '',
customField: '20110418-155726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11674',
internalId:  '',
customField: '20110418-155726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11695',
internalId:  '',
customField: '20111206-105755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11716',
internalId:  '',
customField: '20111206-113918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11737',
internalId:  '',
customField: '20110418-155726'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1814',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-689651']={
webappId:    '1501',
documentId:  '1814',
internalId:  '689651',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30112',
internalId:  '',
customField: '20111206-104819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30512',
internalId:  '',
customField: '20111206-110340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30533',
internalId:  '',
customField: '20111206-105433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31012',
internalId:  '',
customField: '20111206-105958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30412',
internalId:  '',
customField: '20111206-113830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31312',
internalId:  '',
customField: '20111206-110829'
};
var webAppHostname = 'cgi-wsc.dynamic-net.ch:80';
var canonHostname = 'wsc.ibone.ch';
var accountId     = 'ADYNN0INX2XI';
var companyName   = '89.+Historisches+Grauholzschiessen';
var htmlTitle	  = 'Historisches+Grauholzschiessen';
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();
};

