/* [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','601',jdecode('Willkommen'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','652',jdecode('Aktuell%3A+News'),jdecode(''),'/652.html','true',[],'',''],
	['PAGE','757',jdecode('Meine+Vision+'),jdecode(''),'/757.html','true',[],'',''],
	['PAGE','673',jdecode('Engagement%3A+meine+Politik'),jdecode(''),'/673.html','true',[],'',''],
	['PAGE','5601',jdecode('++Von+A-Z'),jdecode(''),'/5601.html','true',[],'',''],
	['PAGE','5622',jdecode('++Parl.+Vorst%C3%B6sse+und+Voten'),jdecode(''),'/5622.html','true',[],'',''],
	['PAGE','38401',jdecode('++Positionierung+im+Zentrum'),jdecode(''),'/38401.html','true',[],'',''],
	['PAGE','715',jdecode('Biographie%3A+Wer+bin+ich'),jdecode(''),'/715.html','true',[],'',''],
	['PAGE','4001',jdecode('Anschauen%3A+Fotoalbum'),jdecode(''),'/4001.html','true',[],'',''],
	['PAGE','694',jdecode('Meine+Artikel+%2B+Referate'),jdecode(''),'/694/index.html','true',[ 
		['PAGE','18101',jdecode('zur+Bildung'),jdecode(''),'/694/18101.html','true',[],'',''],
		['PAGE','18122',jdecode('zum+Klima'),jdecode(''),'/694/18122.html','true',[],'',''],
		['PAGE','49701',jdecode('zum+1.+August'),jdecode(''),'/694/49701.html','true',[],'',''],
		['PAGE','18143',jdecode('aktuelle+Fragen'),jdecode(''),'/694/18143.html','true',[],'',''],
		['PAGE','51801',jdecode('Kolumnen+Tagblatt+Z%C3%BCrich%2C+....'),jdecode(''),'/694/51801.html','true',[],'','']
	],'',''],
	['PAGE','736',jdecode('Kontakt%3A+Schreiben'),jdecode(''),'/736/index.html','true',[ 
		['PAGE','4201',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/736/4201.html','false',[],'','']
	],'',''],
	['PAGE','5201',jdecode('Treffen%3A+Meine+Agenda'),jdecode(''),'/5201.html','true',[],'',''],
	['PAGE','23101',jdecode('Wahl-Komitee'),jdecode(''),'/23101.html','true',[],'',''],
	['PAGE','54901',jdecode('+++Vorwahl-Pressekonferenz+'),jdecode(''),'/54901.html','true',[],'',''],
	['PAGE','26601',jdecode('Meine+Ziele+f%C3%BCr+2008-11'),jdecode(''),'/26601.html','true',[],'',''],
	['PAGE','8401',jdecode('Links+%2B+Medienkorr.'),jdecode(''),'/8401.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10892';
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: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-913534']={
webappId:    '1501',
documentId:  '601',
internalId:  '913534',
customField: '1501'
};
webappMappings['7005']=webappMappings['7005-136']={
webappId:    '7005',
documentId:  '601',
internalId:  '136',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-cfb26677ae1779bb1c1bfe746e2846d9']={
webappId:    '7060',
documentId:  '4001',
internalId:  'cfb26677ae1779bb1c1bfe746e2846d9',
customField: 'language:de;country:CH;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-1532']={
webappId:    '7008',
documentId:  '736',
internalId:  '1532',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20090429-162418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20100906-000802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20070819-103918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20090429-171322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20090519-124649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5622',
internalId:  '',
customField: '20090508-112647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38401',
internalId:  '',
customField: '20080418-230712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20080330-145055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4001',
internalId:  '',
customField: '20070512-123059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20100901-235422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20080418-231620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18122',
internalId:  '',
customField: '20071019-000214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49701',
internalId:  '',
customField: '20070814-231741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18143',
internalId:  '',
customField: '20080330-132506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51801',
internalId:  '',
customField: '20080426-000357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20070818-113300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20070512-122310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100902-000818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20081206-232538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54901',
internalId:  '',
customField: '20070827-234952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20070817-225016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20100906-002722'
};
var canonHostname = 'wsc.genotec.ch';
var accountId     = 'AGT010IN2C3K';
var companyName   = 'KATHY+RIKLIN++++++Liberal-sozial+f%C3%BCr+Z%C3%BCrich';
var htmlTitle	  = 'KATHY+RIKLIN+-+LIBERAL-SOZIAL+F%C3%9CR+Z%C3%9CRICH';
var metaKeywords  = 'Kathy+Riklin+Nationalr%C3%A4tin%2C+Z%C3%BCrich%2C+Dr.sc.nat.+ETH%2C+Parlament%2C+Past-Pr%C3%A4sidentin+Kommission+Wissenschaft%2C+Bildung+und+Kultur%2C+Mitglied+der+Aussenpolitischen+Kommission+APK%2C++EFTA%2FEU-Delegation%2C+Schweiz%2C+T%C3%A4tigkeiten+in+Bern%2C+Universit%C3%A4tsrat+Universit%C3%A4t+Z%C3%BCrich%2C+Bildung%2C+Geologin%2C+Gymnasiallehrerin%2C++Geothermie%2C+VERA%2C+OcCC%2C+pro+natura%2C+ENHK%2C+Winterhilfe++falsche+Schreibweisen+Ricklin+Rickli+Kati+Kathi+Katia+Kathrin+Katrin+Katharina+Katarina+Catarina';
var metaContents  = 'Kathy+Riklin+Nationalr%C3%A4tin%2C+CVP%2C+Z%C3%BCrich%2C+Dr.sc.nat.+ETH%2C+Parlament%2C+past+Pr%C3%A4sidentin+Kommission+Wissenschaft%2C+Bildung+und+Kultur+des+Nationalrates%2C+Mitglied+Universit%C3%A4tsrat+Z%C3%BCrich%2C+Bildung%2C+Geologin%2C+Gymnasiallehrerin%2C++Geothermie%2C+VERA%2C+OcCC%2C+pro+natura%2C+ENHK%2C+Winterhilfe+Schweiz%2C+Bern%2C+falsche+Schreibweisen+Ricklin%2C+Rickli%2C+Rikli';
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();
};
