/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','93601',jdecode('%C3%9Cber+uns'),jdecode(''),'/93601/index.html','true',[ 
		['PAGE','1864',jdecode('Vorstand'),jdecode(''),'/93601/1864.html','true',[],'',''],
		['PAGE','18001',jdecode('Kontakt'),jdecode(''),'/93601/18001.html','true',[],'','']
	],'',''],
	['PAGE','1822',jdecode('Jahresmeisterschaft'),jdecode(''),'/1822/index.html','true',[ 
		['PAGE','94301',jdecode('Bezirksmeisterschaft'),jdecode(''),'/1822/94301.html','true',[],'','']
	],'',''],
	['PAGE','89601',jdecode('Jahresaktivit%C3%A4ten'),jdecode(''),'/89601/index.html','true',[ 
		['PAGE','89622',jdecode('Chlaushock+2010'),jdecode(''),'/89601/89622.html','false',[],'','']
	],'',''],
	['PAGE','32601',jdecode('Bundesprogramme'),jdecode(''),'/32601/index.html','true',[ 
		['PAGE','88001',jdecode('Ranglisten%2FStatistik'),jdecode(''),'/32601/88001.html','true',[],'',''],
		['PAGE','84101',jdecode('Ranglisten+FS+2009'),jdecode(''),'/32601/84101.html','false',[],'',''],
		['PAGE','64701',jdecode('Ranglisten+FS+2008'),jdecode(''),'/32601/64701.html','false',[],'',''],
		['PAGE','51701',jdecode('Ranglisten+FS+2007'),jdecode(''),'/32601/51701.html','false',[],'','']
	],'',''],
	['PAGE','7922',jdecode('Nachwuchs'),jdecode(''),'/7922/index.html','true',[ 
		['PAGE','15901',jdecode('Anmeldung'),jdecode(''),'/7922/15901.html','true',[],'',''],
		['PAGE','46201',jdecode('Ranglisten+JS%2FErfolge'),jdecode(''),'/7922/46201.html','false',[],'',''],
		['PAGE','65501',jdecode('Erfolge%2FRanglisten'),jdecode(''),'/7922/65501.html','true',[],'','']
	],'',''],
	['PAGE','86201',jdecode('Chilbischiessen'),jdecode(''),'/86201/index.html','true',[ 
		['PAGE','82501',jdecode('Chilbischiessen+2011'),jdecode(''),'/86201/82501.html','false',[],'',''],
		['PAGE','92701',jdecode('Ranglisten+2009'),jdecode(''),'/86201/92701.html','true',[],'',''],
		['PAGE','52601',jdecode('Ranglisten+2007'),jdecode(''),'/86201/52601.html','true',[],'','']
	],'',''],
	['PAGE','7964',jdecode('Festzelt'),jdecode(''),'/7964/index.html','true',[ 
		['PAGE','17301',jdecode('Kontakt+Festzelt'),jdecode(''),'/7964/17301.html','true',[],'','']
	],'',''],
	['PAGE','57801',jdecode('Fotos'),jdecode(''),'/57801.html','true',[],'',''],
	['PAGE','36706',jdecode('G%C3%A4stebuch'),jdecode(''),'/36706/index.html','true',[ 
		['PAGE','36701',jdecode('Eintr%C3%A4ge'),jdecode(''),'/36706/36701.html','false',[],'','']
	],'',''],
	['PAGE','28801',jdecode('Download'),jdecode(''),'/28801/index.html','false',[ 
		['PAGE','36201',jdecode('Zeitungsberichte'),jdecode(''),'/28801/36201.html','true',[],'','']
	],'',''],
	['PAGE','1885',jdecode('Links'),jdecode(''),'/1885.html','true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='9240';
theSitetree.keyvisualName='kv2.swf';
theSitetree.fontsetId='17360';
theSitetree.graphicsetId='12763';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'660000',
				keyvisualId: 	'9240',
				keyvisualName: 	'kv2.swf',
				fontsetId: 		'17360',
				graphicsetId: 	'12763',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				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['7008']=webappMappings['7008-1643']={
webappId:    '7008',
documentId:  '18001',
internalId:  '1643',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-1644']={
webappId:    '7008',
documentId:  '15901',
internalId:  '1644',
customField: 'language:de;country:CH;'
};
webappMappings['1501']=webappMappings['1501-6152566']={
webappId:    '1501',
documentId:  '301',
internalId:  '6152566',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92701',
internalId:  '',
customField: '20110424-152312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89622',
internalId:  '',
customField: '20101110-171848'
};
webappMappings['7008']=webappMappings['7008-1645']={
webappId:    '7008',
documentId:  '17301',
internalId:  '1645',
customField: 'language:de;country:CH;'
};
webappMappings['1002']=webappMappings['1002-36706abw0x0in2mpr']={
webappId:    '1002',
documentId:  '36706',
internalId:  '36706abw0x0in2mpr',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1864',
internalId:  '',
customField: '20100428-111623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20110603-224138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1822',
internalId:  '',
customField: '20110424-152135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20090214-144148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88001',
internalId:  '',
customField: '20110603-224941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32601',
internalId:  '',
customField: '20110424-152026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51701',
internalId:  '',
customField: '20080529-102046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64701',
internalId:  '',
customField: '20101213-113023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7922',
internalId:  '',
customField: '20110216-214847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20090713-161849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46201',
internalId:  '',
customField: '20101206-115017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65501',
internalId:  '',
customField: '20101206-144906'
};
webappMappings['7008']=webappMappings['7008-11010']={
webappId:    '7008',
documentId:  '89622',
internalId:  '11010',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86201',
internalId:  '',
customField: '20110216-220419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52601',
internalId:  '',
customField: '20101206-134934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82501',
internalId:  '',
customField: '20090510-101959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84101',
internalId:  '',
customField: '20100607-132548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7964',
internalId:  '',
customField: '20100427-180132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20060913-223454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20080325-180444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1885',
internalId:  '',
customField: '20101213-111257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36201',
internalId:  '',
customField: '20100428-105548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57801',
internalId:  '',
customField: '20071013-165903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36706',
internalId:  '',
customField: '20061114-071207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36701',
internalId:  '',
customField: '20061009-201408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89601',
internalId:  '',
customField: '20110424-152236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93601',
internalId:  '',
customField: '20110216-215841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94301',
internalId:  '',
customField: '20101206-153242'
};
webappMappings['7008']=webappMappings['7008-11310']={
webappId:    '7008',
documentId:  '93601',
internalId:  '11310',
customField: 'language:de;country:CH;'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2MPR';
var companyName   = 'Feldsch%C3%BCtzengesellschaft+Dietwil';
var htmlTitle	  = 'Feldsch%C3%BCtzengesellschaft+Dietwil';
var metaKeywords  = 'FSG+Dietwil%2C+Schiessen%2C+Sch%C3%BCtzen%2C+Gewehr%2C+Stand%2C+Festzelt';
var metaContents  = 'FSG+Dietwil';
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();
};

