/* [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','13101',jdecode('Home'),jdecode(''),'/13101.html','true',[],'',''],
	['PAGE','100615',jdecode('Nationalliga+A'),jdecode(''),'/100615.html','true',[],'',''],
	['PAGE','99815',jdecode('Nationalliga+B'),jdecode(''),'/99815.html','true',[],'',''],
	['PAGE','57957',jdecode('Cup'),jdecode(''),'/57957.html','true',[],'',''],
	['PAGE','13236',jdecode('International'),jdecode(''),'/13236/index.html','true',[ 
		['PAGE','91715',jdecode('Pilsen-Cup+2010'),jdecode(''),'/13236/91715.html','true',[],'',''],
		['PAGE','105415',jdecode('WJC+Villach+2010'),jdecode(''),'/13236/105415.html','true',[],'','']
	],'',''],
	['PAGE','16701',jdecode('Background'),jdecode(''),'/16701/index.html','true',[ 
		['PAGE','16722',jdecode('Interviews'),jdecode(''),'/16701/16722.html','true',[],'',''],
		['PAGE','59615',jdecode('Blockwechsel'),jdecode(''),'/16701/59615.html','true',[],'',''],
		['PAGE','16743',jdecode('Transfermarkt'),jdecode(''),'/16701/16743.html','true',[],'',''],
		['PAGE','16764',jdecode('Testspiele'),jdecode(''),'/16701/16764.html','true',[],'',''],
		['PAGE','33901',jdecode('streethockeyfans-TV'),jdecode(''),'/16701/33901.html','true',[],'','']
	],'',''],
	['PAGE','41501',jdecode('Interaktiv'),jdecode(''),'/41501/index.html','true',[ 
		['PAGE','13278',jdecode('Diskussionsforum'),jdecode(''),'/41501/13278.html','true',[],'',''],
		['PAGE','29901',jdecode('Umfrage'),jdecode(''),'/41501/29901.html','true',[],'',''],
		['PAGE','41522',jdecode('Shop'),jdecode(''),'/41501/41522.html','true',[],'','']
	],'',''],
	['PAGE','13299',jdecode('Impressum'),jdecode(''),'/13299.html','true',[],'',''],
	['PAGE','23801',jdecode('Wir+suchen...'),jdecode(''),'/23801.html','true',[],'',''],
	['PAGE','57978',jdecode('Archiv'),jdecode(''),'/57978/index.html','true',[ 
		['PAGE','13194',jdecode('NLA+08%2F09'),jdecode(''),'/57978/13194.html','false',[],'',''],
		['PAGE','13215',jdecode('NLB+08%2F09'),jdecode(''),'/57978/13215.html','false',[],'',''],
		['PAGE','25201',jdecode('Cup+08%2F09'),jdecode(''),'/57978/25201.html','false',[],'',''],
		['PAGE','30101',jdecode('A-WM+2009'),jdecode(''),'/57978/30101.html','false',[],'',''],
		['PAGE','36622',jdecode('Damen-WM+2009'),jdecode(''),'/57978/36622.html','false',[],'',''],
		['PAGE','36601',jdecode('U18-EM+2009'),jdecode(''),'/57978/36601.html','false',[],'','']
	],'',''],
	['PAGE','36643',jdecode('A-Nati'),jdecode(''),'/36643.html','false',[],'',''],
	['PAGE','36664',jdecode('U18-Nati'),jdecode(''),'/36664.html','false',[],'',''],
	['PAGE','36685',jdecode('Damen-Nati'),jdecode(''),'/36685.html','false',[],'',''],
	['PAGE','47315',jdecode('WM+2009'),jdecode(''),'/47315.html','false',[],'',''],
	['PAGE','87815',jdecode('U20Canada'),jdecode(''),'/87815.html','false',[],'',''],
	['PAGE','87836',jdecode('U20Tschechien'),jdecode(''),'/87836.html','false',[],'',''],
	['PAGE','57915',jdecode('nlaqual0910'),jdecode(''),'/57915.html','false',[],'',''],
	['PAGE','57936',jdecode('nlbqual0910'),jdecode(''),'/57936.html','false',[],'',''],
	['PAGE','97315',jdecode('nlapo0910'),jdecode(''),'/97315.html','false',[],'',''],
	['PAGE','99615',jdecode('nlbpo0910'),jdecode(''),'/99615.html','false',[],'',''],
	['PAGE','98215',jdecode('nla'),jdecode(''),'/98215.html','false',[],'',''],
	['PAGE','107715',jdecode('U20Slowakei'),jdecode(''),'/107715.html','false',[],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Speed';
theSitetree.paletteFamily='920000';
theSitetree.keyvisualId='2342';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='373';
theSitetree.graphicsetId='424';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='920000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Speed',
				paletteFamily: 	'920000',
				keyvisualId: 	'2342',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'373',
				graphicsetId: 	'424',
				contentColor: 	'FFFFFF',
				contentBGColor: '920000',
				a_color: 		'920000',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20100626-165131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87815',
internalId:  '',
customField: '20100608-194012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87836',
internalId:  '',
customField: '20100608-194042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25201',
internalId:  '',
customField: '20090324-234140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13194',
internalId:  '',
customField: '20090510-212934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13215',
internalId:  '',
customField: '20090510-213113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13236',
internalId:  '',
customField: '20100607-232551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13278',
internalId:  '',
customField: '20090728-071324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13299',
internalId:  '',
customField: '20100506-203530'
};
webappMappings['7050']=webappMappings['7050-563']={
webappId:    '7050',
documentId:  '16722',
internalId:  '563',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16722',
internalId:  '',
customField: '20090314-101729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16743',
internalId:  '',
customField: '20100617-204222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16764',
internalId:  '',
customField: '20090920-173830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20090505-214817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20090424-090925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91715',
internalId:  '',
customField: '20100207-232309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97315',
internalId:  '',
customField: '20100524-103745'
};
webappMappings['7005']=webappMappings['7005-310']={
webappId:    '7005',
documentId:  '29901',
internalId:  '310',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29901',
internalId:  '',
customField: '20100504-090915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30101',
internalId:  '',
customField: '20090621-072632'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '13101',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-29240416']={
webappId:    '1501',
documentId:  '13101',
internalId:  '29240416',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20100626-063409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36601',
internalId:  '',
customField: '20090607-174003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36622',
internalId:  '',
customField: '20090618-234652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36643',
internalId:  '',
customField: '20090611-160113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36664',
internalId:  '',
customField: '20090605-190057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36685',
internalId:  '',
customField: '20090521-091740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20090528-094034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41522',
internalId:  '',
customField: '20090528-205941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47315',
internalId:  '',
customField: '20090614-162251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57915',
internalId:  '',
customField: '20100307-200107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57936',
internalId:  '',
customField: '20100314-171838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57957',
internalId:  '',
customField: '20100314-171322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57978',
internalId:  '',
customField: '20091127-205451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59615',
internalId:  '',
customField: '20100429-140455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98215',
internalId:  '',
customField: '20100219-102853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99615',
internalId:  '',
customField: '20100502-195006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99815',
internalId:  '',
customField: '20100425-224255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100615',
internalId:  '',
customField: '20100307-203000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105415',
internalId:  '',
customField: '20100626-165249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107715',
internalId:  '',
customField: '20100608-200217'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW330INERT9';
var companyName   = 'www.streethockeyfans.ch';
var htmlTitle	  = 'www.streethockeyfans.ch';
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();
};
