/* [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','4477',jdecode('Home'),jdecode(''), jdecode('%2F4477.html'), 'true',[],'',''],
	['PAGE','4534',jdecode('News-Center'),jdecode(''), jdecode('%2F4534%2Findex.html'), 'true',[ 
		['PAGE','4615',jdecode('Club-News'),jdecode(''), jdecode('%2F4534%2F4615.html'), 'true',[],'',''],
		['PAGE','132702',jdecode('News-Archiv'),jdecode(''), jdecode('%2F4534%2F132702.html'), 'true',[],'',''],
		['PAGE','4939',jdecode('Agenda'),jdecode(''), jdecode('%2F4534%2F4939.html'), 'true',[],'',''],
		['PAGE','132529',jdecode('FIFA.com+News'),jdecode(''), jdecode('%2F4534%2F132529.html'), 'true',[],'','']
	],'',''],
	['PAGE','11497',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F11497%2Findex.html'), 'true',[ 
		['PAGE','11524',jdecode('Geschichte'),jdecode(''), jdecode('%2F11497%2F11524.html'), 'true',[],'',''],
		['PAGE','12049',jdecode('Kontakt'),jdecode(''), jdecode('%2F11497%2F12049.html'), 'true',[],'',''],
		['PAGE','4669',jdecode('Vorstand'),jdecode(''), jdecode('%2F11497%2F4669.html'), 'true',[],'',''],
		['PAGE','4831',jdecode('Sponsoren'),jdecode(''), jdecode('%2F11497%2F4831.html'), 'true',[],'',''],
		['PAGE','4777',jdecode('Diverses'),jdecode(''), jdecode('%2F11497%2F4777.html'), 'true',[],'',''],
		['PAGE','11470',jdecode('So+finden+Sie+uns'),jdecode(''), jdecode('%2F11497%2F11470.html'), 'true',[],'','']
	],'',''],
	['PAGE','4696',jdecode('1.+Mannschaft'),jdecode(''), jdecode('%2F4696%2Findex.html'), 'true',[ 
		['PAGE','252717',jdecode('News'),jdecode(''), jdecode('%2F4696%2F252717.html'), 'true',[],'',''],
		['PAGE','28913',jdecode('Portraits'),jdecode(''), jdecode('%2F4696%2F28913.html'), 'true',[],'','']
	],'',''],
	['PAGE','147154',jdecode('Frauen-Team'),jdecode(''), jdecode('%2F147154%2Findex.html'), 'true',[ 
		['PAGE','251217',jdecode('News'),jdecode(''), jdecode('%2F147154%2F251217.html'), 'true',[],'',''],
		['PAGE','243917',jdecode('Portraits'),jdecode(''), jdecode('%2F147154%2F243917.html'), 'true',[],'',''],
		['PAGE','245717',jdecode('Training+und+Spielplan'),jdecode(''), jdecode('%2F147154%2F245717.html'), 'true',[],'',''],
		['PAGE','245738',jdecode('Matchberichte'),jdecode(''), jdecode('%2F147154%2F245738.html'), 'true',[],'','']
	],'',''],
	['PAGE','4723',jdecode('Juniorenabteilung'),jdecode(''), jdecode('%2F4723%2Findex.html'), 'true',[ 
		['PAGE','132812',jdecode('Allgemeine+Infos'),jdecode(''), jdecode('%2F4723%2F132812.html'), 'true',[],'',''],
		['PAGE','132821',jdecode('Junioren+F'),jdecode(''), jdecode('%2F4723%2F132821.html'), 'true',[],'',''],
		['PAGE','132830',jdecode('Junioren+E'),jdecode(''), jdecode('%2F4723%2F132830.html'), 'true',[],'',''],
		['PAGE','132839',jdecode('Junioren+D'),jdecode(''), jdecode('%2F4723%2F132839.html'), 'true',[],'',''],
		['PAGE','132848',jdecode('Junioren+C'),jdecode(''), jdecode('%2F4723%2F132848.html'), 'true',[],'',''],
		['PAGE','132857',jdecode('Junioren+B'),jdecode(''), jdecode('%2F4723%2F132857.html'), 'true',[],'','']
	],'',''],
	['PAGE','134413',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F134413%2Findex.html'), 'true',[ 
		['PAGE','4912',jdecode('Links'),jdecode(''), jdecode('%2F134413%2F4912.html'), 'false',[],'','']
	],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Verve';
theSitetree.paletteFamily='4FA9F4';
theSitetree.keyvisualId='8400';
theSitetree.keyvisualName='kv_8400.jpg';
theSitetree.fontsetId='17072';
theSitetree.graphicsetId='12442';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Verve',
				paletteFamily: 	'4FA9F4',
				keyvisualId: 	'8400',
				keyvisualName: 	'kv_8400.jpg',
				fontsetId: 		'17072',
				graphicsetId: 	'12442',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-85']={
webappId:    '7008',
documentId:  '12049',
internalId:  '85',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4534',
internalId:  '',
customField: '20110714-094408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4615',
internalId:  '',
customField: '20110815-105856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '251217',
internalId:  '',
customField: '20111026-112212'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4477',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-134413ahopt0in3ovn']={
webappId:    '1002',
documentId:  '134413',
internalId:  '134413ahopt0in3ovn',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252717',
internalId:  '',
customField: '20110815-111704'
};
webappMappings['7008']=webappMappings['7008-84']={
webappId:    '7008',
documentId:  '4723',
internalId:  '84',
customField: 'language:de;country:CH;'
};
webappMappings['7090']=webappMappings['7090-19']={
webappId:    '7090',
documentId:  '4534',
internalId:  '19',
customField: 'language:de;country:CH;name:;'
};
webappMappings['7090']=webappMappings['7090-17']={
webappId:    '7090',
documentId:  '132529',
internalId:  '17',
customField: 'language:de;country:CH;name:;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132702',
internalId:  '',
customField: '20080113-105036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4477',
internalId:  '',
customField: '20120112-070809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '243917',
internalId:  '',
customField: '20110825-131922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4939',
internalId:  '',
customField: '20110512-053743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132529',
internalId:  '',
customField: '20090928-201549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11497',
internalId:  '',
customField: '20100202-174126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11524',
internalId:  '',
customField: '20110722-091901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12049',
internalId:  '',
customField: '20100202-173127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4669',
internalId:  '',
customField: '20111026-110817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4831',
internalId:  '',
customField: '20100202-173728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4777',
internalId:  '',
customField: '20100202-174441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11470',
internalId:  '',
customField: '20100202-174541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4696',
internalId:  '',
customField: '20111026-111431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28913',
internalId:  '',
customField: '20100830-143745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147154',
internalId:  '',
customField: '20110902-125006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4723',
internalId:  '',
customField: '20090728-063001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132812',
internalId:  '',
customField: '20110722-091225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132821',
internalId:  '',
customField: '20110729-153421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132830',
internalId:  '',
customField: '20110729-153920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132839',
internalId:  '',
customField: '20110729-154035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132848',
internalId:  '',
customField: '20110729-154330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132857',
internalId:  '',
customField: '20110722-091627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4912',
internalId:  '',
customField: '20100202-175720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134413',
internalId:  '',
customField: '20090507-061540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '245738',
internalId:  '',
customField: '20120112-065827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '245717',
internalId:  '',
customField: '20111026-111951'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3OVN';
var companyName   = 'F+U+S+S+B+A+L+L++++C+L+U+B++++J+E+N+S+++++++++++++++Oberfeld+10++Postfach+26++CH-2565+JENS';
var htmlTitle	  = 'FUSSBALL+CLUB+JENS+++-+++Soo....guet%21+++-+++%C2%A9+2003+-+2011';
var metaKeywords  = 'FC+Jens+Fussball+Football+Seeland+Sportclub+J%C3%A4iss+Sponsoring+Vereinsfussball+Kicken+4.+Liga+Junioren+F+Junioren+E+Junioren+D+Junioren+C+Junioren+B+5.+Liga+Juniorengruppierung%2C+F-Junioren%2C+E-Junioren%2C+D-Junioren%2C+C-Junioren%2C+5er+Fussball+7er+Fussball+9er+Fussball+Tore+Spielfeld+Fussballplatz+Rasen+2565+Jens+M%C3%A4dchenfussball+Kinderfussball+KIFU+FC-Jens+++';
var metaContents  = 'Offizielle+Homepage+des+Fussball+Clubs+Jens+%28Kanton+Bern+%2F+Schweiz%29+Alles+wissenswerte+%C3%BCber+den+Verein+%281.+Mannschaft%2C+Juniorenbewegung%2C+usw.%29%2C+interessante+Links+und+vieles+mehr.+FC+JENS%2C+FC-Jens+Fussballclub+Jens+';
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();
};

