/* [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','901',jdecode('Aktuell'),jdecode(''),'/901/index.html','true',[ 
		['PAGE','2374',jdecode('Mitglied+werden'),jdecode(''),'/901/2374.html','true',[],'',''],
		['PAGE','39143',jdecode('Termine'),jdecode(''),'/901/39143.html','true',[],'','']
	],'',''],
	['PAGE','94701',jdecode('WAD2009'),jdecode(''),'/94701/index.html','true',[ 
		['PAGE','95601',jdecode('wenn+W%C3%BCrde+nicht+gleich+W%C3%BCrde+ist'),jdecode(''),'/94701/95601.html','true',[],'','']
	],'',''],
	['PAGE','44601',jdecode('Media'),jdecode(''),'/44601/index.html','true',[ 
		['PAGE','56201',jdecode('Medienmitteilungen'),jdecode(''),'/44601/56201.html','true',[],'',''],
		['PAGE','56222',jdecode('communiqu%C3%A9s+aux+m%C3%A9dias'),jdecode(''),'/44601/56222.html','true',[],'',''],
		['PAGE','56243',jdecode('communicato+di+stampa'),jdecode(''),'/44601/56243.html','true',[],'',''],
		['PAGE','39101',jdecode('Echo'),jdecode(''),'/44601/39101.html','true',[],'','']
	],'',''],
	['PAGE','80043',jdecode('World+AIDS+Conference'),jdecode(''),'/80043/index.html','true',[ 
		['PAGE','80001',jdecode('Session%3A+Positive+Prevention'),jdecode(''),'/80043/80001.html','true',[],'',''],
		['PAGE','80064',jdecode('Media+Conference+LHIVE'),jdecode(''),'/80043/80064.html','true',[],'',''],
		['PAGE','80085',jdecode('Impressionen'),jdecode(''),'/80043/80085.html','true',[],'','']
	],'',''],
	['PAGE','73901',jdecode('The+Mexico+Manifesto'),jdecode(''),'/73901/index.html','true',[ 
		['PAGE','73001',jdecode('subscribers'),jdecode(''),'/73901/73001.html','true',[],'','']
	],'',''],
	['PAGE','57301',jdecode('Action'),jdecode(''),'/57301/index.html','true',[ 
		['PAGE','70801',jdecode('P%2BIPS'),jdecode(''),'/57301/70801.html','true',[],'',''],
		['PAGE','31201',jdecode('LHIVE+Coach%3A+Patenschaft'),jdecode(''),'/57301/31201.html','true',[],'',''],
		['PAGE','2290',jdecode('LHIVE+Caf%C3%A9'),jdecode(''),'/57301/2290.html','true',[],'',''],
		['PAGE','59101',jdecode('Vaumarcus+2008'),jdecode(''),'/57301/59101.html','true',[],'',''],
		['PAGE','59122',jdecode('Positive+Begegnungen+2009'),jdecode(''),'/57301/59122.html','true',[],'',''],
		['PAGE','30701',jdecode('S%C3%96DAK+2009'),jdecode(''),'/57301/30701.html','true',[],'','']
	],'',''],
	['PAGE','39122',jdecode('News'),jdecode(''),'/39122.html','true',[],'',''],
	['PAGE','52301',jdecode('Debatten'),jdecode(''),'/52301/index.html','true',[ 
		['PAGE','59901',jdecode('Argument'),jdecode(''),'/52301/59901.html','true',[],'',''],
		['PAGE','68801',jdecode('enlightenment'),jdecode(''),'/52301/68801.html','true',[],'',''],
		['PAGE','73401',jdecode('english+version+EKAF+statement'),jdecode(''),'/52301/73401.html','true',[],'','']
	],'',''],
	['PAGE','59143',jdecode('Vernehmlassungen'),jdecode(''),'/59143.html','true',[],'',''],
	['PAGE','71501',jdecode('Participation'),jdecode(''),'/71501.html','true',[],'',''],
	['PAGE','59164',jdecode('Documents'),jdecode(''),'/59164/index.html','true',[ 
		['PAGE','59227',jdecode('Charte+de+LHIVE'),jdecode(''),'/59164/59227.html','true',[],'',''],
		['PAGE','59206',jdecode('Versione+italiana'),jdecode(''),'/59164/59206.html','true',[],'',''],
		['PAGE','13501',jdecode('Charta+1%3A+Zweck'),jdecode(''),'/59164/13501.html','true',[],'',''],
		['PAGE','13522',jdecode('Charta+2%3A+Aufgaben'),jdecode(''),'/59164/13522.html','true',[],'',''],
		['PAGE','13543',jdecode('Charta+3%3A+Wertgrundlagen'),jdecode(''),'/59164/13543.html','true',[],'',''],
		['PAGE','69801',jdecode('statuts'),jdecode(''),'/59164/69801.html','true',[],'',''],
		['PAGE','69822',jdecode('statuto'),jdecode(''),'/59164/69822.html','true',[],'',''],
		['PAGE','13564',jdecode('Statuten+1%3A+Allgemeines'),jdecode(''),'/59164/13564.html','true',[],'',''],
		['PAGE','13585',jdecode('Statuten+2%3A+Organisation'),jdecode(''),'/59164/13585.html','true',[],'',''],
		['PAGE','13606',jdecode('Statuten+3%3A+Finanzen'),jdecode(''),'/59164/13606.html','true',[],'',''],
		['PAGE','13627',jdecode('Statuten+4%3A+Schlussbestimmungen'),jdecode(''),'/59164/13627.html','true',[],'','']
	],'',''],
	['PAGE','25401',jdecode('LHIVE'),jdecode(''),'/25401/index.html','true',[ 
		['PAGE','2101',jdecode('Wer+wir+sind'),jdecode(''),'/25401/2101.html','true',[],'',''],
		['PAGE','2122',jdecode('Hintergrund'),jdecode(''),'/25401/2122.html','true',[],'',''],
		['PAGE','25422',jdecode('Gr%C3%BCndung+5.+Mai+2007'),jdecode(''),'/25401/25422.html','true',[],'',''],
		['PAGE','26801',jdecode('Grussbotschaften'),jdecode(''),'/25401/26801.html','true',[],'',''],
		['PAGE','9201',jdecode('Gesichter+und+Stimmen'),jdecode(''),'/25401/9201.html','true',[],'','']
	],'',''],
	['PAGE','64401',jdecode('HIV+Europe'),jdecode(''),'/64401/index.html','true',[ 
		['PAGE','65301',jdecode('Travel+Restriktion'),jdecode(''),'/64401/65301.html','true',[],'','']
	],'',''],
	['PAGE','2395',jdecode('Kontakt%2C+Spenden'),jdecode(''),'/2395/index.html','true',[ 
		['PAGE','2416',jdecode('Adresse%2C+Telefon%2C+eMail'),jdecode(''),'/2395/2416.html','true',[],'',''],
		['PAGE','2437',jdecode('Spenden'),jdecode(''),'/2395/2437.html','true',[],'','']
	],'',''],
	['PAGE','12306',jdecode('G%C3%A4stebuch'),jdecode(''),'/12306/index.html','true',[ 
		['PAGE','12301',jdecode('Eintr%C3%A4ge'),jdecode(''),'/12306/12301.html','false',[],'','']
	],'',''],
	['PAGE','83901',jdecode('Weblog'),jdecode(''),'/83901.html','true',[],'','']];
var siteelementCount=56;
theSitetree.topTemplateName='Quadrat';
theSitetree.paletteFamily='EE2E2E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10450';
theSitetree.graphicsetId='10837';
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: 			'Quadrat',
				paletteFamily: 	'EE2E2E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10450',
				graphicsetId: 	'10837',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'EE2E2E',
				e_color: 		'807E7E',
				f_color: 		'434242',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-12814793']={
webappId:    '1501',
documentId:  '901',
internalId:  '12814793',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2374',
internalId:  '',
customField: '20091123-231239'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-12306abw0x0in2sej']={
webappId:    '1002',
documentId:  '12306',
internalId:  '12306abw0x0in2sej',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20091210-153200'
};
webappMappings['7008']=webappMappings['7008-1029']={
webappId:    '7008',
documentId:  '2374',
internalId:  '1029',
customField: 'language:de;country:CH;'
};
webappMappings['7050']=webappMappings['7050-243']={
webappId:    '7050',
documentId:  '83901',
internalId:  '243',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39143',
internalId:  '',
customField: '20091120-090120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44601',
internalId:  '',
customField: '20090820-105159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56201',
internalId:  '',
customField: '20090907-191231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56222',
internalId:  '',
customField: '20080224-160130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56243',
internalId:  '',
customField: '20080224-160426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39101',
internalId:  '',
customField: '20080611-222252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80043',
internalId:  '',
customField: '20081011-101541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80001',
internalId:  '',
customField: '20081011-095913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80064',
internalId:  '',
customField: '20080818-085211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80085',
internalId:  '',
customField: '20080818-094148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73901',
internalId:  '',
customField: '20081118-112003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73001',
internalId:  '',
customField: '20091120-094825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57301',
internalId:  '',
customField: '20091210-152848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70801',
internalId:  '',
customField: '20080611-224200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31201',
internalId:  '',
customField: '20081011-093430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2290',
internalId:  '',
customField: '20080224-204708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59101',
internalId:  '',
customField: '20081022-090037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59122',
internalId:  '',
customField: '20091008-113602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30701',
internalId:  '',
customField: '20081011-094043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39122',
internalId:  '',
customField: '20080611-234338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52301',
internalId:  '',
customField: '20080312-223711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59901',
internalId:  '',
customField: '20080225-145623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68801',
internalId:  '',
customField: '20080611-144532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73401',
internalId:  '',
customField: '20080724-050257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59143',
internalId:  '',
customField: '20080225-153454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71501',
internalId:  '',
customField: '20080611-235315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59164',
internalId:  '',
customField: '20080611-164954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59227',
internalId:  '',
customField: '20080611-162505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59206',
internalId:  '',
customField: '20080611-162712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20070412-070639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13522',
internalId:  '',
customField: '20070412-084029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13543',
internalId:  '',
customField: '20070412-085058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69801',
internalId:  '',
customField: '20080611-164650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69822',
internalId:  '',
customField: '20080611-221412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13564',
internalId:  '',
customField: '20070413-230544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13585',
internalId:  '',
customField: '20070414-004542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13606',
internalId:  '',
customField: '20070414-003542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13627',
internalId:  '',
customField: '20070414-004124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20080226-154211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20080226-145403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2122',
internalId:  '',
customField: '20071205-115139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25422',
internalId:  '',
customField: '20080225-160110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20070818-204921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20081029-092913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64401',
internalId:  '',
customField: '20080312-223926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65301',
internalId:  '',
customField: '20080314-162423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2395',
internalId:  '',
customField: '20070414-113638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2416',
internalId:  '',
customField: '20070821-071858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2437',
internalId:  '',
customField: '20070821-072516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12306',
internalId:  '',
customField: '20070414-144628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12301',
internalId:  '',
customField: '20070414-105029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83901',
internalId:  '',
customField: '20090203-084655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94701',
internalId:  '',
customField: '20091203-172333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95601',
internalId:  '',
customField: '20091204-090801'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2SEJ';
var companyName   = 'Menschen+mit+HIV+und+AIDS';
var htmlTitle	  = 'lhive.ch';
var metaKeywords  = 'hiv+aids+leben+menschen+stigma+diskriminierung+offenheit+transparenz+sichtbarkeit+schweiz';
var metaContents  = 'lhive+ist+die+organisation+der+menschen+mit+hiv+und+aids+in+der+schweiz.';
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();
};
