/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','77001',jdecode('Petition+Fr%C3%BChsexualisierung'),jdecode(''), jdecode('%2F77001.html'), 'true',[],'',''],
	['PAGE','40701',jdecode('Marsch+f%C3%BCr+s%26%23x27%3BL%C3%A4be+2011'),jdecode(''), jdecode('%2F40701.html'), 'true',[],'',''],
	['PAGE','71901',jdecode('Politische+Bildung'),jdecode(''), jdecode('%2F71901.html'), 'true',[],'',''],
	['PAGE','5401',jdecode('Familie'),jdecode(''), jdecode('%2F5401%2Findex.html'), 'true',[ 
		['PAGE','5901',jdecode('Abtreibung'),jdecode(''), jdecode('%2F5401%2F5901.html'), 'true',[],'',''],
		['PAGE','5922',jdecode('Krippen-+und+Horte'),jdecode(''), jdecode('%2F5401%2F5922.html'), 'true',[],'',''],
		['PAGE','10701',jdecode('Familienmodelle'),jdecode(''), jdecode('%2F5401%2F10701.html'), 'true',[],'',''],
		['PAGE','10722',jdecode('Sterbehilfe'),jdecode(''), jdecode('%2F5401%2F10722.html'), 'true',[],'','']
	],'',''],
	['PAGE','5422',jdecode('Lobby'),jdecode(''), jdecode('%2F5422%2Findex.html'), 'true',[ 
		['PAGE','5964',jdecode('Verein%2C+Kontakt'),jdecode(''), jdecode('%2F5422%2F5964.html'), 'true',[],'','']
	],'',''],
	['PAGE','78401',jdecode('Hilfe%21'),jdecode(''), jdecode('%2F78401.html'), 'true',[],'',''],
	['PAGE','5443',jdecode('Schweiz'),jdecode(''), jdecode('%2F5443%2Findex.html'), 'true',[ 
		['PAGE','53201',jdecode('Geschichte'),jdecode(''), jdecode('%2F5443%2F53201.html'), 'true',[],'',''],
		['PAGE','5985',jdecode('Bundesbrief'),jdecode(''), jdecode('%2F5443%2F5985.html'), 'true',[],'',''],
		['PAGE','6006',jdecode('Schweizerkreuz'),jdecode(''), jdecode('%2F5443%2F6006.html'), 'true',[],'',''],
		['PAGE','6027',jdecode('Nationalhymne'),jdecode(''), jdecode('%2F5443%2F6027.html'), 'true',[],'','']
	],'',''],
	['PAGE','10743',jdecode('Kulturkampf+LGBT'),jdecode(''), jdecode('%2F10743%2Findex.html'), 'true',[ 
		['PAGE','51001',jdecode('Gay+Community'),jdecode(''), jdecode('%2F10743%2F51001.html'), 'true',[],'',''],
		['PAGE','52101',jdecode('Euro+Pride+09+in+Z%C3%BCrich'),jdecode(''), jdecode('%2F10743%2F52101.html'), 'true',[],'',''],
		['PAGE','33901',jdecode('Story+eines+Ex-Homos'),jdecode(''), jdecode('%2F10743%2F33901.html'), 'true',[],'',''],
		['PAGE','41501',jdecode('Flyer+zum+Verteilen'),jdecode(''), jdecode('%2F10743%2F41501.html'), 'true',[],'','']
	],'',''],
	['PAGE','40322',jdecode('Ora+et+labora%21'),jdecode(''), jdecode('%2F40322.html'), 'true',[],'',''],
	['PAGE','53222',jdecode('Texte+zu+Zeitfragen'),jdecode(''), jdecode('%2F53222%2Findex.html'), 'true',[ 
		['PAGE','75201',jdecode('Das+letzte+Tabu%3F%3F%3F'),jdecode(''), jdecode('%2F53222%2F75201.html'), 'true',[],'',''],
		['PAGE','54201',jdecode('68er+Neomarxismus'),jdecode(''), jdecode('%2F53222%2F54201.html'), 'true',[],'',''],
		['PAGE','53264',jdecode('Frauen+und+die+Macht'),jdecode(''), jdecode('%2F53222%2F53264.html'), 'true',[],'',''],
		['PAGE','53243',jdecode('Durchs+Netz+gefallen'),jdecode(''), jdecode('%2F53222%2F53243.html'), 'true',[],'',''],
		['PAGE','55601',jdecode('Verrat+der+Geschichte'),jdecode(''), jdecode('%2F53222%2F55601.html'), 'true',[],'','']
	],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Rectangle';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='2531';
theSitetree.keyvisualName='versicherung.jpg';
theSitetree.fontsetId='451';
theSitetree.graphicsetId='506';
theSitetree.contentColor='033568';
theSitetree.contentBGColor='FFFFFF';
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: 			'Rectangle',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'2531',
				keyvisualName: 	'versicherung.jpg',
				fontsetId: 		'451',
				graphicsetId: 	'506',
				contentColor: 	'033568',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				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:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100101-133059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10743',
internalId:  '',
customField: '20100101-134335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54201',
internalId:  '',
customField: '20100101-142003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40322',
internalId:  '',
customField: '20110604-115205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20100101-140838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20100101-141004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53201',
internalId:  '',
customField: '20110625-122502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40701',
internalId:  '',
customField: '20110604-120447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20100101-133129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20100101-133158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5422',
internalId:  '',
customField: '20100101-133626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5964',
internalId:  '',
customField: '20100101-133653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5443',
internalId:  '',
customField: '20100101-133715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6006',
internalId:  '',
customField: '20110625-122956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6027',
internalId:  '',
customField: '20100101-134305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71901',
internalId:  '',
customField: '20101015-095949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5922',
internalId:  '',
customField: '20100101-133458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20110604-114818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10722',
internalId:  '',
customField: '20100101-133557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5985',
internalId:  '',
customField: '20110625-122746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53222',
internalId:  '',
customField: '20100101-141054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53243',
internalId:  '',
customField: '20100101-143252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55601',
internalId:  '',
customField: '20100101-143413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51001',
internalId:  '',
customField: '20100101-134359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52101',
internalId:  '',
customField: '20100101-135849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53264',
internalId:  '',
customField: '20100807-231441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78401',
internalId:  '',
customField: '20111014-114958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75201',
internalId:  '',
customField: '20110604-113424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77001',
internalId:  '',
customField: '20110625-133648'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW1X0INE4UD';
var companyName   = 'Familienlobby+Schweiz';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

