/* [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','2301',jdecode('Home'),jdecode(''), jdecode('%2F2301.html'), 'true',[],'',''],
	['PAGE','2541',jdecode('News'),jdecode(''), jdecode('%2F2541.html'), 'true',[],'',''],
	['PAGE','2373',jdecode('m9'),jdecode(''), jdecode('%2F2373.html'), 'true',[],'',''],
	['PAGE','2415',jdecode('Jugendlager'),jdecode(''), jdecode('%2F2415.html'), 'true',[],'',''],
	['PAGE','2436',jdecode('Konflager+St.Georgen'),jdecode(''), jdecode('%2F2436.html'), 'true',[],'',''],
	['PAGE','2457',jdecode('Konflager+Centrum'),jdecode(''), jdecode('%2F2457.html'), 'true',[],'',''],
	['PAGE','2478',jdecode('Jugendtreff+St.+Georgen'),jdecode(''), jdecode('%2F2478.html'), 'true',[],'',''],
	['PAGE','2499',jdecode('Jugendtreff+Rieth%C3%BCsli'),jdecode(''), jdecode('%2F2499.html'), 'true',[],'',''],
	['PAGE','2520',jdecode('Beratung'),jdecode(''), jdecode('%2F2520.html'), 'true',[],'',''],
	['PAGE','2562',jdecode('Wer+sind+wir%3F'),jdecode(''), jdecode('%2F2562.html'), 'true',[],'',''],
	['PAGE','2394',jdecode('Kontakt'),jdecode(''), jdecode('%2F2394.html'), 'true',[],'',''],
	['PAGE','2352',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F2352.html'), 'true',[],'',''],
	['PAGE','7712',jdecode('Fotos'),jdecode(''), jdecode('%2F7712.html'), 'true',[],'',''],
	['PAGE','7912',jdecode('Lageplan+m9'),jdecode(''), jdecode('%2F7912.html'), 'true',[],'',''],
	['PAGE','9312',jdecode('Vermietung+M9%2F+Bar'),jdecode(''), jdecode('%2F9312.html'), 'true',[],'',''],
	['PAGE','12512',jdecode('The+Makers'),jdecode(''), jdecode('%2F12512.html'), 'true',[],'',''],
	['PAGE','17312',jdecode('Kids+Days'),jdecode(''), jdecode('%2F17312.html'), 'true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Heads';
theSitetree.paletteFamily='8688D3';
theSitetree.keyvisualId='7747';
theSitetree.keyvisualName='kv_7747.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: 	'7747',
				keyvisualName: 	'kv_7747.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:  '2562',
internalId:  '',
customField: '20101013-205628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2394',
internalId:  '',
customField: '20101013-205518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2436',
internalId:  '',
customField: '20111026-172106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20111130-125741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2352',
internalId:  '',
customField: '20101013-152906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2457',
internalId:  '',
customField: '20111026-172153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2373',
internalId:  '',
customField: '20111202-110738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2478',
internalId:  '',
customField: '20120104-171855'
};
webappMappings['1002']=webappMappings['1002-2352awb010in2br0']={
webappId:    '1002',
documentId:  '2352',
internalId:  '2352awb010in2br0',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2541',
internalId:  '',
customField: '20120125-145401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2520',
internalId:  '',
customField: '20101013-160003'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2415',
internalId:  '',
customField: '20111124-122121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2499',
internalId:  '',
customField: '20111201-114816'
};
webappMappings['7060']=webappMappings['7060-ebdc46ea346b71b492c4a00fe20353ae']={
webappId:    '7060',
documentId:  '7712',
internalId:  'ebdc46ea346b71b492c4a00fe20353ae',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7912',
internalId:  '',
customField: '20101013-213722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7712',
internalId:  '',
customField: '20101013-213320'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '7912',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['1501']=webappMappings['1501-8553053']={
webappId:    '1501',
documentId:  '2301',
internalId:  '8553053',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9312',
internalId:  '',
customField: '20110615-144157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12512',
internalId:  '',
customField: '20111026-172408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17312',
internalId:  '',
customField: '20111201-114756'
};
var webAppHostname = 'wsc-app.webland.ch:80';
var canonHostname = 'wsc01.webland.ch';
var accountId     = 'AWB010IN2BR0';
var companyName   = 'evang.-ref.+Jugendarbeit+St.Gallen+Centrum';
var htmlTitle	  = 'youngpower.ch';
var metaKeywords  = 'bar+vermieten%2C+jugendtreff%2C+jugendhaus+st.gallen+m9+lager%2C+konfirmanden%2C+erlebnissprogramme%2C+st.georgen';
var metaContents  = 'youngpower+jugendarbeit+st.gallen+evangelisch+lager+jugendtreff+jugendhaus+m9%0D%0A%0D%0Abar+zu+vermieten';
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();
};

