/* [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','4599',jdecode('Home'),jdecode(''), jdecode('%2F4599.html'), 'true',[],'',''],
	['PAGE','4710',jdecode('Pers%C3%B6nliche+Daten'),jdecode(''), jdecode('%2F4710.html'), 'true',[],'',''],
	['PAGE','201412',jdecode('Politik'),jdecode(''), jdecode('%2F201412%2Findex.html'), 'true',[ 
		['PAGE','306912',jdecode('Asylpolitik'),jdecode(''), jdecode('%2F201412%2F306912.html'), 'true',[],'',''],
		['PAGE','234812',jdecode('Bildung'),jdecode(''), jdecode('%2F201412%2F234812.html'), 'true',[],'',''],
		['PAGE','15602',jdecode('Die+Frau+heute'),jdecode(''), jdecode('%2F201412%2F15602.html'), 'true',[],'',''],
		['PAGE','242012',jdecode('Elternschaftsurlaub'),jdecode(''), jdecode('%2F201412%2F242012.html'), 'true',[],'',''],
		['PAGE','495412',jdecode('Europapolitik'),jdecode(''), jdecode('%2F201412%2F495412.html'), 'true',[],'',''],
		['PAGE','241212',jdecode('Familien+entlasten'),jdecode(''), jdecode('%2F201412%2F241212.html'), 'true',[],'',''],
		['PAGE','23206',jdecode('Gesundheitspolitik'),jdecode(''), jdecode('%2F201412%2F23206.html'), 'true',[],'',''],
		['PAGE','166112',jdecode('Kind+und+Internet'),jdecode(''), jdecode('%2F201412%2F166112.html'), 'true',[],'',''],
		['PAGE','285712',jdecode('Klima+und+Energie'),jdecode(''), jdecode('%2F201412%2F285712.html'), 'true',[],'',''],
		['PAGE','229812',jdecode('KMU'),jdecode(''), jdecode('%2F201412%2F229812.html'), 'true',[],'',''],
		['PAGE','4656',jdecode('Liberal-Sozial'),jdecode(''), jdecode('%2F201412%2F4656.html'), 'true',[],'',''],
		['PAGE','150630',jdecode('Stillen+'),jdecode(''), jdecode('%2F201412%2F150630.html'), 'true',[],'',''],
		['PAGE','388212',jdecode('V%C3%B6lkerrecht'),jdecode(''), jdecode('%2F201412%2F388212.html'), 'true',[],'','']
	],'',''],
	['PAGE','133642',jdecode('Abstimmungen'),jdecode(''), jdecode('%2F133642.html'), 'true',[],'',''],
	['PAGE','314833',jdecode('Blog'),jdecode(''), jdecode('%2F314833.html'), 'true',[],'',''],
	['PAGE','31106',jdecode('Soziales+Engagement'),jdecode(''), jdecode('%2F31106%2Findex.html'), 'true',[ 
		['PAGE','623656',jdecode('SRK+Kanton+Z%C3%BCrich+'),jdecode(''), jdecode('%2F31106%2F623656.html'), 'true',[],'',''],
		['PAGE','248212',jdecode('Kinderhilfe+Bethlehem'),jdecode(''), jdecode('%2F31106%2F248212.html'), 'true',[],'',''],
		['PAGE','248233',jdecode('IGFM'),jdecode(''), jdecode('%2F31106%2F248233.html'), 'true',[],'','']
	],'',''],
	['PAGE','360912',jdecode('Medien'),jdecode(''), jdecode('%2F360912%2Findex.html'), 'true',[ 
		['PAGE','563486',jdecode('Internet'),jdecode(''), jdecode('%2F360912%2F563486.html'), 'true',[],'',''],
		['PAGE','563444',jdecode('Familienpolitik'),jdecode(''), jdecode('%2F360912%2F563444.html'), 'true',[],'',''],
		['PAGE','563465',jdecode('Energie'),jdecode(''), jdecode('%2F360912%2F563465.html'), 'true',[],'',''],
		['PAGE','579523',jdecode('Wahlkampf'),jdecode(''), jdecode('%2F360912%2F579523.html'), 'true',[],'',''],
		['PAGE','322612',jdecode('Artikel+CVP+Pressedienst'),jdecode(''), jdecode('%2F360912%2F322612.html'), 'true',[],'',''],
		['PAGE','563507',jdecode('Reden'),jdecode(''), jdecode('%2F360912%2F563507.html'), 'true',[],'','']
	],'',''],
	['PAGE','317212',jdecode('M%C3%A9dias+%2F+Media'),jdecode(''), jdecode('%2F317212.html'), 'true',[],'',''],
	['PAGE','515912',jdecode('Medien+Archiv'),jdecode(''), jdecode('%2F515912%2Findex.html'), 'true',[ 
		['PAGE','423454',jdecode('2009'),jdecode(''), jdecode('%2F515912%2F423454.html'), 'true',[],'',''],
		['PAGE','423433',jdecode('2008'),jdecode(''), jdecode('%2F515912%2F423433.html'), 'true',[],'',''],
		['PAGE','4764',jdecode('2007'),jdecode(''), jdecode('%2F515912%2F4764.html'), 'true',[],'','']
	],'',''],
	['PAGE','385512',jdecode('Nationalratswahlen+2011'),jdecode(''), jdecode('%2F385512%2Findex.html'), 'true',[ 
		['PAGE','398533',jdecode('Spendenkonto'),jdecode(''), jdecode('%2F385512%2F398533.html'), 'false',[],'',''],
		['PAGE','584923',jdecode('Unterst%C3%BCtzung+Barbara'),jdecode(''), jdecode('%2F385512%2F584923.html'), 'true',[],'',''],
		['PAGE','588546',jdecode('Unterst%C3%BCtzungskomitee+Barbara'),jdecode(''), jdecode('%2F385512%2F588546.html'), 'true',[],'',''],
		['PAGE','548923',jdecode('Medienbericherstattung+Wahlkampf'),jdecode(''), jdecode('%2F385512%2F548923.html'), 'true',[],'','']
	],'',''],
	['PAGE','101713',jdecode('Termine'),jdecode(''), jdecode('%2F101713.html'), 'true',[],'',''],
	['PAGE','270212',jdecode('Links'),jdecode(''), jdecode('%2F270212.html'), 'true',[],'',''],
	['PAGE','290812',jdecode('Downloads'),jdecode(''), jdecode('%2F290812.html'), 'true',[],'',''],
	['PAGE','314812',jdecode('Suchen'),jdecode(''), jdecode('%2F314812.html'), 'true',[],'',''],
	['PAGE','136760',jdecode('Kontakt'),jdecode(''), jdecode('%2F136760.html'), 'true',[],'','']];
var siteelementCount=44;
theSitetree.topTemplateName='Steps';
theSitetree.paletteFamily='726C60';
theSitetree.keyvisualId='2287';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='370';
theSitetree.graphicsetId='421';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='726C60';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Steps',
				paletteFamily: 	'726C60',
				keyvisualId: 	'2287',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'370',
				graphicsetId: 	'421',
				contentColor: 	'FFFFFF',
				contentBGColor: '726C60',
				a_color: 		'726C60',
				b_color: 		'888173',
				c_color: 		'3366CC',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4599',
internalId:  '',
customField: '20120128-134517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4710',
internalId:  '',
customField: '20120120-133826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201412',
internalId:  '',
customField: '20110714-081306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4656',
internalId:  '',
customField: '20110714-085435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20100926-134959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241212',
internalId:  '',
customField: '20110714-083825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '385512',
internalId:  '',
customField: '20111025-111221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '229812',
internalId:  '',
customField: '20110714-084745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23206',
internalId:  '',
customField: '20110924-070248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15602',
internalId:  '',
customField: '20120120-134437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '242012',
internalId:  '',
customField: '20120120-134543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166112',
internalId:  '',
customField: '20120120-142452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '285712',
internalId:  '',
customField: '20110919-130024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '234812',
internalId:  '',
customField: '20120120-134152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150630',
internalId:  '',
customField: '20110714-085555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133642',
internalId:  '',
customField: '20120120-165336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31106',
internalId:  '',
customField: '20111124-132922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '248212',
internalId:  '',
customField: '20110902-135226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '248233',
internalId:  '',
customField: '20110902-135252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101713',
internalId:  '',
customField: '20120202-150510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '270212',
internalId:  '',
customField: '20120130-103515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136760',
internalId:  '',
customField: '20100519-152603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '290812',
internalId:  '',
customField: '20101008-142121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '306912',
internalId:  '',
customField: '20120120-133935'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '314812',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['7050']=webappMappings['7050-812']={
webappId:    '7050',
documentId:  '314833',
internalId:  '812',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '314812',
internalId:  '',
customField: '20090521-131533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '314833',
internalId:  '',
customField: '20090609-151354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '317212',
internalId:  '',
customField: '20111230-102814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '322612',
internalId:  '',
customField: '20110720-145157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '360912',
internalId:  '',
customField: '20120128-134642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '495412',
internalId:  '',
customField: '20110714-081745'
};
webappMappings['1501']=webappMappings['1501-27847343']={
webappId:    '1501',
documentId:  '4599',
internalId:  '27847343',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '388212',
internalId:  '',
customField: '20110714-085629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515912',
internalId:  '',
customField: '20110721-165443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '398533',
internalId:  '',
customField: '20110714-081023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '423454',
internalId:  '',
customField: '20110416-110321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '548923',
internalId:  '',
customField: '20111020-111255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '423433',
internalId:  '',
customField: '20100928-205552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '563507',
internalId:  '',
customField: '20111021-085620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '579523',
internalId:  '',
customField: '20110817-104453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '563444',
internalId:  '',
customField: '20111020-110243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '563465',
internalId:  '',
customField: '20110928-165352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '563486',
internalId:  '',
customField: '20120105-104328'
};
webappMappings['7008']=webappMappings['7008-12661']={
webappId:    '7008',
documentId:  '584923',
internalId:  '12661',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '584923',
internalId:  '',
customField: '20110823-091947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '588546',
internalId:  '',
customField: '20111017-185017'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '623656',
internalId:  '-',
customField: '20120124-145130'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXX81';
var companyName   = 'Barbara+Schmid-Federer+++++Nationalr%C3%A4tin';
var htmlTitle	  = 'Barbara+Schmid-Federer%3A+Liberal-Sozial+f%C3%BCr+Z%C3%BCrich+Nationalr%C3%A4tin';
var metaKeywords  = 'Barbara+Schmid-Federer%2C+Nationalrat%2C+CVP%2C+Wahlen%2C+Familienpolitik%2C+Internetkriminalitaet%2C+Elternschaftsurlaub%2C+Chatroom%2C+Kinderhilfe+Bethlehem%2C+Selbstversuch%2C+Chatroom%2C+Chatten%2C+Sexuelle+Uebergriffe%2C+Pornografie+Internet%2C+Mobbing+im+Internet%2C+Schutz+vor+Internetgefahr.+Chat.+Schaugenau.+Cyber-Bullying%2C+Cyberbullying%2C+Cybermobbing%2C+Minarett%2C+Namensrecht%2C+Verdeckte+Ermittlung';
var metaContents  = 'Barbara+Schmid-Federer%3A+Liberal-Sozial+f%C3%BCr+Z%C3%BCrich.+Nationalr%C3%A4tin';
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();
};

