/* [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(''), jdecode('%2F601%2Findex.html'), 'true',[ 
		['PAGE','19701',jdecode('Laden-Lokal'),jdecode(''), jdecode('%2F601%2F19701.html'), 'true',[],'','']
	],'',''],
	['PAGE','5022',jdecode('Unsere+Produkte'),jdecode(''), jdecode('%2F5022%2Findex.html'), 'true',[ 
		['PAGE','27922',jdecode('Browning'),jdecode(''), jdecode('%2F5022%2F27922.html'), 'true',[],'',''],
		['PAGE','27964',jdecode('Quantum'),jdecode(''), jdecode('%2F5022%2F27964.html'), 'true',[],'',''],
		['PAGE','27901',jdecode('Rhino'),jdecode(''), jdecode('%2F5022%2F27901.html'), 'true',[],'',''],
		['PAGE','147422',jdecode('Black+Cat'),jdecode(''), jdecode('%2F5022%2F147422.html'), 'true',[],'',''],
		['PAGE','27943',jdecode('Zebco'),jdecode(''), jdecode('%2F5022%2F27943.html'), 'true',[],'',''],
		['PAGE','147443',jdecode('Jackson'),jdecode(''), jdecode('%2F5022%2F147443.html'), 'true',[],'',''],
		['PAGE','121234',jdecode('Fin-Nor'),jdecode(''), jdecode('%2F5022%2F121234.html'), 'true',[],'',''],
		['PAGE','123334',jdecode('Van+Staal'),jdecode(''), jdecode('%2F5022%2F123334.html'), 'true',[],'',''],
		['PAGE','73801',jdecode('Katalog+2011'),jdecode(''), jdecode('%2F5022%2F73801.html'), 'true',[],'','']
	],'',''],
	['PAGE','31101',jdecode('Angebote'),jdecode(''), jdecode('%2F31101%2Findex.html'), 'true',[ 
		['PAGE','65501',jdecode('Neuheiten'),jdecode(''), jdecode('%2F31101%2F65501.html'), 'true',[],'',''],
		['PAGE','5064',jdecode('Aktionen'),jdecode(''), jdecode('%2F31101%2F5064.html'), 'true',[],'',''],
		['PAGE','31122',jdecode('Reparatur+Service'),jdecode(''), jdecode('%2F31101%2F31122.html'), 'true',[],'',''],
		['PAGE','24301',jdecode('Kurse'),jdecode(''), jdecode('%2F31101%2F24301.html'), 'true',[],'','']
	],'',''],
	['PAGE','69101',jdecode('Patente'),jdecode(''), jdecode('%2F69101%2Findex.html'), 'true',[ 
		['PAGE','70501',jdecode('Fangmindestm.%2FSchonz.'),jdecode(''), jdecode('%2F69101%2F70501.html'), 'true',[],'','']
	],'',''],
	['PAGE','24322',jdecode('Angler-Reisen'),jdecode(''), jdecode('%2F24322%2Findex.html'), 'true',[ 
		['PAGE','41501',jdecode('Alaska'),jdecode(''), jdecode('%2F24322%2F41501.html'), 'true',[],'',''],
		['PAGE','79401',jdecode('Alaska+Bilder+2008'),jdecode(''), jdecode('%2F24322%2F79401.html'), 'true',[],'',''],
		['PAGE','43501',jdecode('Maloja'),jdecode(''), jdecode('%2F24322%2F43501.html'), 'true',[],'','']
	],'',''],
	['PAGE','15601',jdecode('Fischereivereine'),jdecode(''), jdecode('%2F15601.html'), 'true',[],'',''],
	['PAGE','133667',jdecode('Gefangene+Fische'),jdecode(''), jdecode('%2F133667%2Findex.html'), 'true',[ 
		['PAGE','159733',jdecode('2011'),jdecode(''), jdecode('%2F133667%2F159733.html'), 'true',[],'',''],
		['PAGE','133688',jdecode('2010'),jdecode(''), jdecode('%2F133667%2F133688.html'), 'true',[],'',''],
		['PAGE','101801',jdecode('2009'),jdecode(''), jdecode('%2F133667%2F101801.html'), 'true',[],'',''],
		['PAGE','57101',jdecode('2008'),jdecode(''), jdecode('%2F133667%2F57101.html'), 'true',[],'','']
	],'',''],
	['PAGE','652',jdecode('Kontakt'),jdecode(''), jdecode('%2F652%2Findex.html'), 'true',[ 
		['PAGE','6601',jdecode('Lageplan'),jdecode(''), jdecode('%2F652%2F6601.html'), 'true',[],'',''],
		['PAGE','7301',jdecode('Routenplaner'),jdecode(''), jdecode('%2F652%2F7301.html'), 'true',[],'','']
	],'',''],
	['PAGE','13906',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F13906%2Findex.html'), 'true',[ 
		['PAGE','13901',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F13906%2F13901.html'), 'false',[],'','']
	],'',''],
	['PAGE','106512',jdecode('Infos+%2F+Sonstiges'),jdecode(''), jdecode('%2F106512%2Findex.html'), 'true',[ 
		['PAGE','110912',jdecode('News'),jdecode(''), jdecode('%2F106512%2F110912.html'), 'true',[],'',''],
		['PAGE','144511',jdecode('Links'),jdecode(''), jdecode('%2F106512%2F144511.html'), 'true',[],'',''],
		['PAGE','146122',jdecode('Events'),jdecode(''), jdecode('%2F106512%2F146122.html'), 'true',[],'','']
	],'',''],
	['PAGE','153822',jdecode('Schweizer-Teams'),jdecode(''), jdecode('%2F153822%2Findex.html'), 'true',[ 
		['PAGE','153843',jdecode('Black-Cat'),jdecode(''), jdecode('%2F153822%2F153843.html'), 'true',[],'',''],
		['PAGE','153864',jdecode('Rhino-Trolling'),jdecode(''), jdecode('%2F153822%2F153864.html'), 'true',[],'','']
	],'','']];
var siteelementCount=41;
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 prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
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: '20120111-214243'
};
webappMappings['1501']=webappMappings['1501-7037494']={
webappId:    '1501',
documentId:  '601',
internalId:  '7037494',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20101103-160130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65501',
internalId:  '',
customField: '20110121-141347'
};
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: '20120111-214315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121234',
internalId:  '',
customField: '20101103-151502'
};
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: '20101103-134946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27964',
internalId:  '',
customField: '20101103-145719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27943',
internalId:  '',
customField: '20101103-151144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20101103-145756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73801',
internalId:  '',
customField: '20101103-134654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69101',
internalId:  '',
customField: '20100909-090557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70501',
internalId:  '',
customField: '20081202-150821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31122',
internalId:  '',
customField: '20110607-220918'
};
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: '20110607-220714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57101',
internalId:  '',
customField: '20090603-161429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20120111-215103'
};
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:  '101801',
internalId:  '',
customField: '20100708-145126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144511',
internalId:  '',
customField: '20101103-160121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159733',
internalId:  '',
customField: '20110728-135009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106512',
internalId:  '',
customField: '20120111-215122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110912',
internalId:  '',
customField: '20101207-140717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123334',
internalId:  '',
customField: '20101103-151639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133688',
internalId:  '',
customField: '20110303-121234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133667',
internalId:  '',
customField: '20110607-220707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146122',
internalId:  '',
customField: '20111102-142603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147422',
internalId:  '',
customField: '20101103-150531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147443',
internalId:  '',
customField: '20110407-200026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153822',
internalId:  '',
customField: '20101118-144252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153843',
internalId:  '',
customField: '20101118-140310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153864',
internalId:  '',
customField: '20101123-111322'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
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();
};

