/* [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','601',jdecode('Home'),jdecode(''),'/601/index.html','true',[ 
		['PAGE','19701',jdecode('Laden-Lokal'),jdecode(''),'/601/19701.html','true',[],'','']
	],'',''],
	['PAGE','5022',jdecode('Unsere+Produkte'),jdecode(''),'/5022/index.html','true',[ 
		['PAGE','27922',jdecode('Browning'),jdecode(''),'/5022/27922.html','true',[],'',''],
		['PAGE','27964',jdecode('Quantum'),jdecode(''),'/5022/27964.html','true',[],'',''],
		['PAGE','27943',jdecode('Zebco'),jdecode(''),'/5022/27943.html','true',[],'',''],
		['PAGE','27901',jdecode('Rhino'),jdecode(''),'/5022/27901.html','true',[],'',''],
		['PAGE','121234',jdecode('Fin-Nor'),jdecode(''),'/5022/121234.html','true',[],'',''],
		['PAGE','123334',jdecode('Van+Staal'),jdecode(''),'/5022/123334.html','true',[],'',''],
		['PAGE','73801',jdecode('Katalog+2010'),jdecode(''),'/5022/73801.html','true',[],'','']
	],'',''],
	['PAGE','31101',jdecode('Angebote'),jdecode(''),'/31101/index.html','true',[ 
		['PAGE','65501',jdecode('Neuheiten'),jdecode(''),'/31101/65501.html','true',[],'',''],
		['PAGE','5064',jdecode('Aktionen'),jdecode(''),'/31101/5064.html','true',[],'',''],
		['PAGE','31122',jdecode('Reparatur+Service'),jdecode(''),'/31101/31122.html','true',[],'',''],
		['PAGE','24301',jdecode('Kurse'),jdecode(''),'/31101/24301.html','true',[],'','']
	],'',''],
	['PAGE','69101',jdecode('Patente'),jdecode(''),'/69101/index.html','true',[ 
		['PAGE','70501',jdecode('Fangmindestm.%2FSchonz.'),jdecode(''),'/69101/70501.html','true',[],'','']
	],'',''],
	['PAGE','24322',jdecode('Angler-Reisen'),jdecode(''),'/24322/index.html','true',[ 
		['PAGE','41501',jdecode('Alaska'),jdecode(''),'/24322/41501.html','true',[],'',''],
		['PAGE','79401',jdecode('Alaska+Bilder+2008'),jdecode(''),'/24322/79401.html','true',[],'',''],
		['PAGE','43501',jdecode('Maloja'),jdecode(''),'/24322/43501.html','true',[],'','']
	],'',''],
	['PAGE','15601',jdecode('Fischereivereine'),jdecode(''),'/15601.html','true',[],'',''],
	['PAGE','133667',jdecode('Gefangene+Fische'),jdecode(''),'/133667/index.html','true',[ 
		['PAGE','133688',jdecode('2010'),jdecode(''),'/133667/133688.html','true',[],'',''],
		['PAGE','101801',jdecode('2009'),jdecode(''),'/133667/101801.html','true',[],'',''],
		['PAGE','57101',jdecode('2008'),jdecode(''),'/133667/57101.html','true',[],'',''],
		['PAGE','101601',jdecode('Silus+Wels-Rekord'),jdecode(''),'/133667/101601.html','true',[],'','']
	],'',''],
	['PAGE','652',jdecode('Kontakt'),jdecode(''),'/652/index.html','true',[ 
		['PAGE','6601',jdecode('Lageplan'),jdecode(''),'/652/6601.html','true',[],'',''],
		['PAGE','7301',jdecode('Routenplaner'),jdecode(''),'/652/7301.html','true',[],'','']
	],'',''],
	['PAGE','13906',jdecode('G%C3%A4stebuch'),jdecode(''),'/13906/index.html','true',[ 
		['PAGE','13901',jdecode('Eintr%C3%A4ge'),jdecode(''),'/13906/13901.html','false',[],'','']
	],'',''],
	['PAGE','106512',jdecode('Infos+%2F+Sonstiges'),jdecode(''),'/106512/index.html','true',[ 
		['PAGE','110912',jdecode('News'),jdecode(''),'/106512/110912.html','true',[],'',''],
		['PAGE','106612',jdecode('Berichte+und+Tipps'),jdecode(''),'/106512/106612.html','true',[],'',''],
		['PAGE','144511',jdecode('Links'),jdecode(''),'/106512/144511.html','true',[],'','']
	],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Match';
theSitetree.paletteFamily='A1C183';
theSitetree.keyvisualId='2703';
theSitetree.keyvisualName='kv_2703.jpg';
theSitetree.fontsetId='10701';
theSitetree.graphicsetId='10634';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='DBE9CF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Match',
				paletteFamily: 	'A1C183',
				keyvisualId: 	'2703',
				keyvisualName: 	'kv_2703.jpg',
				fontsetId: 		'10701',
				graphicsetId: 	'10634',
				contentColor: 	'000000',
				contentBGColor: 'DBE9CF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'306102',
				e_color: 		'707070',
				f_color: 		'707070',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '6601',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '7301',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['1002']=webappMappings['1002-13906abw0x0in2kte']={
webappId:    '1002',
documentId:  '13906',
internalId:  '13906abw0x0in2kte',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100821-144942'
};
webappMappings['1501']=webappMappings['1501-7037494']={
webappId:    '1501',
documentId:  '601',
internalId:  '7037494',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20091031-140533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65501',
internalId:  '',
customField: '20091107-150820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31101',
internalId:  '',
customField: '20091031-121709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5064',
internalId:  '',
customField: '20100428-134720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20100428-134825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121234',
internalId:  '',
customField: '20091031-141137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13906',
internalId:  '',
customField: '20061004-135531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20080522-114929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27922',
internalId:  '',
customField: '20091031-111008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27964',
internalId:  '',
customField: '20091031-134642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27943',
internalId:  '',
customField: '20091031-103100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20091031-133341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73801',
internalId:  '',
customField: '20100408-123949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69101',
internalId:  '',
customField: '20081202-143330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70501',
internalId:  '',
customField: '20081202-150821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31122',
internalId:  '',
customField: '20061001-151032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24322',
internalId:  '',
customField: '20070524-081133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20080828-173956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79401',
internalId:  '',
customField: '20081014-122803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43501',
internalId:  '',
customField: '20070530-150323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20100720-110643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57101',
internalId:  '',
customField: '20090603-161429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20090212-115825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20060902-124651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20060828-101355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20060902-114750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101601',
internalId:  '',
customField: '20100128-193215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101801',
internalId:  '',
customField: '20100708-145126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144511',
internalId:  '',
customField: '20100821-150024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106612',
internalId:  '',
customField: '20100428-142551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106512',
internalId:  '',
customField: '20100428-142125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110912',
internalId:  '',
customField: '20100428-141240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123334',
internalId:  '',
customField: '20091031-141212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133688',
internalId:  '',
customField: '20100819-170044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133667',
internalId:  '',
customField: '20100128-193104'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2KTE';
var companyName   = '+++++++Engros+Sport-Fisch+GmbH';
var htmlTitle	  = 'Engros+Sport-Fisch+GmbH';
var metaKeywords  = 'Zebco+Quantum+Browning+Rhino+Fischerei+Angeln+Ruten+Rollen+fischen+fishing+Wetzikon+Fischershop+Fischerladen+Fischereiartikel+Spinner+Angel+K%C3%B6der+Wobbler+Kescher+Feumer+Camping+Fliegenfischen+Fliegenrute+Stenzel+Aktionen+Campingstaff';
var metaContents  = 'Engros+Sport-Fisch+GmbH+Wetzikon';
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();
};
