/* [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(''), jdecode('%2F4599.html'), 'true',[],'',''],
	['PAGE','60444',jdecode('Das+W%C3%A4gital'),jdecode(''), jdecode('%2F60444.html'), 'true',[],'',''],
	['PAGE','57044',jdecode('So+findest+du...'),jdecode(''), jdecode('%2F57044.html'), 'true',[],'',''],
	['PAGE','60471',jdecode('The+Chronicle'),jdecode(''), jdecode('%2F60471.html'), 'true',[],'',''],
	['PAGE','60498',jdecode('Alt+W%C3%A4ggithal'),jdecode(''), jdecode('%2F60498.html'), 'true',[],'',''],
	['PAGE','183844',jdecode('W%C3%A4gital+Pics'),jdecode(''), jdecode('%2F183844%2Findex.html'), 'true',[ 
		['PAGE','4683',jdecode('Pics+2005-2007'),jdecode(''), jdecode('%2F183844%2F4683.html'), 'true',[],'','']
	],'',''],
	['PAGE','68544',jdecode('Panoramas'),jdecode(''), jdecode('%2F68544.html'), 'true',[],'',''],
	['PAGE','113044',jdecode('Multimedia'),jdecode(''), jdecode('%2F113044.html'), 'true',[],'',''],
	['PAGE','134444',jdecode('Waldlernpfad'),jdecode(''), jdecode('%2F134444.html'), 'true',[],'',''],
	['PAGE','146765',jdecode('W%C3%A4giseelauf'),jdecode(''), jdecode('%2F146765.html'), 'true',[],'',''],
	['PAGE','248844',jdecode('Hundloch'),jdecode(''), jdecode('%2F248844.html'), 'true',[],'',''],
	['PAGE','198244',jdecode('Die+Fischerei'),jdecode(''), jdecode('%2F198244%2Findex.html'), 'true',[ 
		['PAGE','4710',jdecode('Saison+2005-08'),jdecode(''), jdecode('%2F198244%2F4710.html'), 'true',[],'','']
	],'',''],
	['PAGE','4764',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F4764%2Findex.html'), 'true',[ 
		['PAGE','4737',jdecode('Aktivit%C3%A4ten'),jdecode(''), jdecode('%2F4764%2F4737.html'), 'true',[],'',''],
		['PAGE','60552',jdecode('Rangliste'),jdecode(''), jdecode('%2F4764%2F60552.html'), 'true',[],'','']
	],'',''],
	['PAGE','60606',jdecode('Helft+mit+%21%21'),jdecode(''), jdecode('%2F60606.html'), 'true',[],'',''],
	['PAGE','223244',jdecode('Archiv'),jdecode(''), jdecode('%2F223244%2Findex.html'), 'true',[ 
		['PAGE','220344',jdecode('Ausstellung'),jdecode(''), jdecode('%2F223244%2F220344.html'), 'true',[],'',''],
		['PAGE','262844',jdecode('Das+W%C3%A4gi+Buch'),jdecode(''), jdecode('%2F223244%2F262844.html'), 'true',[],'','']
	],'',''],
	['PAGE','4791',jdecode('W%C3%A4gital+Links'),jdecode(''), jdecode('%2F4791.html'), 'true',[],'',''],
	['PAGE','7159',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F7159%2Findex.html'), 'true',[ 
		['PAGE','7160',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F7159%2F7160.html'), 'false',[],'','']
	],'',''],
	['PAGE','178544',jdecode('Webcam+1'),jdecode(''), jdecode('%2F178544.html'), 'true',[],'',''],
	['PAGE','203844',jdecode('Webcam+2'),jdecode(''), jdecode('%2F203844.html'), 'true',[],'','']];
var siteelementCount=26;
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 prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
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: '20120221-110753'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60444',
internalId:  '',
customField: '20110413-114936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60471',
internalId:  '',
customField: '20120221-110829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60498',
internalId:  '',
customField: '20101108-104802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '183844',
internalId:  '',
customField: '20110514-132620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4683',
internalId:  '',
customField: '20110524-143115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68544',
internalId:  '',
customField: '20100321-111538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113044',
internalId:  '',
customField: '20101108-105414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '248844',
internalId:  '',
customField: '20101105-160733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146765',
internalId:  '',
customField: '20110719-095628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134444',
internalId:  '',
customField: '20101108-103920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198244',
internalId:  '',
customField: '20110517-183029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4710',
internalId:  '',
customField: '20090427-172303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57044',
internalId:  '',
customField: '20101117-064041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20110514-133314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4737',
internalId:  '',
customField: '20100823-121603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60552',
internalId:  '',
customField: '20110815-113652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60606',
internalId:  '',
customField: '20120221-102345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4791',
internalId:  '',
customField: '20120221-112003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7159',
internalId:  '',
customField: '20110524-140545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7160',
internalId:  '',
customField: '20070112-105049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '178544',
internalId:  '',
customField: '20110514-133757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '203844',
internalId:  '',
customField: '20110514-133816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '220344',
internalId:  '',
customField: '20091128-095516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '223244',
internalId:  '',
customField: '20120221-110906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '262844',
internalId:  '',
customField: '20120221-110929'
};
var webAppHostname = 'cgi.webomat.ch:80';
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();
};

