/* [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','4556',jdecode('Home'),jdecode(''),'/4556.html','true',[],'',''],
	['PAGE','114012',jdecode('Kantonsratswahlen+2011'),jdecode(''),'/114012.html','true',[],'',''],
	['PAGE','60301',jdecode('Aktuelles+%26+Termine+'),jdecode(''),'/60301.html','true',[],'',''],
	['PAGE','12603',jdecode('Vision+R%C3%BCti+2015'),jdecode(''),'/12603/index.html','true',[ 
		['PAGE','72601',jdecode('Neue+Umfrage'),jdecode(''),'/12603/72601.html','true',[],'',''],
		['PAGE','92301',jdecode('Unsere+bisherigen+Erfolge'),jdecode(''),'/12603/92301.html','true',[],'','']
	],'',''],
	['PAGE','106312',jdecode('CVP+Standpunkte'),jdecode(''),'/106312/index.html','true',[ 
		['PAGE','10405',jdecode('Medienmitteilungen'),jdecode(''),'/106312/10405.html','true',[],'',''],
		['PAGE','4748',jdecode('Abstimmungsparolen'),jdecode(''),'/106312/4748.html','true',[],'',''],
		['PAGE','65901',jdecode('Der+aktuelle+Kommentar+'),jdecode(''),'/106312/65901.html','true',[],'',''],
		['PAGE','17326',jdecode('CVP+Notizen'),jdecode(''),'/106312/17326.html','true',[],'',''],
		['PAGE','84801',jdecode('Virtuelles+FORUM+'),jdecode(''),'/106312/84801.html','true',[],'','']
	],'',''],
	['PAGE','4613',jdecode('CVP+-+wir+%C3%BCber+uns'),jdecode(''),'/4613/index.html','true',[ 
		['PAGE','4640',jdecode('Parteileitung'),jdecode(''),'/4613/4640.html','true',[],'',''],
		['PAGE','77801',jdecode('Beh%C3%B6rdenmitglieder'),jdecode(''),'/4613/77801.html','true',[],'',''],
		['PAGE','97712',jdecode('Kommissionen'),jdecode(''),'/4613/97712.html','true',[],'',''],
		['PAGE','88901',jdecode('Weitere+Amtstr%C3%A4ger'),jdecode(''),'/4613/88901.html','true',[],'',''],
		['PAGE','58301',jdecode('Ehrenvorstand'),jdecode(''),'/4613/58301.html','true',[],'',''],
		['PAGE','86601',jdecode('Ehemalige+Beh%C3%B6rdenmitglieder'),jdecode(''),'/4613/86601.html','true',[],'',''],
		['PAGE','74001',jdecode('Mitgliedernachrichten'),jdecode(''),'/4613/74001.html','true',[],'',''],
		['PAGE','89201',jdecode('Wahlergebnisse'),jdecode(''),'/4613/89201.html','true',[],'',''],
		['PAGE','40501',jdecode('100+Jahre+CVP+R%C3%BCti+'),jdecode(''),'/4613/40501.html','true',[],'',''],
		['PAGE','82601',jdecode('Wettbewerb+'),jdecode(''),'/4613/82601.html','true',[],'',''],
		['PAGE','67301',jdecode('Wahlen+2010'),jdecode(''),'/4613/67301.html','true',[],'','']
	],'',''],
	['PAGE','44601',jdecode('Impressionen'),jdecode(''),'/44601.html','true',[],'',''],
	['PAGE','4829',jdecode('Mitgliedschaft++'),jdecode(''),'/4829/index.html','true',[ 
		['PAGE','6413',jdecode('Mitgliedschaft+%28Folgeseite%29'),jdecode(''),'/4829/6413.html','false',[],'',''],
		['PAGE','63801',jdecode('Warum+Mitglied+werden%3F'),jdecode(''),'/4829/63801.html','true',[],'',''],
		['PAGE','58501',jdecode('CVP+Club21'),jdecode(''),'/4829/58501.html','true',[],'',''],
		['PAGE','99512',jdecode('Adress%C3%A4nderung+'),jdecode(''),'/4829/99512.html','true',[],'','']
	],'',''],
	['PAGE','4856',jdecode('Links+und+Kontakte'),jdecode(''),'/4856/index.html','true',[ 
		['PAGE','66201',jdecode('CVP+Suche+'),jdecode(''),'/4856/66201.html','true',[],'',''],
		['PAGE','83601',jdecode('Partnerlinks'),jdecode(''),'/4856/83601.html','true',[],'',''],
		['PAGE','59101',jdecode('Kontakt+'),jdecode(''),'/4856/59101.html','true',[],'','']
	],'',''],
	['PAGE','101812',jdecode('___________'),jdecode(''),'/101812/index.html','true',[ 
		['PAGE','61701',jdecode('CVP+Info+'),jdecode(''),'/101812/61701.html','true',[],'','']
	],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Steps';
theSitetree.paletteFamily='AB4708';
theSitetree.keyvisualId='2287';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='372';
theSitetree.graphicsetId='422';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AB4708';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Steps',
				paletteFamily: 	'AB4708',
				keyvisualId: 	'2287',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'372',
				graphicsetId: 	'422',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AB4708',
				a_color: 		'AB4708',
				b_color: 		'D55809',
				c_color: 		'3366CC',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7050']=webappMappings['7050-1123']={
webappId:    '7050',
documentId:  '84801',
internalId:  '1123',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63801',
internalId:  '',
customField: '20091120-003215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58301',
internalId:  '',
customField: '20100327-145530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20100831-180607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10405',
internalId:  '',
customField: '20100830-215611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4748',
internalId:  '',
customField: '20100507-112631'
};
webappMappings['7005']=webappMappings['7005-482']={
webappId:    '7005',
documentId:  '72601',
internalId:  '482',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17326',
internalId:  '',
customField: '20100801-145324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4856',
internalId:  '',
customField: '20100525-213655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4613',
internalId:  '',
customField: '20100425-221550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4640',
internalId:  '',
customField: '20100706-210833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114012',
internalId:  '',
customField: '20100830-215903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44601',
internalId:  '',
customField: '20100126-210157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12603',
internalId:  '',
customField: '20100801-145751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40501',
internalId:  '',
customField: '20100706-210706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4829',
internalId:  '',
customField: '20100513-144726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6413',
internalId:  '',
customField: '20060102-211253'
};
webappMappings['7008']=webappMappings['7008-3993']={
webappId:    '7008',
documentId:  '4829',
internalId:  '3993',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58501',
internalId:  '',
customField: '20100616-114654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59101',
internalId:  '',
customField: '20100513-105524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77801',
internalId:  '',
customField: '20100616-150612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74001',
internalId:  '',
customField: '20100508-215322'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '66201',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60301',
internalId:  '',
customField: '20100827-213338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61701',
internalId:  '',
customField: '20100707-230206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65901',
internalId:  '',
customField: '20100330-073059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66201',
internalId:  '',
customField: '20100513-144604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67301',
internalId:  '',
customField: '20100520-225231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72601',
internalId:  '',
customField: '20100105-162745'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82601',
internalId:  '',
customField: '20100520-221557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83601',
internalId:  '',
customField: '20100131-061941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84801',
internalId:  '',
customField: '20100411-213038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86601',
internalId:  '',
customField: '20100419-145839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88901',
internalId:  '',
customField: '20100329-205113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89201',
internalId:  '',
customField: '20100513-104024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101812',
internalId:  '',
customField: '20100707-230125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92301',
internalId:  '',
customField: '20100507-113747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106312',
internalId:  '',
customField: '20100616-091847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97712',
internalId:  '',
customField: '20100801-150213'
};
webappMappings['7008']=webappMappings['7008-9396']={
webappId:    '7008',
documentId:  '99512',
internalId:  '9396',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99512',
internalId:  '',
customField: '20100330-094315'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INX2LO';
var companyName   = 'CVP+R%C3%9CTI+-+f%C3%BCr+Familien+und+Lebensqualit%C3%A4t';
var htmlTitle	  = 'CVP+R%C3%BCti.+Politik.+Liberal-soziale+Partei+in+R%C3%BCti+ZH+mit+Engagement+f%C3%BCr+Familien+und+Lebensqualit%C3%A4t.+Pers%C3%B6nlich+und+verantwortungsvoll.+Christlich-demokratische+Volkspartei+im+Z%C3%BCrcher+Oberland.+';
var metaKeywords  = 'liberal-sozial+christlich+demokratische+volkspartei+familien+lebensqualit%C3%A4t+r%C3%BCti+z%C3%BCrich+oberland+cvp+engagement+politik+';
var metaContents  = 'Liberal-soziale+Partei+in+R%C3%BCti+ZH+mit+Engagement+f%C3%BCr+Familien+und+Lebensqualit%C3%A4t.+%0D%0APers%C3%B6nlich+und+verantwortungsvoll.+';
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();
};
