/* [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','2401',jdecode('Home'),jdecode(''), jdecode('%2F2401.html'), 'true',[],'',''],
	['PAGE','2601',jdecode('%C3%9Cber+uns'),jdecode(''), jdecode('%2F2601.html'), 'true',[],'',''],
	['PAGE','2901',jdecode('Gem%C3%A4lde'),jdecode(''), jdecode('%2F2901.html'), 'true',[],'',''],
	['PAGE','4801',jdecode('Feuerspiel+und+Bauchtanz'),jdecode(''), jdecode('%2F4801.html'), 'true',[],'',''],
	['PAGE','3322',jdecode('Stelzenlauf'),jdecode(''), jdecode('%2F3322.html'), 'true',[],'',''],
	['PAGE','3364',jdecode('Termine'),jdecode(''), jdecode('%2F3364.html'), 'true',[],'',''],
	['PAGE','14001',jdecode('Links+'),jdecode(''), jdecode('%2F14001.html'), 'true',[],'',''],
	['PAGE','3385',jdecode('Kontakt%2F+Impressum'),jdecode(''), jdecode('%2F3385.html'), 'true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Heros';
theSitetree.paletteFamily='D38C2A';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32056';
theSitetree.graphicsetId='13875';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='454545';
var localeDef={
  language: 'de',
  country: 'DE'
};
var prodDef={
  wl_name: 'alfahosting',
  product: 'WSCSYSSSSLY0XNIF'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Heros',
				paletteFamily: 	'D38C2A',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32056',
				graphicsetId: 	'13875',
				contentColor: 	'FFFFFF',
				contentBGColor: '454545',
				a_color: 		'323232',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2401',
internalId:  '',
customField: '20100708-081757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2601',
internalId:  '',
customField: '20091214-082241'
};
webappMappings['7060']=webappMappings['7060-9270cb28f1ea9a56b4aab7f1c4de2920']={
webappId:    '7060',
documentId:  '2901',
internalId:  '9270cb28f1ea9a56b4aab7f1c4de2920',
customField: 'language:de;country:DE;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20110210-132316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20110210-133339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3322',
internalId:  '',
customField: '20100611-091034'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3364',
internalId:  '',
customField: '20110409-092101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3385',
internalId:  '',
customField: '20110429-150253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20100723-195953'
};
var webAppHostname = 'cgi-wsc.alfahosting.de:80';
var canonHostname = 'wsc.alfahosting.de';
var accountId     = 'AAHS10IN20V2';
var companyName   = 'Die+Gaukler+Jasmin+umd+Michi++Gaukler+aus+Leidenschaft+%21+';
var htmlTitle	  = 'Gaukler+aus+Leidenschaft';
var metaKeywords  = 'Feuershow%2C+Gaukler%2C+Feuerspiel%2C+Poi%2C+Funkenpoi%2C+Feuerf%C3%A4chertanz%2C+Stelzenl%C3%A4ufer%2C+Feuerstab%2C+Mittelalter%2C+Fantasy%2Corientalischer+Tanz%2C+Feuer%2C+Feuerspringseil%2C+Feuerspucken%2C+Feuerschlucken%2C+K%C3%B6rperfeuer';
var metaContents  = 'Wir+bieten+Ihnen+Feuershow%2C+orientalischen+Tanz+und+Stelzengaukeley+f%C3%BCr+Ihre+Hochzeit%2C+Mittelalterm%C3%A4rkte+Geburtstage+oder+Firmenfeiern.+Viel+Spa%C3%9F+auf+unserer+Homepage';
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();
};

