/* [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','4482',jdecode('Home'),jdecode(''),'/4482.html','true',[],'',''],
	['PAGE','4539',jdecode('Portrait'),jdecode(''),'/4539.html','true',[],'',''],
	['PAGE','9065',jdecode('Workshops'),jdecode(''),'/9065.html','true',[],'',''],
	['PAGE','17315',jdecode('Projekte'),jdecode(''),'/17315.html','true',[],'',''],
	['PAGE','20103',jdecode('Kontakt+l+Links'),jdecode(''),'/20103.html','true',[],'',''],
	['PAGE','53901',jdecode('Galerie'),jdecode(''),'/53901.html','true',[],'','']];
var siteelementCount=6;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='EBEAEA';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='73';
theSitetree.graphicsetId='88';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F5F5F5';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Galerie',
				paletteFamily: 	'EBEAEA',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'73',
				graphicsetId: 	'88',
				contentColor: 	'000000',
				contentBGColor: 'F5F5F5',
				a_color: 		'EBEAEA',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4482',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4482',
internalId:  '',
customField: '20090104-220130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53901',
internalId:  '',
customField: '20080110-185638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4539',
internalId:  '',
customField: '20090104-194506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9065',
internalId:  '',
customField: '20090104-215905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17315',
internalId:  '',
customField: '20090104-220637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20103',
internalId:  '',
customField: '20070315-194016'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'Ahp010IN28PV';
var companyName   = 'AFROTATION++++++++++++++++Tanzperformance+und+-Kurse';
var htmlTitle	  = 'afrotation+dancecompany';
var metaKeywords  = 'afrotation%2C+dancecompany%2C+Tanz%2C+Event%2C+Afro%2C+afrikanisch%2C+africain%2C+african%2C+Hip+Hop%2C+Streetstyle%2C+Streetdance%2C+Jazz%2C+Capoeira%2C+Modern%2C+Gymnastik%2C+Tanzgymnastik%2C+Afrotanz%2C+danse%2C+dance%2C+Workshop%2C+Fusion%2C+Show%2C+Veranstaltung%2C+Freizeit%2C+Hobby%2C+Bewegung%2C+Kurs%2C+cours%2C+course%2C+Rhythmus%2C+Company%2C+Gruppe%2C+Szene%2C+Elemente%2C+Westafrika%2C+Trend%2C+Tanzstil%2C+Wurzeln%2C+roots%2C+racine%2C+Produktion%2C+T%EF%BF%BDnzer%2C+Tanzschule%2C+dancescool%2C+ecole%2C+danse%2C+Impuls%2C+Ragga%2C+Musik%2C+Percussion%2C+Perkussion%2C+Unterricht%2C+Swing%2C+Lindy+Hop%2C+Charleston%2C+Breakdance%2C+Ausbildung%2C+Choreograph%2C+Choreograf%2C+Senegal%2C+Ghana%2C+Burkina+Faso%2C+Elfenbeink%EF%BF%BDste%2C+C%EF%BF%BDte+divoire%2C+Kongo%2C+Souk%2C+Congo%2C+dombolo%2C+Voix%2C+bois%2C+Juboo+Nanu%2C+Florence+Annette%2C+Anf%EF%BF%BDnger+Fortgeschrittene%2C+Studio%2C+Fred+Mazaudou%2C+tradition%2C+Zeato+Koroma%2C+Vivian+Bauen%2C+Kinder%2C+enfants%2C+children%2C+K%EF%BF%BDnstler%2C+Ausdruck%2C+Expression%2C+Training%2C+Auftritt%2C+Sponsoren%2C+Veranstalter%2C+Produzent%2C+Hit%2C+Beat%2C+Move%2C+B%EF%BF%BDhne%2C+Requisiten%2C+Stage%2C+Theater%2C+Gesang%2C+Stimme%2C+Sprechgesang%2C+Kalebasse%2C+Trommel%2C+Instrument%2C+Besen%2C+Ghettoblaster%2C+Kampf%2C+Beleuchtung%2C+Szene%2C+Geschichte%2C+Akt%2C+Familie%2C+Gruppe%2C+Leader%2C+Konflikt%2C+Konfrontation%2C+Toleranz%2C+Fremdartig%2C+Akzeptanz%2C+Fronten%2C+Graffiti%2C+Brasilien%2C+Boubou%2C+Batik%2C+Kopftuch%2C+Publikum%2C+Kreis%2C+Gang%2C+Karneval%2C+Maske%2C+Vogel%2C+lernen%2C+Schritte%2C+Kost%EF%BF%BDme%2C+B%EF%BF%BDhnenbild%2C+Stoff%2C+Konga%2C+Rasseln%2C+Metamorphose%2C+Wechsel%2C+Identit%EF%BF%BDt%2C+Freude%2C+Lebenslust%2C+Energie%2C+Farben%2C+Move%2C+Groove%2C+Respekt%2C+Rivalit%EF%BF%BDt%2C+Identit%EF%BF%BDt%2C+Frakas%2C+Salsa%2C+Musiker%2C+Conga%2C+Audition%2C+Samba%2C+Musician%2C+Fabio+Freire%2C+formbar';
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();
};
