/* [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(''),'/401.html','true',[],'',''],
	['PAGE','452',jdecode('Ich+%C3%BCber+mich'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','494',jdecode('News'),jdecode(''),'/494.html','true',[],'',''],
	['PAGE','536',jdecode('Fotos'),jdecode(''),'/536.html','true',[],'',''],
	['PAGE','557',jdecode('Musik'),jdecode(''),'/557/index.html','true',[ 
		['PAGE','9101',jdecode('Mein+Repertoire'),jdecode(''),'/557/9101.html','true',[],'',''],
		['PAGE','578',jdecode('CDs'),jdecode(''),'/557/578.html','true',[],'','']
	],'',''],
	['PAGE','9901',jdecode('Salsa'),jdecode(''),'/9901.html','true',[],'',''],
	['PAGE','620',jdecode('Links'),jdecode(''),'/620.html','true',[],'',''],
	['PAGE','641',jdecode('Presse'),jdecode(''),'/641.html','true',[],'',''],
	['PAGE','662',jdecode('Kontakt'),jdecode(''),'/662/index.html','true',[ 
		['PAGE','6501',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/662/6501.html','false',[],'','']
	],'',''],
	['PAGE','5306',jdecode('G%C3%A4stebuch'),jdecode(''),'/5306/index.html','true',[ 
		['PAGE','5301',jdecode('Eintr%C3%A4ge'),jdecode(''),'/5306/5301.html','false',[],'','']
	],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='FF9F21';
theSitetree.keyvisualId='2224';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='418';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FF9F21';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'FF9F21',
				keyvisualId: 	'2224',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'418',
				contentColor: 	'000000',
				contentBGColor: 'FF9F21',
				a_color: 		'FF9F21',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-5306abw0x0in2rhz']={
webappId:    '1002',
documentId:  '5306',
internalId:  '5306abw0x0in2rhz',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100319-141609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20070130-081239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20100114-065930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20090210-085407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20100319-140935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20080518-185329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20100319-141538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20070210-172309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20071124-222026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20070124-004128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20070121-120539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20070121-120320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5306',
internalId:  '',
customField: '20070121-210249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20070121-100532'
};
webappMappings['7060']=webappMappings['7060-4b9ffe9f02dd646563a27c59bb4430f2']={
webappId:    '7060',
documentId:  '536',
internalId:  '4b9ffe9f02dd646563a27c59bb4430f2',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-6149']={
webappId:    '7008',
documentId:  '662',
internalId:  '6149',
customField: 'language:de;country:CH;'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2RHZ';
var companyName   = 'Conny+Tacito';
var htmlTitle	  = 'Connys+Music+Web';
var metaKeywords  = 'Conny+Tacito%2C+Music%2C+Salsa%2C+Soul%2C+Saxophon%2C+Toni+Tacito%2C+Lead+Vocals%2C+Querfl%C3%B6te%2C+Keyboards%2C+Sizilien%2C+Musikerfamilie%2C+Leads%C3%A4ngerin%2C+Hairstyling+Basile%2C+Edition+See-Igel%2C+Uwe+Stoffel';
var metaContents  = 'Conny+Tacito+singt+und+spielt+Saxophon%2C+Querfl%C3%B6te%2C+Keyboard%2C+Schlagzeug+sowie+Bass.+Neben+Schallplattenaufnahmen+und+Fernsehauftritten+leitete+Conny+mehrere+Jahre+ihre+eigene+5-Mann-Band.+Heute+erteilt+sie+an+der+Sekundarschule+K%C3%BCsnacht+Unterricht+in+Gesang+und+Bewegung+%28Salsa%29+und+lehrt+an+den+Musikschulen+D%C3%BCbendorf%2C+Schwerzenbach+und+in+F%C3%A4llanden+auch+Keyboard+und+Saxophon.+Conny+Tacito+sings+and+plays+saxophone%2C+flute%2C+keyboards%2C+drums+as+well+as+bass+guitar.+Conny+works+as+a+music+and+Salsa+teacher+in+various+schools+in+Zurich.';
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();
};
