/* [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','20301',jdecode('%21%21+Aktuell+%21%21'),jdecode(''), jdecode('%2F20301.html'), 'true',[],'',''],
	['PAGE','1401',jdecode('%C3%9Cbersicht+%2F+Overview'),jdecode(''), jdecode('%2F1401.html'), 'true',[],'',''],
	['PAGE','5222',jdecode('Onlineshop+'),jdecode(''), jdecode('%2F5222.html'), 'true',[],'',''],
	['PAGE','12201',jdecode('Versandkosten+%2F+Shipping+costs'),jdecode(''), jdecode('%2F12201.html'), 'true',[],'',''],
	['PAGE','19101',jdecode('TaekwondoAerobic%C2%A9'),jdecode(''), jdecode('%2F19101.html'), 'true',[],'',''],
	['PAGE','29401',jdecode('Pr%C3%BCfungsanforderungen'),jdecode(''), jdecode('%2F29401.html'), 'true',[],'',''],
	['PAGE','30001',jdecode('Terminkalender'),jdecode(''), jdecode('%2F30001.html'), 'true',[],'',''],
	['PAGE','5201',jdecode('Wir+%C3%BCber+uns+%2F+About+us'),jdecode(''), jdecode('%2F5201.html'), 'true',[],'',''],
	['PAGE','6901',jdecode('Fightwear'),jdecode(''), jdecode('%2F6901.html'), 'true',[],'',''],
	['PAGE','12601',jdecode('Angebot+%2F+Bid'),jdecode(''), jdecode('%2F12601.html'), 'true',[],'',''],
	['PAGE','11522',jdecode('Bilder+%2F+Pictures'),jdecode(''), jdecode('%2F11522.html'), 'true',[],'',''],
	['PAGE','6922',jdecode('Sport+%26+Gesundheit'),jdecode(''), jdecode('%2F6922.html'), 'true',[],'',''],
	['PAGE','8501',jdecode('Network+Marketing'),jdecode(''), jdecode('%2F8501.html'), 'true',[],'',''],
	['PAGE','8301',jdecode('Jobs'),jdecode(''), jdecode('%2F8301.html'), 'true',[],'',''],
	['PAGE','11564',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F11564.html'), 'true',[],'',''],
	['PAGE','5243',jdecode('Impressum'),jdecode(''), jdecode('%2F5243.html'), 'true',[],'',''],
	['PAGE','5264',jdecode('Kontaktformular+%2F+Contact'),jdecode(''), jdecode('%2F5264.html'), 'true',[],'',''],
	['PAGE','26201',jdecode('Links'),jdecode(''), jdecode('%2F26201.html'), 'true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Brush';
theSitetree.paletteFamily='E45858';
theSitetree.keyvisualId='11942';
theSitetree.keyvisualName='kv_11942.jpg';
theSitetree.fontsetId='33213';
theSitetree.graphicsetId='14100';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Brush',
				paletteFamily: 	'E45858',
				keyvisualId: 	'11942',
				keyvisualName: 	'kv_11942.jpg',
				fontsetId: 		'33213',
				graphicsetId: 	'14100',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20100629-184657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5222',
internalId:  '',
customField: '20100131-153205'
};
webappMappings['4001']=webappMappings['4001-29376573']={
webappId:    '4001',
documentId:  '5222',
internalId:  '29376573',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-5565']={
webappId:    '7008',
documentId:  '5264',
internalId:  '5565',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6922',
internalId:  '',
customField: '20100629-185950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20090602-112309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100629-185506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5243',
internalId:  '',
customField: '20100130-235838'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5222',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '5222',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20100207-233733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20090602-112525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5264',
internalId:  '',
customField: '20100130-235900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29401',
internalId:  '',
customField: '20100209-214515'
};
webappMappings['7060']=webappMappings['7060-0531a0e041ecf8387e60a24f6d1c94a1']={
webappId:    '7060',
documentId:  '11522',
internalId:  '0531a0e041ecf8387e60a24f6d1c94a1',
customField: 'language:de;country:CH;'
};
webappMappings['1002']=webappMappings['1002-11564abw330ineov0']={
webappId:    '1002',
documentId:  '11564',
internalId:  '11564abw330ineov0',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26201',
internalId:  '',
customField: '20100929-171111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11522',
internalId:  '',
customField: '20100131-124427'
};
webappMappings['1501']=webappMappings['1501-29438080']={
webappId:    '1501',
documentId:  '5222',
internalId:  '29438080',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11564',
internalId:  '',
customField: '20090531-144643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20100629-185224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100131-153613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12201',
internalId:  '',
customField: '20100131-153241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20120202-173718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20100131-153657'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW330INEOV0';
var companyName   = 'Fightwear+-+TaekwondoAerobic%C2%A9+-+Zellenergie-Konzept';
var htmlTitle	  = 'Fightwear+-+Budoartikel+zu+Discountpreisen';
var metaKeywords  = 'Engergiearbeit%2C+Selbstheilung%2C+Reiki%2C+Shambala%2C+Erholung%2C+Budoartikel%2C+Kampfsportartikel%2C+Kampfsport%2C+Lebensqualitaet%2C+Gesundheit';
var metaContents  = 'Reiki%2C+Energiearbeit%2C+Erholung%2C+Selbstheilung%2C+Budoartikel%2C+Kampfsportartikel%2C+Kampfsport%2C+Lebensqualitaet%2C+Gesundheit+';
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();
};

