/* [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(''),'/401.html','true',[],'',''],
	['PAGE','452',jdecode('%C3%96ffnungszeiten'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','57001',jdecode('Shop'),jdecode(''),'/57001.html','true',[],'',''],
	['PAGE','473',jdecode('aktuelle+Ausstellung'),jdecode(''),'/473.html','true',[],'',''],
	['PAGE','515',jdecode('n%C3%A4chste+Ausstellungen'),jdecode(''),'/515.html','true',[],'',''],
	['PAGE','536',jdecode('Kontakt'),jdecode(''),'/536.html','true',[],'',''],
	['PAGE','557',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/557/index.html','true',[ 
		['PAGE','44101',jdecode('Infrastruktur'),jdecode(''),'/557/44101.html','true',[],'','']
	],'',''],
	['PAGE','578',jdecode('Presse'),jdecode(''),'/578/index.html','true',[ 
		['PAGE','110651',jdecode('Ingrid+Koss+Staff+-+art+66'),jdecode(''),'/578/110651.html','true',[],'',''],
		['PAGE','105851',jdecode('St%C3%A9phane+Schweizer'),jdecode(''),'/578/105851.html','true',[],'',''],
		['PAGE','95711',jdecode('Geschenk-art'),jdecode(''),'/578/95711.html','true',[],'',''],
		['PAGE','93211',jdecode('Leo+Sutter+-+Natalia+Kaya-Zwissler'),jdecode(''),'/578/93211.html','true',[],'',''],
		['PAGE','90611',jdecode('Karin+Aeschlimann_Alexander+Sascha+Wolff%3A+Grund'),jdecode(''),'/578/90611.html','true',[],'',''],
		['PAGE','88701',jdecode('Frauenpower-Powerfrauen+stellen+aus'),jdecode(''),'/578/88701.html','true',[],'',''],
		['PAGE','78901',jdecode('Kuh-art+-+Sammelausstellung+mit+am%C3%BCsanten+Viechereien'),jdecode(''),'/578/78901.html','true',[],'',''],
		['PAGE','75501',jdecode('Heinz+Zellweger-Skulpturen+und+Reliefs'),jdecode(''),'/578/75501.html','true',[],'',''],
		['PAGE','64101',jdecode('allerlEi+H%C3%BChnerEien'),jdecode(''),'/578/64101.html','true',[],'',''],
		['PAGE','53801',jdecode('Mark+Staff+Brandl+-+Prelude'),jdecode(''),'/578/53801.html','true',[],'',''],
		['PAGE','45301',jdecode('Werner+Meier+-+Silvesterchlausen'),jdecode(''),'/578/45301.html','true',[],'',''],
		['PAGE','40222',jdecode('engelhaftes+Trogen'),jdecode(''),'/578/40222.html','true',[],'',''],
		['PAGE','40201',jdecode('Er%C3%B6ffnungsausstellung'),jdecode(''),'/578/40201.html','true',[],'','']
	],'',''],
	['PAGE','27101',jdecode('Archiv'),jdecode(''),'/27101/index.html','true',[ 
		['PAGE','125051',jdecode('Schubladendenken'),jdecode(''),'/27101/125051.html','true',[],'',''],
		['PAGE','124051',jdecode('Marie-France+B%C3%B6tschi-Margier%3A+L%26%23x27%3Beau%2C+la+terre+et+le+feu'),jdecode(''),'/27101/124051.html','true',[],'',''],
		['PAGE','121151',jdecode('Alpstein+und+S%C3%A4ntis'),jdecode(''),'/27101/121151.html','true',[],'',''],
		['PAGE','115751',jdecode('Bethli+und+Tanja+Stephani'),jdecode(''),'/27101/115751.html','true',[],'',''],
		['PAGE','111351',jdecode('art+66+-+Ingrid+Koss+Staffa'),jdecode(''),'/27101/111351.html','true',[],'',''],
		['PAGE','108851',jdecode('Malklasse+der+Kunstschule+Liechtenstein'),jdecode(''),'/27101/108851.html','true',[],'',''],
		['PAGE','106451',jdecode('St%C3%A9phane+Schweizer'),jdecode(''),'/27101/106451.html','true',[],'',''],
		['PAGE','99031',jdecode('Geschenk-art'),jdecode(''),'/27101/99031.html','true',[],'',''],
		['PAGE','94711',jdecode('Leo+Sutter+-+Natalia+Kaya-Zwissler'),jdecode(''),'/27101/94711.html','true',[],'',''],
		['PAGE','91611',jdecode('Karin+Aeschlimann+_+Alexander+Sascha+Wolff%3A+Grund'),jdecode(''),'/27101/91611.html','true',[],'',''],
		['PAGE','87001',jdecode('Frauenpowe-Powerfrauen+stellen+aus'),jdecode(''),'/27101/87001.html','true',[],'',''],
		['PAGE','83001',jdecode('Kuh-art+Sammelausstellung'),jdecode(''),'/27101/83001.html','true',[],'',''],
		['PAGE','74001',jdecode('Heinz+Zellweger-Skulpturen+und+Reliefs'),jdecode(''),'/27101/74001.html','true',[],'',''],
		['PAGE','67201',jdecode('allerlEi+H%C3%BChnerEien'),jdecode(''),'/27101/67201.html','true',[],'',''],
		['PAGE','58801',jdecode('Mark+Staff+Brandl+-+Prelude'),jdecode(''),'/27101/58801.html','true',[],'',''],
		['PAGE','51901',jdecode('Werner+Meier+-+Silvesterchlausen'),jdecode(''),'/27101/51901.html','true',[],'',''],
		['PAGE','33301',jdecode('engelhaftes+Trogen'),jdecode(''),'/27101/33301.html','true',[],'',''],
		['PAGE','29001',jdecode('Momente+der+Stille%3A+Ch.Fitze'),jdecode(''),'/27101/29001.html','true',[],'',''],
		['PAGE','27401',jdecode('Er%C3%B6ffnungsausstellung'),jdecode(''),'/27101/27401.html','true',[],'','']
	],'','']];
var siteelementCount=42;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='FDBC3F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10896';
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: 			'Alpha',
				paletteFamily: 	'FDBC3F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10896',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FDBC3F',
				e_color: 		'FDBC3F',
				f_color: 		'FDBC3F',
				hasCustomLogo: 	'true',
				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:  '90611',
internalId:  '',
customField: '20090912-193750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100813-155258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57001',
internalId:  '',
customField: '20090224-215145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100802-220856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87001',
internalId:  '',
customField: '20090830-193440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100802-221952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20100727-123016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93211',
internalId:  '',
customField: '20091021-215854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108851',
internalId:  '',
customField: '20100220-143836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090503-093501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20100106-192730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44101',
internalId:  '',
customField: '20100106-192823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20100314-103215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78901',
internalId:  '',
customField: '20090628-204340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75501',
internalId:  '',
customField: '20090621-184730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64101',
internalId:  '',
customField: '20090330-221012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53801',
internalId:  '',
customField: '20090330-223145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45301',
internalId:  '',
customField: '20090112-181958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40222',
internalId:  '',
customField: '20090105-223015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40201',
internalId:  '',
customField: '20090225-210935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27101',
internalId:  '',
customField: '20100802-223352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74001',
internalId:  '',
customField: '20090621-184754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67201',
internalId:  '',
customField: '20090510-202855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58801',
internalId:  '',
customField: '20090325-231954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51901',
internalId:  '',
customField: '20090215-105046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33301',
internalId:  '',
customField: '20090108-175913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20090224-213521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27401',
internalId:  '',
customField: '20090224-213935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83001',
internalId:  '',
customField: '20100421-220522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88701',
internalId:  '',
customField: '20090830-194503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91611',
internalId:  '',
customField: '20091004-222946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94711',
internalId:  '',
customField: '20091112-081924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95711',
internalId:  '',
customField: '20091202-083209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99031',
internalId:  '',
customField: '20091221-074320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111351',
internalId:  '',
customField: '20100327-211054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110651',
internalId:  '',
customField: '20100314-103953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121151',
internalId:  '',
customField: '20100615-213305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105851',
internalId:  '',
customField: '20100115-201724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106451',
internalId:  '',
customField: '20100126-195437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124051',
internalId:  '',
customField: '20100802-224007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115751',
internalId:  '',
customField: '20100508-203223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125051',
internalId:  '',
customField: '20100829-122542'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHOPT0IN3LW4';
var companyName   = 'Galerie+am+Landsgemeindeplatz';
var htmlTitle	  = 'art-trogen%2C+Galerie+am+Landsgemeindeplatz%2C+9043+Trogen';
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();
};
