/* [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','50756',jdecode('Willkommen'),jdecode(''), jdecode('%2F50756.html'), 'true',[],'',''],
	['PAGE','1531',jdecode('%C3%BCber+TRA%26%23x27%3BP%C3%A9Z'),jdecode(''), jdecode('%2F1531.html'), 'true',[],'',''],
	['PAGE','12912',jdecode('Aktuelles'),jdecode(''), jdecode('%2F12912.html'), 'true',[],'',''],
	['PAGE','14754',jdecode('Ausstellungsraum'),jdecode(''), jdecode('%2F14754.html'), 'true',[],'',''],
	['PAGE','2522',jdecode('Leuchtobjekte'),jdecode(''), jdecode('%2F2522%2Findex.html'), 'true',[ 
		['PAGE','54756',jdecode('2011_Megal%C3%B6'),jdecode(''), jdecode('%2F2522%2F54756.html'), 'true',[],'',''],
		['PAGE','55656',jdecode('2011_viertgel'),jdecode(''), jdecode('%2F2522%2F55656.html'), 'true',[],'',''],
		['PAGE','55156',jdecode('2011_LED_Wabalo'),jdecode(''), jdecode('%2F2522%2F55156.html'), 'true',[],'',''],
		['PAGE','38445',jdecode('2010_GALAXIA'),jdecode(''), jdecode('%2F2522%2F38445.html'), 'true',[],'',''],
		['PAGE','48056',jdecode('2010_climbim+L%C3%B6ffelspiel'),jdecode(''), jdecode('%2F2522%2F48056.html'), 'true',[],'',''],
		['PAGE','46156',jdecode('2009_Papierkreationen'),jdecode(''), jdecode('%2F2522%2F46156.html'), 'true',[],'',''],
		['PAGE','26134',jdecode('2009_Laguna'),jdecode(''), jdecode('%2F2522%2F26134.html'), 'true',[],'',''],
		['PAGE','26155',jdecode('2009_iert'),jdecode(''), jdecode('%2F2522%2F26155.html'), 'true',[],'',''],
		['PAGE','26176',jdecode('2009_Lenna+verda'),jdecode(''), jdecode('%2F2522%2F26176.html'), 'true',[],'',''],
		['PAGE','28734',jdecode('2009_Zitronenpresse'),jdecode(''), jdecode('%2F2522%2F28734.html'), 'true',[],'',''],
		['PAGE','11512',jdecode('Curuna+verda'),jdecode(''), jdecode('%2F2522%2F11512.html'), 'true',[],'',''],
		['PAGE','12012',jdecode('2008_Blume'),jdecode(''), jdecode('%2F2522%2F12012.html'), 'true',[],'',''],
		['PAGE','12212',jdecode('2008_Lampedari'),jdecode(''), jdecode('%2F2522%2F12212.html'), 'true',[],'',''],
		['PAGE','18434',jdecode('2008_red+egg'),jdecode(''), jdecode('%2F2522%2F18434.html'), 'true',[],'',''],
		['PAGE','18455',jdecode('2008_Laozi'),jdecode(''), jdecode('%2F2522%2F18455.html'), 'true',[],'',''],
		['PAGE','18476',jdecode('2008_What+else+und+George'),jdecode(''), jdecode('%2F2522%2F18476.html'), 'true',[],'',''],
		['PAGE','18497',jdecode('2008_Triangul+tort'),jdecode(''), jdecode('%2F2522%2F18497.html'), 'true',[],'',''],
		['PAGE','19534',jdecode('2008_Olympia'),jdecode(''), jdecode('%2F2522%2F19534.html'), 'true',[],'',''],
		['PAGE','19555',jdecode('2008_pralina+melna'),jdecode(''), jdecode('%2F2522%2F19555.html'), 'true',[],'',''],
		['PAGE','19576',jdecode('2008_rosa+alva'),jdecode(''), jdecode('%2F2522%2F19576.html'), 'true',[],'',''],
		['PAGE','42445',jdecode('2008_crivel'),jdecode(''), jdecode('%2F2522%2F42445.html'), 'true',[],'','']
	],'',''],
	['PAGE','31034',jdecode('Einzelanfertigungen'),jdecode(''), jdecode('%2F31034.html'), 'true',[],'',''],
	['PAGE','43245',jdecode('links'),jdecode(''), jdecode('%2F43245.html'), 'true',[],'',''],
	['PAGE','1584',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F1584.html'), 'true',[],'',''],
	['PAGE','1605',jdecode('Kontakt'),jdecode(''), jdecode('%2F1605%2Findex.html'), 'true',[ 
		['PAGE','17423',jdecode('Lageplan'),jdecode(''), jdecode('%2F1605%2F17423.html'), 'true',[],'','']
	],'',''],
	['PAGE','30234',jdecode('Mein+Blog'),jdecode(''), jdecode('%2F30234.html'), 'true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Holiday';
theSitetree.paletteFamily='925395';
theSitetree.keyvisualId='6142';
theSitetree.keyvisualName='kv_6142.jpg';
theSitetree.fontsetId='11129';
theSitetree.graphicsetId='11927';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AD68B0';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'webland',
  product: 'WSCSYSSSSLY0XFFS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Holiday',
				paletteFamily: 	'925395',
				keyvisualId: 	'6142',
				keyvisualName: 	'kv_6142.jpg',
				fontsetId: 		'11129',
				graphicsetId: 	'11927',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AD68B0',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11512',
internalId:  '',
customField: '20090623-192705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2522',
internalId:  '',
customField: '20090907-175702'
};
webappMappings['7002']=webappMappings['7002-1882']={
webappId:    '7002',
documentId:  '1584',
internalId:  '1882',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-2151']={
webappId:    '7008',
documentId:  '1605',
internalId:  '2151',
customField: 'language:de;country:CH;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '50756',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1531',
internalId:  '',
customField: '20111202-090408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26134',
internalId:  '',
customField: '20090906-113022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38445',
internalId:  '',
customField: '20101004-091522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1584',
internalId:  '',
customField: '20090904-202344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1605',
internalId:  '',
customField: '20100924-091836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12012',
internalId:  '',
customField: '20090623-192620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12212',
internalId:  '',
customField: '20090622-194049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12912',
internalId:  '',
customField: '20120111-104504'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '50756',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46156',
internalId:  '',
customField: '20101215-105338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14754',
internalId:  '',
customField: '20111202-085913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18434',
internalId:  '',
customField: '20090706-195637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17423',
internalId:  '',
customField: '20090730-090850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18455',
internalId:  '',
customField: '20090706-195912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18476',
internalId:  '',
customField: '20090706-200217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18497',
internalId:  '',
customField: '20090706-200406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19534',
internalId:  '',
customField: '20090706-200733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19555',
internalId:  '',
customField: '20110327-111439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19576',
internalId:  '',
customField: '20090706-201038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26155',
internalId:  '',
customField: '20100130-110743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26176',
internalId:  '',
customField: '20110327-112632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28734',
internalId:  '',
customField: '20090907-124315'
};
webappMappings['7050']=webappMappings['7050-1802']={
webappId:    '7050',
documentId:  '30234',
internalId:  '1802',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30234',
internalId:  '',
customField: '20111225-194839'
};
webappMappings['7060']=webappMappings['7060-4ff24278970f7d56cd9129f95ed04efe']={
webappId:    '7060',
documentId:  '31034',
internalId:  '4ff24278970f7d56cd9129f95ed04efe',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31034',
internalId:  '',
customField: '20091127-090150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50756',
internalId:  '',
customField: '20111202-091303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48056',
internalId:  '',
customField: '20110327-111504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42445',
internalId:  '',
customField: '20100928-110836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43245',
internalId:  '',
customField: '20110727-143329'
};
webappMappings['1501']=webappMappings['1501-2017262']={
webappId:    '1501',
documentId:  '50756',
internalId:  '2017262',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54756',
internalId:  '',
customField: '20120115-130617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55156',
internalId:  '',
customField: '20120124-084254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55656',
internalId:  '',
customField: '20120124-085930'
};
var webAppHostname = 'wsc-app.webland.ch:80';
var canonHostname = 'wsc02.webland.ch';
var accountId     = 'AWB010INXZ75';
var companyName   = 'TRA%27P%C3%A9Z+Unikate';
var htmlTitle	  = 'tra-pez';
var metaKeywords  = 'trapez%2C+tra-pez%2C+Leuchtobjekte%2C+Lampen%2C+Recycling%2C+Atelier%2C+Unikate';
var metaContents  = 'Recycling%2C+Lampen%2C+Leuchtobjekte%2C+Wetzikon+Trapez';
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();
};

