/* [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','4701',jdecode('Home'),jdecode(''), jdecode('%2F4701.html'), 'true',[],'',''],
	['PAGE','75401',jdecode('Aktuell'),jdecode(''), jdecode('%2F75401.html'), 'true',[],'',''],
	['PAGE','4773',jdecode('Solarw%C3%A4rme'),jdecode(''), jdecode('%2F4773.html'), 'true',[],'',''],
	['PAGE','4752',jdecode('Solarstrom'),jdecode(''), jdecode('%2F4752.html'), 'true',[],'',''],
	['PAGE','4794',jdecode('Produkte'),jdecode(''), jdecode('%2F4794.html'), 'true',[],'',''],
	['PAGE','4815',jdecode('Download'),jdecode(''), jdecode('%2F4815.html'), 'true',[],'',''],
	['PAGE','4836',jdecode('Kontakt'),jdecode(''), jdecode('%2F4836.html'), 'true',[],'',''],
	['PAGE','135601',jdecode('Photovoltaikanlage'),jdecode(''), jdecode('%2F135601.html'), 'false',[],'',''],
	['PAGE','97401',jdecode('Lageplan'),jdecode(''), jdecode('%2F97401.html'), 'true',[],'',''],
	['PAGE','103001',jdecode('Partner'),jdecode(''), jdecode('%2F103001.html'), 'true',[],'',''],
	['PAGE','4857',jdecode('Links'),jdecode(''), jdecode('%2F4857.html'), 'true',[],'',''],
	['PAGE','101201',jdecode('Jobs'),jdecode(''), jdecode('%2F101201.html'), 'true',[],'',''],
	['PAGE','90801',jdecode('Bilder'),jdecode(''), jdecode('%2F90801%2Findex.html'), 'true',[ 
		['PAGE','139701',jdecode('Ascona'),jdecode(''), jdecode('%2F90801%2F139701.html'), 'true',[],'',''],
		['PAGE','127801',jdecode('Benken'),jdecode(''), jdecode('%2F90801%2F127801.html'), 'true',[],'',''],
		['PAGE','91801',jdecode('Brissago'),jdecode(''), jdecode('%2F90801%2F91801.html'), 'true',[],'',''],
		['PAGE','91822',jdecode('Bubikon'),jdecode(''), jdecode('%2F90801%2F91822.html'), 'true',[],'',''],
		['PAGE','91843',jdecode('D%C3%BCrnten'),jdecode(''), jdecode('%2F90801%2F91843.html'), 'true',[],'',''],
		['PAGE','90901',jdecode('D%C3%BCrnten+Solar-Schule'),jdecode(''), jdecode('%2F90801%2F90901.html'), 'true',[],'',''],
		['PAGE','106201',jdecode('Effretikon'),jdecode(''), jdecode('%2F90801%2F106201.html'), 'true',[],'',''],
		['PAGE','105501',jdecode('Egg+bei+Einsiedeln'),jdecode(''), jdecode('%2F90801%2F105501.html'), 'true',[],'',''],
		['PAGE','113101',jdecode('Egg+bei+Z%C3%BCrich'),jdecode(''), jdecode('%2F90801%2F113101.html'), 'true',[],'',''],
		['PAGE','91864',jdecode('Ernetschwil'),jdecode(''), jdecode('%2F90801%2F91864.html'), 'true',[],'',''],
		['PAGE','91885',jdecode('Feuerthalen'),jdecode(''), jdecode('%2F90801%2F91885.html'), 'true',[],'',''],
		['PAGE','91906',jdecode('Gebertingen'),jdecode(''), jdecode('%2F90801%2F91906.html'), 'true',[],'',''],
		['PAGE','107001',jdecode('Gommiswald'),jdecode(''), jdecode('%2F90801%2F107001.html'), 'true',[],'',''],
		['PAGE','122101',jdecode('Gr%C3%BCningen'),jdecode(''), jdecode('%2F90801%2F122101.html'), 'true',[],'',''],
		['PAGE','108501',jdecode('Hinwil'),jdecode(''), jdecode('%2F90801%2F108501.html'), 'true',[],'',''],
		['PAGE','140101',jdecode('Hittnau'),jdecode(''), jdecode('%2F90801%2F140101.html'), 'true',[],'',''],
		['PAGE','107801',jdecode('Jona'),jdecode(''), jdecode('%2F90801%2F107801.html'), 'true',[],'',''],
		['PAGE','91927',jdecode('Kaltbrunn'),jdecode(''), jdecode('%2F90801%2F91927.html'), 'true',[],'',''],
		['PAGE','140601',jdecode('K%C3%BCsnacht'),jdecode(''), jdecode('%2F90801%2F140601.html'), 'true',[],'',''],
		['PAGE','104301',jdecode('M%C3%B6nchaltorf'),jdecode(''), jdecode('%2F90801%2F104301.html'), 'true',[],'',''],
		['PAGE','91948',jdecode('Neftenbach'),jdecode(''), jdecode('%2F90801%2F91948.html'), 'true',[],'',''],
		['PAGE','91969',jdecode('Olten'),jdecode(''), jdecode('%2F90801%2F91969.html'), 'true',[],'',''],
		['PAGE','128801',jdecode('Pf%C3%A4ffikon_SZ'),jdecode(''), jdecode('%2F90801%2F128801.html'), 'true',[],'',''],
		['PAGE','91990',jdecode('R%C3%BCti'),jdecode(''), jdecode('%2F90801%2F91990.html'), 'true',[],'',''],
		['PAGE','142812',jdecode('Seegr%C3%A4ben'),jdecode(''), jdecode('%2F90801%2F142812.html'), 'true',[],'',''],
		['PAGE','127822',jdecode('St%C3%A4fa'),jdecode(''), jdecode('%2F90801%2F127822.html'), 'true',[],'',''],
		['PAGE','120201',jdecode('Steg'),jdecode(''), jdecode('%2F90801%2F120201.html'), 'true',[],'',''],
		['PAGE','109701',jdecode('Tann'),jdecode(''), jdecode('%2F90801%2F109701.html'), 'true',[],'',''],
		['PAGE','144845',jdecode('Unterterzen'),jdecode(''), jdecode('%2F90801%2F144845.html'), 'true',[],'',''],
		['PAGE','92011',jdecode('Uster'),jdecode(''), jdecode('%2F90801%2F92011.html'), 'true',[],'',''],
		['PAGE','113601',jdecode('Uznach'),jdecode(''), jdecode('%2F90801%2F113601.html'), 'true',[],'',''],
		['PAGE','110101',jdecode('Wald'),jdecode(''), jdecode('%2F90801%2F110101.html'), 'true',[],'',''],
		['PAGE','146345',jdecode('Wallisellen'),jdecode(''), jdecode('%2F90801%2F146345.html'), 'true',[],'',''],
		['PAGE','92032',jdecode('Wernetshausen'),jdecode(''), jdecode('%2F90801%2F92032.html'), 'true',[],'',''],
		['PAGE','146845',jdecode('Winterthur'),jdecode(''), jdecode('%2F90801%2F146845.html'), 'true',[],'',''],
		['PAGE','92053',jdecode('Wolfhausen'),jdecode(''), jdecode('%2F90801%2F92053.html'), 'true',[],'',''],
		['PAGE','135201',jdecode('Z%C3%BCrich'),jdecode(''), jdecode('%2F90801%2F135201.html'), 'true',[],'','']
	],'','']];
var siteelementCount=50;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='75';
theSitetree.graphicsetId='84';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCD6E0';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21Y'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'003366',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'75',
				graphicsetId: 	'84',
				contentColor: 	'000000',
				contentBGColor: 'CCD6E0',
				a_color: 		'003366',
				b_color: 		'CCCC99',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75401',
internalId:  '',
customField: '20120214-085942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20120204-090814'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140101',
internalId:  '',
customField: '20111117-102730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4773',
internalId:  '',
customField: '20111114-104711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4752',
internalId:  '',
customField: '20120204-091411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4794',
internalId:  '',
customField: '20120204-091521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4815',
internalId:  '',
customField: '20111019-144853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4836',
internalId:  '',
customField: '20120103-135056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140601',
internalId:  '',
customField: '20111117-104439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4857',
internalId:  '',
customField: '20120103-135658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90801',
internalId:  '',
customField: '20110119-182939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90901',
internalId:  '',
customField: '20091123-212023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91801',
internalId:  '',
customField: '20101222-073323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91822',
internalId:  '',
customField: '20110930-213736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91843',
internalId:  '',
customField: '20111121-072659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91864',
internalId:  '',
customField: '20110930-211638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91885',
internalId:  '',
customField: '20111121-085522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91906',
internalId:  '',
customField: '20101123-143355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91927',
internalId:  '',
customField: '20111117-145840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91948',
internalId:  '',
customField: '20091118-095606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91969',
internalId:  '',
customField: '20111117-123927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91990',
internalId:  '',
customField: '20111117-145738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92011',
internalId:  '',
customField: '20111121-124011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92032',
internalId:  '',
customField: '20110119-184018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92053',
internalId:  '',
customField: '20111121-152023'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '97401',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97401',
internalId:  '',
customField: '20091118-103409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101201',
internalId:  '',
customField: '20120206-082448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103001',
internalId:  '',
customField: '20120112-095120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104301',
internalId:  '',
customField: '20111107-093744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105501',
internalId:  '',
customField: '20111121-085500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106201',
internalId:  '',
customField: '20111117-135524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107001',
internalId:  '',
customField: '20110930-211933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107801',
internalId:  '',
customField: '20111121-085544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108501',
internalId:  '',
customField: '20111107-092011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109701',
internalId:  '',
customField: '20111117-144937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110101',
internalId:  '',
customField: '20111121-125620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113101',
internalId:  '',
customField: '20111121-085511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113601',
internalId:  '',
customField: '20111121-125011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120201',
internalId:  '',
customField: '20110307-135821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122101',
internalId:  '',
customField: '20111121-085535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127801',
internalId:  '',
customField: '20120103-140812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128801',
internalId:  '',
customField: '20110930-212934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127822',
internalId:  '',
customField: '20111117-145627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135201',
internalId:  '',
customField: '20111121-153614'
};
webappMappings['7008']=webappMappings['7008-5189']={
webappId:    '7008',
documentId:  '135601',
internalId:  '5189',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135601',
internalId:  '',
customField: '20111114-083236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139701',
internalId:  '',
customField: '20111121-081128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142812',
internalId:  '',
customField: '20111117-145702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144845',
internalId:  '',
customField: '20111121-124032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146345',
internalId:  '',
customField: '20111130-125748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146845',
internalId:  '',
customField: '20111130-125802'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'Ahp010IN2YH2';
var companyName   = 'ch-Solar';
var htmlTitle	  = 'ch-Solar+-+Solarstrom%2C+Photovoltaik+und+Solarw%C3%A4rme+-+die+lohnende+Investition';
var metaKeywords  = 'ch-Solar%2C+rentable+Solaranlagen%2C+Solarstrom%2C+Photovoltaik%2C+Fotovoltaik%2C+Solaranlagen%2C+netzgekoppelte+Solaranlagen%2C+8635+D%C3%BCrnten%2C+B%C3%BCelstrasse+32%2C+Switzerland%2C+Schweiz%2C+Engineering+Villiger';
var metaContents  = 'ch-Solar%2C+rentable+Solaranlagen%2C+Solarstrom%2C+Photovoltaik%2C+Fotovoltaik%2C+Solaranlagen%2C+netzgekoppelte+Solaranlagen%2C+8635+D%C3%BCrnten%2C+B%C3%BCelstrasse+32%2C+Switzerland%2C+Schweiz%2C+Engineering+Villiger';
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();
};

