/* [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','15301',jdecode('Home'),jdecode(''), jdecode('%2F15301%2Findex.html'), 'true',[ 
		['PAGE','37022',jdecode('Vorstand'),jdecode(''), jdecode('%2F15301%2F37022.html'), 'true',[],'',''],
		['PAGE','37043',jdecode('Unsere+Aktiven'),jdecode(''), jdecode('%2F15301%2F37043.html'), 'true',[],'',''],
		['PAGE','37385',jdecode('Kontakt+%2F+Anfahrtsplan'),jdecode(''), jdecode('%2F15301%2F37385.html'), 'true',[],'','']
	],'',''],
	['PAGE','37064',jdecode('Aktuelles'),jdecode(''), jdecode('%2F37064.html'), 'true',[],'',''],
	['PAGE','37085',jdecode('Trainigszeiten'),jdecode(''), jdecode('%2F37085.html'), 'true',[],'',''],
	['PAGE','169923',jdecode('Schutzdienst'),jdecode(''), jdecode('%2F169923.html'), 'true',[],'',''],
	['PAGE','37148',jdecode('Jahresprogramm'),jdecode(''), jdecode('%2F37148.html'), 'true',[],'',''],
	['PAGE','37106',jdecode('Kurse%3A+EK+und+SKN'),jdecode(''), jdecode('%2F37106.html'), 'true',[],'',''],
	['PAGE','37169',jdecode('Fotogalerie'),jdecode(''), jdecode('%2F37169%2Findex.html'), 'true',[ 
		['PAGE','159923',jdecode('Boxercup+13.11.2011'),jdecode(''), jdecode('%2F37169%2F159923.html'), 'true',[],'',''],
		['PAGE','143001',jdecode('JSZ+19.06.2011'),jdecode(''), jdecode('%2F37169%2F143001.html'), 'true',[],'',''],
		['PAGE','138701',jdecode('Intensiv-Weekend+2011'),jdecode(''), jdecode('%2F37169%2F138701.html'), 'true',[],'',''],
		['PAGE','128501',jdecode('Putz-+%2B+Renovationstag'),jdecode(''), jdecode('%2F37169%2F128501.html'), 'true',[],'',''],
		['PAGE','127001',jdecode('Training+02.04.2011'),jdecode(''), jdecode('%2F37169%2F127001.html'), 'true',[],'',''],
		['PAGE','104001',jdecode('Training+21.11.2010'),jdecode(''), jdecode('%2F37169%2F104001.html'), 'true',[],'','']
	],'',''],
	['PAGE','83001',jdecode('Geschichte+des+Boxers'),jdecode(''), jdecode('%2F83001.html'), 'true',[],'',''],
	['PAGE','37322',jdecode('Boxershop'),jdecode(''), jdecode('%2F37322.html'), 'true',[],'',''],
	['PAGE','37343',jdecode('Links'),jdecode(''), jdecode('%2F37343.html'), 'true',[],'',''],
	['PAGE','37364',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F37364.html'), 'true',[],'',''],
	['PAGE','37406',jdecode('Kontaktformular'),jdecode(''), jdecode('%2F37406.html'), 'true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Grid';
theSitetree.paletteFamily='819ECE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16762';
theSitetree.graphicsetId='12259';
theSitetree.contentColor='4B4B4B';
theSitetree.contentBGColor='819ECE';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLY0X93U'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Grid',
				paletteFamily: 	'819ECE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16762',
				graphicsetId: 	'12259',
				contentColor: 	'4B4B4B',
				contentBGColor: '819ECE',
				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:  '15301',
internalId:  '',
customField: '20120220-190925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37043',
internalId:  '',
customField: '20120219-151950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37064',
internalId:  '',
customField: '20111124-072507'
};
webappMappings['1002']=webappMappings['1002-37364ahp340invypf']={
webappId:    '1002',
documentId:  '37364',
internalId:  '37364ahp340invypf',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-3760']={
webappId:    '7008',
documentId:  '37406',
internalId:  '3760',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37085',
internalId:  '',
customField: '20120219-175748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37106',
internalId:  '',
customField: '20110825-133154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37385',
internalId:  '',
customField: '20110130-113627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37022',
internalId:  '',
customField: '20111010-060437'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '15301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37148',
internalId:  '',
customField: '20120213-140241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37406',
internalId:  '',
customField: '20101011-083054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37169',
internalId:  '',
customField: '20111114-092741'
};
webappMappings['7060']=webappMappings['7060-c7f9d6c2c8d3dce7b1aaed9533184552']={
webappId:    '7060',
documentId:  '127001',
internalId:  'c7f9d6c2c8d3dce7b1aaed9533184552',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37322',
internalId:  '',
customField: '20101109-183627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37343',
internalId:  '',
customField: '20110201-185916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37364',
internalId:  '',
customField: '20101109-162635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83001',
internalId:  '',
customField: '20101130-133014'
};
webappMappings['7060']=webappMappings['7060-48728a5a4302fe4e9ec8bcbcea2b71e1']={
webappId:    '7060',
documentId:  '104001',
internalId:  '48728a5a4302fe4e9ec8bcbcea2b71e1',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104001',
internalId:  '',
customField: '20110404-064907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127001',
internalId:  '',
customField: '20110404-064623'
};
webappMappings['7060']=webappMappings['7060-4395bff672bc63c02025d170b36db432']={
webappId:    '7060',
documentId:  '128501',
internalId:  '4395bff672bc63c02025d170b36db432',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128501',
internalId:  '',
customField: '20110501-193952'
};
webappMappings['7060']=webappMappings['7060-31ca75a28e4d198fbb0732ccce3547e9']={
webappId:    '7060',
documentId:  '138701',
internalId:  '31ca75a28e4d198fbb0732ccce3547e9',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138701',
internalId:  '',
customField: '20110610-133422'
};
webappMappings['7060']=webappMappings['7060-e7630b30d56d0a2933b64806bba2cbea']={
webappId:    '7060',
documentId:  '143001',
internalId:  'e7630b30d56d0a2933b64806bba2cbea',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143001',
internalId:  '',
customField: '20110629-185006'
};
webappMappings['7060']=webappMappings['7060-8c9c3d7b00004c11fed2990665aef031']={
webappId:    '7060',
documentId:  '159923',
internalId:  '8c9c3d7b00004c11fed2990665aef031',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159923',
internalId:  '',
customField: '20111120-123536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169923',
internalId:  '',
customField: '20120219-182019'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHP340INVYPF';
var companyName   = 'Schweizerischer+Boxerclub+OG+Z%C3%BCrich';
var htmlTitle	  = 'Boxerclub';
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();
};

