/* [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','1435',jdecode('Home'),jdecode(''),'/1435.html','true',[],'',''],
	['PAGE','13901',jdecode('Der+Liberal+Award+2009'),jdecode(''),'/13901.html','true',[],'',''],
	['PAGE','1492',jdecode('Der+Liberal+Award+-+Die+Idee'),jdecode(''),'/1492.html','true',[],'',''],
	['PAGE','1519',jdecode('Die+bisherigen+Preistr%C3%A4ger'),jdecode(''),'/1519/index.html','true',[ 
		['PAGE','1546',jdecode('2000%3A+Ernst+Buschor'),jdecode(''),'/1519/1546.html','true',[],'',''],
		['PAGE','1573',jdecode('2001%3A+Klaus+Schwab'),jdecode(''),'/1519/1573.html','true',[],'',''],
		['PAGE','1600',jdecode('2002%3A+Roger+Schawinski'),jdecode(''),'/1519/1600.html','true',[],'',''],
		['PAGE','1627',jdecode('2003%3A+Pascal+Couchepin'),jdecode(''),'/1519/1627.html','true',[],'',''],
		['PAGE','1654',jdecode('2004%3A+Roger+K%C3%B6ppel'),jdecode(''),'/1519/1654.html','true',[],'',''],
		['PAGE','4601',jdecode('2005%3A+Aargauer+Regierung'),jdecode(''),'/1519/4601.html','true',[],'',''],
		['PAGE','10901',jdecode('2006%3A+Obwaldner+Bev%C3%B6lkerung'),jdecode(''),'/1519/10901.html','true',[],'',''],
		['PAGE','7601',jdecode('2007%3A+Karl-Heinz+Grasser'),jdecode(''),'/1519/7601.html','true',[],'',''],
		['PAGE','15401',jdecode('2008%3A+Held%2C+Kappeler%2C+J%C3%A4ger'),jdecode(''),'/1519/15401.html','true',[],'','']
	],'',''],
	['PAGE','3528',jdecode('Liberal+Award+-+Die+Bilder'),jdecode(''),'/3528.html','true',[],'',''],
	['PAGE','5801',jdecode('Wer+dahinter+steht'),jdecode(''),'/5801.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='D72B2B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10893';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'D72B2B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10893',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D72B2B',
				e_color: 		'D72B2B',
				f_color: 		'D72B2B',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-d1796874285a863d4e94093bc5b15265']={
webappId:    '7060',
documentId:  '3528',
internalId:  'd1796874285a863d4e94093bc5b15265',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20091111-122010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1435',
internalId:  '',
customField: '20091111-120950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1492',
internalId:  '',
customField: '20070720-140102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1519',
internalId:  '',
customField: '20091111-122150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1546',
internalId:  '',
customField: '20050825-103302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1573',
internalId:  '',
customField: '20050825-103130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1600',
internalId:  '',
customField: '20041004-165603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1627',
internalId:  '',
customField: '20041004-165612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1654',
internalId:  '',
customField: '20050815-161429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20061029-122949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20070719-111811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20081020-231247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3528',
internalId:  '',
customField: '20041023-160056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20091111-122246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20091109-111750'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'Ahp010IN2NP6';
var companyName   = 'Liberal+Award';
var htmlTitle	  = 'Liberal+Award';
var metaKeywords  = 'Liberal+Jungfreisinnige+JFZH+Couchepin+K%EF%BF%BDppel+Schawinski+Schwab+Buschor+Politik';
var metaContents  = 'Liberal+Award+-+Jungfreisinniger+Preis+f%EF%BF%BDr+liberale+Pers%EF%BF%BDnlichkeiten';
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();
};
