/* [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','4481',jdecode('Home'),jdecode(''), jdecode('%2F4481.html'), 'true',[],'',''],
	['PAGE','12801',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F12801%2Findex.html'), 'true',[ 
		['PAGE','11428',jdecode('Antje+Gaiser'),jdecode(''), jdecode('%2F12801%2F11428.html'), 'true',[],'',''],
		['PAGE','11401',jdecode('Franziska+Abt'),jdecode(''), jdecode('%2F12801%2F11401.html'), 'true',[],'',''],
		['PAGE','11455',jdecode('Christian+Kummerer'),jdecode(''), jdecode('%2F12801%2F11455.html'), 'true',[],'',''],
		['PAGE','17048',jdecode('Beat+Schmidli'),jdecode(''), jdecode('%2F12801%2F17048.html'), 'true',[],'','']
	],'',''],
	['PAGE','10601',jdecode('Rechtsgebiete'),jdecode(''), jdecode('%2F10601.html'), 'true',[],'',''],
	['PAGE','10628',jdecode('Verwaltungen'),jdecode(''), jdecode('%2F10628.html'), 'true',[],'',''],
	['PAGE','10655',jdecode('Urteile'),jdecode(''), jdecode('%2F10655%2Findex.html'), 'true',[ 
		['PAGE','10682',jdecode('Kantonale'),jdecode(''), jdecode('%2F10655%2F10682.html'), 'true',[],'',''],
		['PAGE','10709',jdecode('Bundesgericht'),jdecode(''), jdecode('%2F10655%2F10709.html'), 'true',[],'','']
	],'',''],
	['PAGE','10736',jdecode('Vermietungsangebote'),jdecode(''), jdecode('%2F10736.html'), 'true',[],'',''],
	['PAGE','10763',jdecode('Interessante+Links'),jdecode(''), jdecode('%2F10763.html'), 'true',[],'',''],
	['PAGE','10844',jdecode('Kontakt'),jdecode(''), jdecode('%2F10844.html'), 'true',[],'',''],
	['PAGE','10898',jdecode('Jobs'),jdecode(''), jdecode('%2F10898.html'), 'true',[],'',''],
	['PAGE','10974',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F10974%2Findex.html'), 'true',[ 
		['PAGE','10975',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F10974%2F10975.html'), 'false',[],'','']
	],'',''],
	['PAGE','11033',jdecode('Ihr+Weg+zu+uns'),jdecode(''), jdecode('%2F11033.html'), 'true',[],'',''],
	['PAGE','11063',jdecode('Anfahrt'),jdecode(''), jdecode('%2F11063.html'), 'true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Activate';
theSitetree.paletteFamily='1E3A6F';
theSitetree.keyvisualId='2032';
theSitetree.keyvisualName='dotcom.jpg';
theSitetree.fontsetId='339';
theSitetree.graphicsetId='396';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='1E3A6F';
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: 			'Activate',
				paletteFamily: 	'1E3A6F',
				keyvisualId: 	'2032',
				keyvisualName: 	'dotcom.jpg',
				fontsetId: 		'339',
				graphicsetId: 	'396',
				contentColor: 	'DDDDDD',
				contentBGColor: '1E3A6F',
				a_color: 		'1E3A6F',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4481',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10898',
internalId:  '',
customField: '20111103-103037'
};
webappMappings['1002']=webappMappings['1002-10974ABW0X0INXLQU']={
webappId:    '1002',
documentId:  '10974',
internalId:  '10974ABW0X0INXLQU',
customField: 'icq=false'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '11033',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '11063',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20080619-211201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4481',
internalId:  '',
customField: '20100316-113048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11428',
internalId:  '',
customField: '20080115-165249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20041125-134949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11455',
internalId:  '',
customField: '20080115-165319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17048',
internalId:  '',
customField: '20110104-113843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20080620-082323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10628',
internalId:  '',
customField: '20041202-173516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10655',
internalId:  '',
customField: '20041125-111359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10682',
internalId:  '',
customField: '20041125-111359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10709',
internalId:  '',
customField: '20041125-111359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10736',
internalId:  '',
customField: '20100929-112122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10763',
internalId:  '',
customField: '20080930-115658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10844',
internalId:  '',
customField: '20080115-165530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10974',
internalId:  '',
customField: '20041125-113522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10975',
internalId:  '',
customField: '20080619-213721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11033',
internalId:  '',
customField: '20041125-113834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11063',
internalId:  '',
customField: '20041125-114212'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXLQU';
var companyName   = 'Advokatur+am+Aeschengraben';
var htmlTitle	  = 'Advokatur+am+Aeschengraben';
var metaKeywords  = 'aaa%2CChristian+Kummerer%2C+Antje+Gaiser%2C+Franziska+Abt+Lindner%2C+Advokatur%2C+Anwaltsb%C3%BCro%2C+Advokatur+am+Aeschengraben%2C+Vermietungsangebote%2C+Liegenschaftsverwaltung%2C+Mietrecht%2C+Strafrecht%2C+Strafverteidigung%2C+Kunstrecht%2C+Internationales+Privatrecht%2C+HEV+Reinach%2C+Aeschengraben%2C+Basel%2C+Schlichtungsstelle+f%C3%BCr+Mietstreitigkeiten%2C+Recht';
var metaContents  = 'Advokatur+am+Aeschengraben%2C+Juristische+Dienstleistungen.+Verwaltung+von+Liegenschaften';
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();
};

