/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','11701',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F11701.html'), 'true',[],'',''],
	['PAGE','73001',jdecode('Die+R%C3%A4ume'),jdecode(''), jdecode('%2F73001.html'), 'true',[],'',''],
	['PAGE','4601',jdecode('Standorte'),jdecode(''), jdecode('%2F4601.html'), 'true',[],'',''],
	['PAGE','36601',jdecode('Kurse+f%C3%BCr+Kinder'),jdecode(''), jdecode('%2F36601.html'), 'true',[],'',''],
	['PAGE','38322',jdecode('Kurse+f%C3%BCr+Erwachsene'),jdecode(''), jdecode('%2F38322.html'), 'true',[],'',''],
	['PAGE','53401',jdecode('Massagen'),jdecode(''), jdecode('%2F53401.html'), 'true',[],'',''],
	['PAGE','4622',jdecode('Stundenplan'),jdecode(''), jdecode('%2F4622.html'), 'true',[],'',''],
	['PAGE','11001',jdecode('Kurskosten'),jdecode(''), jdecode('%2F11001.html'), 'true',[],'',''],
	['PAGE','4685',jdecode('AGB%60s'),jdecode(''), jdecode('%2F4685.html'), 'true',[],'',''],
	['PAGE','4643',jdecode('Kontakt'),jdecode(''), jdecode('%2F4643.html'), 'true',[],'',''],
	['PAGE','4664',jdecode('Galerie'),jdecode(''), jdecode('%2F4664.html'), 'true',[],'',''],
	['PAGE','39906',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F39906.html'), 'true',[],'',''],
	['PAGE','105901',jdecode('Ticket+Vorverkauf'),jdecode(''), jdecode('%2F105901%2Findex.html'), 'true',[ 
		['PAGE','39901',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F105901%2F39901.html'), 'false',[],'','']
	],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Sportive';
theSitetree.paletteFamily='E3FFDD';
theSitetree.keyvisualId='2685';
theSitetree.keyvisualName='tanz.jpg';
theSitetree.fontsetId='220';
theSitetree.graphicsetId='263';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E3FFDD';
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: 			'Sportive',
				paletteFamily: 	'E3FFDD',
				keyvisualId: 	'2685',
				keyvisualName: 	'tanz.jpg',
				fontsetId: 		'220',
				graphicsetId: 	'263',
				contentColor: 	'000000',
				contentBGColor: 'E3FFDD',
				a_color: 		'E3FFDD',
				b_color: 		'B907BC',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-2085']={
webappId:    '7008',
documentId:  '4643',
internalId:  '2085',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20111210-085940'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20110612-132518'
};
webappMappings['1002']=webappMappings['1002-39906abw0x0inxsh6']={
webappId:    '1002',
documentId:  '39906',
internalId:  '39906abw0x0inxsh6',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73001',
internalId:  '',
customField: '20080202-082202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20061119-091546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36601',
internalId:  '',
customField: '20080713-101213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38322',
internalId:  '',
customField: '20110320-081038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53401',
internalId:  '',
customField: '20070517-163220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4622',
internalId:  '',
customField: '20110831-160613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20111119-094040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4685',
internalId:  '',
customField: '20061126-122451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4643',
internalId:  '',
customField: '20061130-110338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4664',
internalId:  '',
customField: '20110904-135403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39906',
internalId:  '',
customField: '20061129-155836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39901',
internalId:  '',
customField: '20061129-155836'
};
webappMappings['7008']=webappMappings['7008-12694']={
webappId:    '7008',
documentId:  '105901',
internalId:  '12694',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105901',
internalId:  '',
customField: '20111126-131342'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXSH6';
var companyName   = 'sbschool+++++++++ballet+dance+and+more';
var htmlTitle	  = 'Ballett+Tanz+und+mehr+%E2%80%A6%E2%80%A6';
var metaKeywords  = 'Ballett%2C+Tanz%2C+Kinderballett%2C+Ballettschule%2C+Tanzschule%2C+Jazztanz%2C+Jazzballett%2C+Bolshoi%2C+Bolshoiballet%2C+Elena%2C+Problemzonen%2C+Privatunterricht%2C+Jazz%2C+Moderntanz%2C+Improvisation%2C+Moskauballett%2C+Kindertanz%2C+Disziplin%2C+Selbstbewusstsein%2C+K%C3%B6rperhaltung%2C+K%C3%B6rperbewusstsein%2C+%C3%9Cbergewicht%2C+Pointes%2C+Pasdedeux%2C+Repertoire%2C+www.sbschool.ch%2C+www.sbschule.ch%2C+Krummenacher%2C+Elena+Krummenacher%2C+sbschol+GmbH%2C+sbschool%2C+Muki%2C+Vaki%2C+ballet+dance+and+more%2C+Tanz-Center-R%C3%BCti+GmbH%2C+Gemeinschaftszentrum+Seebach%2C+TEZET+Quartierzentrum%2C+Personaltraining%2C+Tanztherapie%2C+Privatlektionen++';
var metaContents  = 'Die+swissbolshoischool+unterrichtet+Kinder+ab+3+Jahren+und+Erwachsene+jeden+Alters+in+klassischem+Ballett%2C+Modern%2C+Jazz+und+vielem+mehr.+Eigens+entwickelte+Methode+f%C3%BCr+K%C3%B6rperhaltung%2C+Problemzonen+Training++und+K%C3%B6rperbewusstsein.+';
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();
};

