/* [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','4101',jdecode('Home'),jdecode(''), jdecode('%2F4101.html'), 'true',[],'',''],
	['PAGE','106434',jdecode('Saison+Tippspiel'),jdecode(''), jdecode('%2F106434.html'), 'false',[],'',''],
	['PAGE','148745',jdecode('Playoffdaten+2012'),jdecode(''), jdecode('%2F148745.html'), 'true',[],'',''],
	['PAGE','8501',jdecode('Club+News'),jdecode(''), jdecode('%2F8501%2Findex.html'), 'true',[ 
		['ITEM','133234',jdecode('Resultate%2FRangliste'),jdecode(''), jdecode('http%3A%2F%2Fwww.teletext.ch%2FSF1%2F254-03.html'), 'true',[],'','_blank'],
		['ITEM','119034',jdecode('Statistik+1.+Liga'),jdecode(''), jdecode('http%3A%2F%2Fwww.regioleague.swiss-icehockey.ch%2Fplatform%2Fapps%2Fstatistics%2FStatPlayer.asp%3FAction%3DList%26MenuID%3D576%26ID%3D2616%26Menu%3D1%26Item%3D29'), 'true',[],'','_blank'],
		['PAGE','118234',jdecode('Berichte+WB'),jdecode(''), jdecode('%2F8501%2F118234.html'), 'true',[],'','']
	],'',''],
	['PAGE','149445',jdecode('Matchberichte+Playoffs'),jdecode(''), jdecode('%2F149445.html'), 'true',[],'',''],
	['PAGE','133534',jdecode('Matchberichte+WB'),jdecode(''), jdecode('%2F133534.html'), 'true',[],'',''],
	['ITEM','133555',jdecode('Spiele+Live'),jdecode(''), jdecode('http%3A%2F%2Fwww.regioleague.swiss-icehockey.ch%2Fmandant%2Fapps%2Fresults%2Fresultateal1.htm'), 'true',[],'','_blank'],
	['PAGE','83134',jdecode('Spielplan+2011%2F12+'),jdecode(''), jdecode('%2F83134.html'), 'true',[],'',''],
	['PAGE','81334',jdecode('SEHV+News'),jdecode(''), jdecode('%2F81334.html'), 'true',[],'',''],
	['ITEM','81734',jdecode('Sport+News'),jdecode(''), jdecode('http%3A%2F%2Fwww.1815.ch%2Fwalliser-bote%2Fsport.html'), 'true',[],'','_blank'],
	['PAGE','78818',jdecode('Mannschaften'),jdecode(''), jdecode('%2F78818%2Findex.html'), 'true',[ 
		['PAGE','4320',jdecode('1.Mannschaft'),jdecode(''), jdecode('%2F78818%2F4320.html'), 'true',[],'',''],
		['PAGE','83239',jdecode('Senioren'),jdecode(''), jdecode('%2F78818%2F83239.html'), 'true',[],'',''],
		['PAGE','64334',jdecode('Nachwuchs'),jdecode(''), jdecode('%2F78818%2F64334.html'), 'true',[],'','']
	],'',''],
	['PAGE','66034',jdecode('Vancouver+2010'),jdecode(''), jdecode('%2F66034.html'), 'false',[],'',''],
	['PAGE','61534',jdecode('Skateathon+2010'),jdecode(''), jdecode('%2F61534.html'), 'false',[],'',''],
	['PAGE','99034',jdecode('Kontaktliste'),jdecode(''), jdecode('%2F99034.html'), 'true',[],'',''],
	['PAGE','83260',jdecode('Vorstand'),jdecode(''), jdecode('%2F83260.html'), 'true',[],'',''],
	['PAGE','83281',jdecode('Statuten'),jdecode(''), jdecode('%2F83281.html'), 'true',[],'',''],
	['PAGE','98234',jdecode('Organigramm'),jdecode(''), jdecode('%2F98234.html'), 'true',[],'',''],
	['PAGE','57834',jdecode('WB+Artikel+vom+15.01%2C+Neu%21'),jdecode(''), jdecode('%2F57834.html'), 'false',[],'',''],
	['PAGE','41934',jdecode('Geschichte'),jdecode(''), jdecode('%2F41934.html'), 'true',[],'',''],
	['PAGE','41976',jdecode('G%C3%B6nner'),jdecode(''), jdecode('%2F41976%2Findex.html'), 'true',[ 
		['PAGE','78839',jdecode('666er+Club'),jdecode(''), jdecode('%2F41976%2F78839.html'), 'true',[],'',''],
		['PAGE','78860',jdecode('333er+Club'),jdecode(''), jdecode('%2F41976%2F78860.html'), 'true',[],'',''],
		['PAGE','83344',jdecode('99er+Club'),jdecode(''), jdecode('%2F41976%2F83344.html'), 'true',[],'','']
	],'',''],
	['PAGE','41997',jdecode('Sponsoren'),jdecode(''), jdecode('%2F41997%2Findex.html'), 'true',[ 
		['PAGE','78881',jdecode('Hauptsponsor'),jdecode(''), jdecode('%2F41997%2F78881.html'), 'true',[],'',''],
		['PAGE','78902',jdecode('Co+Sponsoren'),jdecode(''), jdecode('%2F41997%2F78902.html'), 'true',[],'',''],
		['PAGE','122534',jdecode('Auto+Sponsor'),jdecode(''), jdecode('%2F41997%2F122534.html'), 'true',[],'',''],
		['PAGE','78923',jdecode('Sponsoren'),jdecode(''), jdecode('%2F41997%2F78923.html'), 'true',[],'','']
	],'',''],
	['PAGE','4215',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F4215.html'), 'true',[],'',''],
	['PAGE','25512',jdecode('Fotos+'),jdecode(''), jdecode('%2F25512.html'), 'true',[],'',''],
	['PAGE','115934',jdecode('Fotos+Junioren'),jdecode(''), jdecode('%2F115934.html'), 'true',[],'',''],
	['PAGE','27323',jdecode('Fotos+vom+Saastal'),jdecode(''), jdecode('%2F27323.html'), 'true',[],'',''],
	['PAGE','80834',jdecode('Archiv'),jdecode(''), jdecode('%2F80834.html'), 'false',[],'',''],
	['PAGE','4446',jdecode('Kantine'),jdecode(''), jdecode('%2F4446.html'), 'true',[],'',''],
	['PAGE','8022',jdecode('SMS+Resultatdienst'),jdecode(''), jdecode('%2F8022.html'), 'true',[],'',''],
	['PAGE','32223',jdecode('Eishockey+Movies'),jdecode(''), jdecode('%2F32223.html'), 'false',[],'',''],
	['PAGE','49734',jdecode('Sportaktuell%2C02.12.2009'),jdecode(''), jdecode('%2F49734.html'), 'false',[],'',''],
	['PAGE','4467',jdecode('Links'),jdecode(''), jdecode('%2F4467.html'), 'true',[],'',''],
	['PAGE','4299',jdecode('Kontaktformular'),jdecode(''), jdecode('%2F4299.html'), 'true',[],'','']];
var siteelementCount=45;
theSitetree.topTemplateName='Deepcolor';
theSitetree.paletteFamily='F9F6BC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10349';
theSitetree.graphicsetId='10472';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FDEE91';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Deepcolor',
				paletteFamily: 	'F9F6BC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10349',
				graphicsetId: 	'10472',
				contentColor: 	'000000',
				contentBGColor: 'FDEE91',
				a_color: 		'F9F6BC',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-4215abw330ineyif']={
webappId:    '1002',
documentId:  '4215',
internalId:  '4215abw330ineyif',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '149445',
internalId:  '-',
customField: '20120130-102639'
};
webappMappings['7008']=webappMappings['7008-7626']={
webappId:    '7008',
documentId:  '4299',
internalId:  '7626',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20120110-091013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4215',
internalId:  '',
customField: '20091006-182410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115934',
internalId:  '',
customField: '20101027-173901'
};
webappMappings['7060']=webappMappings['7060-5cbba8e80118e17f8ec9d6309bdc4369']={
webappId:    '7060',
documentId:  '115934',
internalId:  '5cbba8e80118e17f8ec9d6309bdc4369',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78881',
internalId:  '',
customField: '20100926-120429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20120119-155632'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '148745',
internalId:  '-',
customField: '20120119-160449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4446',
internalId:  '',
customField: '20101119-081450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4320',
internalId:  '',
customField: '20101019-084106'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41934',
internalId:  '',
customField: '20091029-211232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4299',
internalId:  '',
customField: '20091006-182331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4467',
internalId:  '',
customField: '20091014-151456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25512',
internalId:  '',
customField: '20091013-120516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8022',
internalId:  '',
customField: '20100927-111011'
};
webappMappings['1501']=webappMappings['1501-30282737']={
webappId:    '1501',
documentId:  '4101',
internalId:  '30282737',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27323',
internalId:  '',
customField: '20091013-124531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133534',
internalId:  '',
customField: '20120119-155554'
};
webappMappings['7060']=webappMappings['7060-0e76e49fcd4088ef8f82b75eb9673fcd']={
webappId:    '7060',
documentId:  '25512',
internalId:  '0e76e49fcd4088ef8f82b75eb9673fcd',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-390cbf7573159c0d873351ab18d25252']={
webappId:    '7060',
documentId:  '27323',
internalId:  '390cbf7573159c0d873351ab18d25252',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78860',
internalId:  '',
customField: '20100803-174740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41976',
internalId:  '',
customField: '20100803-174638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41997',
internalId:  '',
customField: '20100927-175950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78818',
internalId:  '',
customField: '20101027-171815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83134',
internalId:  '',
customField: '20110917-162618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32223',
internalId:  '',
customField: '20091017-113545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78839',
internalId:  '',
customField: '20100803-174708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78923',
internalId:  '',
customField: '20111025-120417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49734',
internalId:  '',
customField: '20091203-091258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57834',
internalId:  '',
customField: '20100115-122058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61534',
internalId:  '',
customField: '20100118-170350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78902',
internalId:  '',
customField: '20100927-110158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64334',
internalId:  '',
customField: '20101102-113801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66034',
internalId:  '',
customField: '20100129-102638'
};
webappMappings['7060']=webappMappings['7060-0ee9b411cc4c2a0d2a232c04b10c5fb7']={
webappId:    '7060',
documentId:  '4446',
internalId:  '0ee9b411cc4c2a0d2a232c04b10c5fb7',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-524ea1a7b7f870cf2402aa7a60d8bf3e']={
webappId:    '7060',
documentId:  '80834',
internalId:  '524ea1a7b7f870cf2402aa7a60d8bf3e',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80834',
internalId:  '',
customField: '20100804-120300'
};
webappMappings['7090']=webappMappings['7090-1']={
webappId:    '7090',
documentId:  '81334',
internalId:  '1',
customField: 'language:de;country:CH;name:;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81334',
internalId:  '',
customField: '20100804-122725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99034',
internalId:  '',
customField: '20101011-075229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83239',
internalId:  '',
customField: '20100927-172232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83260',
internalId:  '',
customField: '20110917-162025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83281',
internalId:  '',
customField: '20100927-174442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106434',
internalId:  '',
customField: '20101007-174838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98234',
internalId:  '',
customField: '20101007-173515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83344',
internalId:  '',
customField: '20100906-063344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118234',
internalId:  '',
customField: '20111025-115628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122534',
internalId:  '',
customField: '20101123-165635'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW330INEYIF';
var companyName   = 'EHC+SAASTAL';
var htmlTitle	  = 'EHC+Saastal';
var metaKeywords  = '';
var metaContents  = 'SaastalEHC+SaastalEishockey+SaastalEHC+FletschhornEishockey+Saas+Grund';
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();
};

