/* [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','55001',jdecode(''),jdecode(''),'/55001.html','true',[],'',''],
	['PAGE','42601',jdecode('HOME'),jdecode(''),'/42601/index.html','true',[ 
		['PAGE','55022',jdecode('%C3%96ffnungszeiten'),jdecode(''),'/42601/55022.html','true',[],'',''],
		['PAGE','42694',jdecode('Standort'),jdecode(''),'/42601/42694.html','true',[],'',''],
		['PAGE','42673',jdecode('Kontakt'),jdecode(''),'/42601/42673.html','true',[],'',''],
		['PAGE','55064',jdecode('G%C3%A4stebuch'),jdecode(''),'/42601/55064.html','false',[],'',''],
		['PAGE','55401',jdecode('Jobs'),jdecode(''),'/42601/55401.html','false',[],'',''],
		['PAGE','44601',jdecode('Team'),jdecode(''),'/42601/44601.html','true',[],'',''],
		['PAGE','42715',jdecode('Suche'),jdecode(''),'/42601/42715.html','true',[],'','']
	],'',''],
	['PAGE','57301',jdecode(''),jdecode(''),'/57301.html','true',[],'',''],
	['PAGE','43009',jdecode('KUNDENKARTE'),jdecode(''),'/43009.html','true',[],'',''],
	['PAGE','72701',jdecode(''),jdecode(''),'/72701.html','true',[],'',''],
	['PAGE','42736',jdecode('AKTUELL'),jdecode(''),'/42736/index.html','true',[ 
		['PAGE','55901',jdecode('Gratis+Skiservice'),jdecode(''),'/42736/55901.html','true',[],'',''],
		['PAGE','42799',jdecode('Sale%21'),jdecode(''),'/42736/42799.html','true',[],'',''],
		['PAGE','42757',jdecode('Events'),jdecode(''),'/42736/42757.html','true',[],'',''],
		['PAGE','42778',jdecode('Monatshit'),jdecode(''),'/42736/42778.html','false',[],'','']
	],'',''],
	['PAGE','57364',jdecode(''),jdecode(''),'/57364.html','false',[],'',''],
	['PAGE','20115',jdecode('SORTIMENT'),jdecode(''),'/20115.html','false',[],'',''],
	['PAGE','57385',jdecode(''),jdecode(''),'/57385.html','true',[],'',''],
	['PAGE','42422',jdecode('RENTAL'),jdecode(''),'/42422/index.html','true',[ 
		['PAGE','42443',jdecode('Reservation'),jdecode(''),'/42422/42443.html','true',[],'',''],
		['PAGE','42464',jdecode('Preisliste'),jdecode(''),'/42422/42464.html','true',[],'',''],
		['PAGE','42485',jdecode('Mietbedingungen'),jdecode(''),'/42422/42485.html','true',[],'',''],
		['PAGE','42820',jdecode('Skischule'),jdecode(''),'/42422/42820.html','false',[],'','']
	],'',''],
	['PAGE','57406',jdecode(''),jdecode(''),'/57406.html','true',[],'',''],
	['PAGE','42925',jdecode('SKISERVICE'),jdecode(''),'/42925/index.html','true',[ 
		['PAGE','42904',jdecode('Werkstatt'),jdecode(''),'/42925/42904.html','true',[],'',''],
		['PAGE','42883',jdecode('Preisliste'),jdecode(''),'/42925/42883.html','true',[],'',''],
		['PAGE','42841',jdecode('Video'),jdecode(''),'/42925/42841.html','true',[],'','']
	],'',''],
	['PAGE','57427',jdecode(''),jdecode(''),'/57427.html','true',[],'',''],
	['PAGE','42946',jdecode('BOOTFIT'),jdecode(''),'/42946/index.html','true',[ 
		['PAGE','42967',jdecode('Prospekt'),jdecode(''),'/42946/42967.html','false',[],'',''],
		['PAGE','42988',jdecode('Swiss+Ski'),jdecode(''),'/42946/42988.html','false',[],'','']
	],'',''],
	['PAGE','57448',jdecode(''),jdecode(''),'/57448.html','true',[],'',''],
	['PAGE','55043',jdecode('%C3%9CBER+UNS'),jdecode(''),'/55043.html','false',[],'',''],
	['PAGE','45401',jdecode('S%C3%96LDEN+2010'),jdecode(''),'/45401/index.html','true',[ 
		['PAGE','45452',jdecode('Information'),jdecode(''),'/45401/45452.html','true',[],'',''],
		['PAGE','74401',jdecode('Teilnehmerinformation'),jdecode(''),'/45401/74401.html','false',[],'',''],
		['PAGE','74101',jdecode('Teilnahmebedingungen'),jdecode(''),'/45401/74101.html','true',[],'',''],
		['PAGE','45473',jdecode('Anmeldung'),jdecode(''),'/45401/45473.html','true',[],'',''],
		['PAGE','45494',jdecode('E-Banking'),jdecode(''),'/45401/45494.html','true',[],'',''],
		['PAGE','45515',jdecode('EZ+Schein'),jdecode(''),'/45401/45515.html','true',[],'',''],
		['PAGE','53201',jdecode('Kontakt'),jdecode(''),'/45401/53201.html','false',[],'','']
	],'','']];
var siteelementCount=44;
theSitetree.topTemplateName='Delphi';
theSitetree.paletteFamily='2B3559';
theSitetree.keyvisualId='7542';
theSitetree.keyvisualName='kv_7542.jpg';
theSitetree.fontsetId='16657';
theSitetree.graphicsetId='12222';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='818181';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Delphi',
				paletteFamily: 	'2B3559',
				keyvisualId: 	'7542',
				keyvisualName: 	'kv_7542.jpg',
				fontsetId: 		'16657',
				graphicsetId: 	'12222',
				contentColor: 	'FFFFFF',
				contentBGColor: '818181',
				a_color: 		'424242',
				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:  '42601',
internalId:  '',
customField: '20100702-164253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42841',
internalId:  '',
customField: '20091114-160837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20115',
internalId:  '',
customField: '20091015-231321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74101',
internalId:  '',
customField: '20100901-223315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42673',
internalId:  '',
customField: '20091019-225716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42694',
internalId:  '',
customField: '20091109-163633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42715',
internalId:  '',
customField: '20091024-211921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42736',
internalId:  '',
customField: '20091015-225506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42757',
internalId:  '',
customField: '20100702-164544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42422',
internalId:  '',
customField: '20091020-001107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42443',
internalId:  '',
customField: '20091214-234433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42464',
internalId:  '',
customField: '20100102-114205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42485',
internalId:  '',
customField: '20091112-224737'
};
webappMappings['7008']=webappMappings['7008-519']={
webappId:    '7008',
documentId:  '42673',
internalId:  '519',
customField: 'language:de;country:CH;'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '42715',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42778',
internalId:  '',
customField: '20091112-222522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42799',
internalId:  '',
customField: '20091019-234728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42820',
internalId:  '',
customField: '20090811-002046'
};
webappMappings['1002']=webappMappings['1002-55064ahp340invw15']={
webappId:    '1002',
documentId:  '55064',
internalId:  '55064ahp340invw15',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42883',
internalId:  '',
customField: '20091114-160217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42904',
internalId:  '',
customField: '20091206-224537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42925',
internalId:  '',
customField: '20091112-225213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42946',
internalId:  '',
customField: '20091114-163614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42967',
internalId:  '',
customField: '20090811-002046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42988',
internalId:  '',
customField: '20090811-002046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43009',
internalId:  '',
customField: '20100520-080255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44601',
internalId:  '',
customField: '20091114-155218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72701',
internalId:  '',
customField: '20100702-164130'
};
webappMappings['7008']=webappMappings['7008-1737']={
webappId:    '7008',
documentId:  '45473',
internalId:  '1737',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-1121']={
webappId:    '7008',
documentId:  '45515',
internalId:  '1121',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45401',
internalId:  '',
customField: '20090904-234841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45452',
internalId:  '',
customField: '20091024-212753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45473',
internalId:  '',
customField: '20091028-210147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45494',
internalId:  '',
customField: '20090904-234331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45515',
internalId:  '',
customField: '20090904-234346'
};
webappMappings['7008']=webappMappings['7008-1150']={
webappId:    '7008',
documentId:  '53201',
internalId:  '1150',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53201',
internalId:  '',
customField: '20090904-235101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55001',
internalId:  '',
customField: '20091114-162823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55043',
internalId:  '',
customField: '20091114-162711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55401',
internalId:  '',
customField: '20091114-155346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55022',
internalId:  '',
customField: '20100619-082443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57301',
internalId:  '',
customField: '20091114-162807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57364',
internalId:  '',
customField: '20091015-214708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57385',
internalId:  '',
customField: '20091114-162833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57406',
internalId:  '',
customField: '20091114-162842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57427',
internalId:  '',
customField: '20091114-162851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57448',
internalId:  '',
customField: '20091114-162900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55901',
internalId:  '',
customField: '20091114-180022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55064',
internalId:  '',
customField: '20091015-202856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74401',
internalId:  '',
customField: '20100901-231311'
};
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHP340INVW15';
var companyName   = '';
var htmlTitle	  = 'Seeli+Sportshop+Churwalden';
var metaKeywords  = '';
var metaContents  = '';
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();
};
