/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','5922',jdecode('Produkte%2C+Leistungen'),jdecode(''),'/5922/index.html','true',[ 
		['PAGE','5943',jdecode('Stuckgips'),jdecode(''),'/5922/5943.html','true',[],'',''],
		['PAGE','5964',jdecode('Terracotto'),jdecode(''),'/5922/5964.html','true',[],'',''],
		['PAGE','13601',jdecode('Muranoglas'),jdecode(''),'/5922/13601.html','true',[],'',''],
		['PAGE','17201',jdecode('Marmorguss'),jdecode(''),'/5922/17201.html','true',[],'',''],
		['PAGE','17222',jdecode('Steinguss'),jdecode(''),'/5922/17222.html','true',[],'',''],
		['PAGE','13622',jdecode('Sonderanfertigungen'),jdecode(''),'/5922/13622.html','true',[],'',''],
		['PAGE','18001',jdecode('Kunstkeramik'),jdecode(''),'/5922/18001.html','true',[],'',''],
		['PAGE','18701',jdecode('Blattgold'),jdecode(''),'/5922/18701.html','true',[],'',''],
		['PAGE','19501',jdecode('my+Credo'),jdecode(''),'/5922/19501.html','true',[],'',''],
		['PAGE','20101',jdecode('Engelsteine'),jdecode(''),'/5922/20101.html','true',[],'','']
	],'',''],
	['PAGE','19522',jdecode('Golden+Serie'),jdecode(''),'/19522.html','true',[],'',''],
	['PAGE','21201',jdecode('Katalog'),jdecode(''),'/21201.html','true',[],'',''],
	['PAGE','8301',jdecode('Wiederverk%C3%A4ufer'),jdecode(''),'/8301.html','true',[],'',''],
	['PAGE','9601',jdecode('Preisliste'),jdecode(''),'/9601/index.html','true',[ 
		['PAGE','9622',jdecode('F%C3%BCr+Endkunden'),jdecode(''),'/9601/9622.html','true',[],'',''],
		['PAGE','9643',jdecode('F%C3%BCr+Wiederverk%C3%A4ufer'),jdecode(''),'/9601/9643.html','true',[],'','']
	],'',''],
	['PAGE','7001',jdecode('Jobs'),jdecode(''),'/7001.html','true',[],'',''],
	['PAGE','6501',jdecode('Impressum'),jdecode(''),'/6501.html','true',[],'',''],
	['PAGE','5985',jdecode('Datenschutz'),jdecode(''),'/5985.html','true',[],'',''],
	['PAGE','7401',jdecode('Interessante+Links'),jdecode(''),'/7401.html','true',[],'',''],
	['PAGE','14501',jdecode('Messen%2FAusstellungen'),jdecode(''),'/14501/index.html','true',[ 
		['PAGE','16001',jdecode('Ornaris09+Z%C3%BCri'),jdecode(''),'/14501/16001.html','true',[],'',''],
		['PAGE','16022',jdecode('Ornaris09+Bern'),jdecode(''),'/14501/16022.html','true',[],'','']
	],'',''],
	['PAGE','10701',jdecode('Shop'),jdecode(''),'/10701.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='1399';
theSitetree.keyvisualName='astern.jpg';
theSitetree.fontsetId='235';
theSitetree.graphicsetId='278';
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: 			'Startup',
				paletteFamily: 	'990000',
				keyvisualId: 	'1399',
				keyvisualName: 	'astern.jpg',
				fontsetId: 		'235',
				graphicsetId: 	'278',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'990000',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-22202945']={
webappId:    '1501',
documentId:  '501',
internalId:  '22202945',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20091129-132922'
};
webappMappings['7008']=webappMappings['7008-3706']={
webappId:    '7008',
documentId:  '8301',
internalId:  '3706',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20090324-200506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20091129-134557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5922',
internalId:  '',
customField: '20091129-133025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5943',
internalId:  '',
customField: '20091129-135002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5964',
internalId:  '',
customField: '20090325-225620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20091129-174329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13622',
internalId:  '',
customField: '20081231-164838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20081231-160412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20081231-160428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20081231-185243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9643',
internalId:  '',
customField: '20081231-185205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20080331-214401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20091129-135603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5985',
internalId:  '',
customField: '20080331-211242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20090124-235510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20090125-000412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16022',
internalId:  '',
customField: '20090125-001148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17222',
internalId:  '',
customField: '20091129-173627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17201',
internalId:  '',
customField: '20091129-173936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20091129-134655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20090620-202042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20091129-165844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19501',
internalId:  '',
customField: '20091129-170533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19522',
internalId:  '',
customField: '20091129-165646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21201',
internalId:  '',
customField: '20091129-135530'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INE5MU';
var companyName   = 'Narok+GmbH+%E2%80%A2+Stuck%26Art';
var htmlTitle	  = '';
var metaKeywords  = 'stuck%2Cgips%2Cteracotta';
var metaContents  = 'stuck%2Cgips%2Cteracotta';
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();
};
