/* [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','4599',jdecode('Welcome+to+...'),jdecode(''),'/4599.html','true',[],'',''],
	['PAGE','60444',jdecode('Das+W%C3%A4gital'),jdecode(''),'/60444.html','true',[],'',''],
	['PAGE','60471',jdecode('The+Chronicle'),jdecode(''),'/60471.html','true',[],'',''],
	['PAGE','60498',jdecode('Alt+W%C3%A4ggithal'),jdecode(''),'/60498.html','true',[],'',''],
	['PAGE','183844',jdecode('W%C3%A4gital+Pics'),jdecode(''),'/183844/index.html','true',[ 
		['PAGE','4683',jdecode('Pics+2005-2007'),jdecode(''),'/183844/4683.html','true',[],'','']
	],'',''],
	['PAGE','68544',jdecode('Panorama...'),jdecode(''),'/68544.html','true',[],'',''],
	['PAGE','113044',jdecode('Multimedia'),jdecode(''),'/113044.html','true',[],'',''],
	['PAGE','146765',jdecode('W%C3%A4giseelauf'),jdecode(''),'/146765.html','true',[],'',''],
	['PAGE','134444',jdecode('Waldlernpfad'),jdecode(''),'/134444.html','true',[],'',''],
	['PAGE','198244',jdecode('Die+Fischerei'),jdecode(''),'/198244/index.html','true',[ 
		['PAGE','4710',jdecode('Saison+2005-08'),jdecode(''),'/198244/4710.html','true',[],'','']
	],'',''],
	['PAGE','57044',jdecode('So+findest+du...'),jdecode(''),'/57044.html','true',[],'',''],
	['PAGE','4764',jdecode('Wir+%C3%BCber+uns...'),jdecode(''),'/4764/index.html','true',[ 
		['PAGE','4737',jdecode('Aktivit%C3%A4ten'),jdecode(''),'/4764/4737.html','true',[],'',''],
		['PAGE','60552',jdecode('Rangliste'),jdecode(''),'/4764/60552.html','true',[],'','']
	],'',''],
	['PAGE','60606',jdecode('Helft+mit...'),jdecode(''),'/60606.html','true',[],'',''],
	['PAGE','223244',jdecode('Archiv'),jdecode(''),'/223244/index.html','true',[ 
		['PAGE','220344',jdecode('Ausstellung'),jdecode(''),'/223244/220344.html','true',[],'','']
	],'',''],
	['PAGE','4791',jdecode('W%C3%A4gital+Links'),jdecode(''),'/4791.html','true',[],'',''],
	['PAGE','7159',jdecode('G%C3%A4stebuch'),jdecode(''),'/7159/index.html','true',[ 
		['PAGE','7160',jdecode('Eintr%C3%A4ge'),jdecode(''),'/7159/7160.html','false',[],'','']
	],'',''],
	['PAGE','178544',jdecode('Webcam+1'),jdecode(''),'/178544.html','true',[],'',''],
	['PAGE','203844',jdecode('Webcam+2'),jdecode(''),'/203844.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='4A587F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10449';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4A587F';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'4A587F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10449',
				contentColor: 	'FFFFFF',
				contentBGColor: '4A587F',
				a_color: 		'4A587F',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-7159ahp010in2zdc']={
webappId:    '1002',
documentId:  '7159',
internalId:  '7159ahp010in2zdc',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4599',
internalId:  '',
customField: '20100906-095501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60444',
internalId:  '',
customField: '20090525-173022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60471',
internalId:  '',
customField: '20070129-101205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60498',
internalId:  '',
customField: '20070410-114842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183844',
internalId:  '',
customField: '20091105-201021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4683',
internalId:  '',
customField: '20071231-103905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68544',
internalId:  '',
customField: '20100321-121538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113044',
internalId:  '',
customField: '20090525-123955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146765',
internalId:  '',
customField: '20100818-124357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134444',
internalId:  '',
customField: '20100625-193531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198244',
internalId:  '',
customField: '20100427-205519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4710',
internalId:  '',
customField: '20090427-192303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57044',
internalId:  '',
customField: '20070731-083641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20100328-201522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4737',
internalId:  '',
customField: '20100823-141603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60552',
internalId:  '',
customField: '20100906-101630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60606',
internalId:  '',
customField: '20070112-115005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4791',
internalId:  '',
customField: '20100317-131636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7159',
internalId:  '',
customField: '20070704-130742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7160',
internalId:  '',
customField: '20070112-115049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178544',
internalId:  '',
customField: '20090618-173719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '203844',
internalId:  '',
customField: '20090618-173650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '220344',
internalId:  '',
customField: '20091128-105516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223244',
internalId:  '',
customField: '20100321-172313'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'Ahp010IN2ZDC';
var companyName   = 'www.stausee.ch++++++++++++++www.waegitalersee.info';
var htmlTitle	  = 'Viele+Infos+%C3%BCber+das+W%C3%A4gital+und+den+W%C3%A4gitalersee';
var metaKeywords  = 'Waegital+W%C3%A4gital+Stausee+W%C3%A4gitalersee+Waegitalersee+Innerthal+Vorderthal+Stausee+Fischerei+Alt-W%C3%A4ggithal+Forellen+Felchen+Wandern';
var metaContents  = 'Stausee+W%C3%A4gital+Innerthal+Vorderthal+Waegitalersee+Fischerei+Ferien+Wandern';
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();
};
