/* [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(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','652',jdecode('Aktuell%3A+News'),jdecode(''), jdecode('%2F652.html'), 'true',[],'',''],
	['PAGE','757',jdecode('Meine+Vision+'),jdecode(''), jdecode('%2F757.html'), 'true',[],'',''],
	['PAGE','673',jdecode('Engagement%3A+meine+Politik'),jdecode(''), jdecode('%2F673.html'), 'true',[],'',''],
	['PAGE','5601',jdecode('++Von+A-Z'),jdecode(''), jdecode('%2F5601.html'), 'true',[],'',''],
	['PAGE','5622',jdecode('++Parl.+Vorst%C3%B6sse+und+Voten'),jdecode(''), jdecode('%2F5622.html'), 'true',[],'',''],
	['PAGE','38401',jdecode('++Positionierung+im+Zentrum'),jdecode(''), jdecode('%2F38401.html'), 'true',[],'',''],
	['PAGE','715',jdecode('Biographie%3A+Wer+bin+ich'),jdecode(''), jdecode('%2F715.html'), 'true',[],'',''],
	['PAGE','4001',jdecode('Anschauen%3A+Fotoalbum'),jdecode(''), jdecode('%2F4001.html'), 'true',[],'',''],
	['PAGE','694',jdecode('Meine+Artikel+%2B+Referate'),jdecode(''), jdecode('%2F694%2Findex.html'), 'true',[ 
		['PAGE','18101',jdecode('zur+Bildung'),jdecode(''), jdecode('%2F694%2F18101.html'), 'true',[],'',''],
		['PAGE','18122',jdecode('zu+Klima+und+Energie'),jdecode(''), jdecode('%2F694%2F18122.html'), 'true',[],'',''],
		['PAGE','104501',jdecode('Aussenpolitik%3A+EU+%2B'),jdecode(''), jdecode('%2F694%2F104501.html'), 'true',[],'',''],
		['PAGE','49701',jdecode('zum+1.+August'),jdecode(''), jdecode('%2F694%2F49701.html'), 'true',[],'',''],
		['PAGE','18143',jdecode('aktuelle+Fragen'),jdecode(''), jdecode('%2F694%2F18143.html'), 'true',[],'',''],
		['PAGE','51801',jdecode('Kolumnen+Tagblatt+Z%C3%BCrich%2C+....'),jdecode(''), jdecode('%2F694%2F51801.html'), 'true',[],'','']
	],'',''],
	['PAGE','736',jdecode('Kontakt%3A+Schreiben'),jdecode(''), jdecode('%2F736%2Findex.html'), 'true',[ 
		['PAGE','4201',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''), jdecode('%2F736%2F4201.html'), 'false',[],'','']
	],'',''],
	['PAGE','5201',jdecode('Treffen%3A+Meine+Agenda'),jdecode(''), jdecode('%2F5201.html'), 'true',[],'',''],
	['PAGE','23101',jdecode('Wahl-Komitee'),jdecode(''), jdecode('%2F23101.html'), 'true',[],'',''],
	['PAGE','54901',jdecode('++2007+Vorwahl-Pressekonferenz'),jdecode(''), jdecode('%2F54901.html'), 'true',[],'',''],
	['PAGE','26601',jdecode('Meine+Ziele+f%C3%BCr+2008-11'),jdecode(''), jdecode('%2F26601.html'), 'true',[],'',''],
	['PAGE','8401',jdecode('Links+%2B+Medienkorr.'),jdecode(''), jdecode('%2F8401.html'), 'true',[],'','']];
var siteelementCount=23;
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 prodDef={
  wl_name: 'genotec',
  product: 'WSCSYSSSSLYTCP0Y'
};
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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104501',
internalId:  '',
customField: '20110613-000337'
};
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: '20111105-181806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20111105-182513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20070819-103918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20110918-182047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20110918-181919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5622',
internalId:  '',
customField: '20111002-232206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38401',
internalId:  '',
customField: '20111002-212048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20100909-115726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4001',
internalId:  '',
customField: '20070512-123059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20111105-185827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20100908-201938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18122',
internalId:  '',
customField: '20110613-003825'
};
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: '20111105-185156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20111104-001028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54901',
internalId:  '',
customField: '20111104-001136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20070817-225016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20110612-234959'
};
var webAppHostname = 'cgi.wsc.genotec.ch:80';
var canonHostname = 'wsc.genotec.ch';
var accountId     = 'AGT010IN2C3K';
var companyName   = 'KATHY+RIKLIN++++++Liberal-sozial+f%C3%BCr+Z%C3%BCrich';
var htmlTitle	  = 'KATHY+RIKLIN++CVP+-+LIBERAL-SOZIAL+F%C3%9CR+Z%C3%9CRICH';
var metaKeywords  = 'Kathy+Riklin%2C+Nationalr%C3%A4tin+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%2C+Nationalr%C3%A4tin+CVP+Z%C3%BCrich%2C+Dr.sc.nat.+ETH%2C+Past-Pr%C3%A4sidentin+Kommission+Wissenschaft%2C+Bildung+und+Kultur+des+Nationalrates%2C+Mitglied+Universit%C3%A4tsrat+Z%C3%BCrich%2C+%0D%0A%0D%0AGeologin%2C+ehem.+Gymnasiallehrerin%2C+Prorektorin.%0D%0A%0D%0APr%C3%A4sidentin+der+Schweizerischen+Vereinigung+f%C3%BCr++Geothermie%2C+%0D%0A%0D%0APr%C3%A4sidentin+Forum+VERA%2C+Pr%C3%A4sidentin+Winterhilfe+Kanton+Z%C3%BCrich%2C%0D%0A%0D%0APr%C3%A4sidentin+des+beratenden+Organs+f%C3%BCr+Fragen+der+Klima%C3%A4nderung+OcCC%2C+%0D%0A%0D%0AVorstand+pro+natura%2C+ehem.+Pr%C3%A4sidentin+der+ENHK.%0D%0A%0D%0Afalsche+Schreibweisen%3A+Katia+Kati+Kathrin+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();
};

