/* [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','4530',jdecode('Willkommen'),jdecode(''),'/4530.html','true',[],'',''],
	['PAGE','6122',jdecode('Angebot'),jdecode(''),'/6122/index.html','true',[ 
		['PAGE','6176',jdecode('Imageberatung'),jdecode(''),'/6122/6176.html','true',[],'',''],
		['PAGE','6149',jdecode('Pers%C3%B6nlichkeit'),jdecode(''),'/6122/6149.html','true',[],'',''],
		['PAGE','9460',jdecode('Privat'),jdecode(''),'/6122/9460.html','true',[],'','']
	],'',''],
	['PAGE','7264',jdecode('Referenzen'),jdecode(''),'/7264.html','true',[],'',''],
	['PAGE','5302',jdecode('Portrait'),jdecode(''),'/5302.html','true',[],'',''],
	['PAGE','5614',jdecode('Kontakt'),jdecode(''),'/5614.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Fellow';
theSitetree.paletteFamily='003C73';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10637';
theSitetree.graphicsetId='10691';
theSitetree.contentColor='003C73';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Fellow',
				paletteFamily: 	'003C73',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10637',
				graphicsetId: 	'10691',
				contentColor: 	'003C73',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4530',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4530',
internalId:  '',
customField: '20100116-113950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6122',
internalId:  '',
customField: '20070111-132537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6176',
internalId:  '',
customField: '20060822-091907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6149',
internalId:  '',
customField: '20060822-093313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9460',
internalId:  '',
customField: '20081118-183928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7264',
internalId:  '',
customField: '20100226-105322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5302',
internalId:  '',
customField: '20100116-114329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5614',
internalId:  '',
customField: '20070111-131829'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXLLX';
var companyName   = 'Imageberatung';
var htmlTitle	  = 'Imageberatung+Silvana+Kundert+%2C++Auftritt+-+Kleidung+-+Wirkung+-+Umgang%2C+Farbe+und+Stil';
var metaKeywords  = 'Imageberatung%2C+Silvana+Kundert%2C+Image+Consultant%2C+Farbberatung%2C+Auftritt%2C+Auftreten%2C+Wirkung%2C+Kleidung%2C+%EF%BF%BDusseres%2C+Umgang%2C+Knigge%2C+Einkaufsbegleitung%2CPersonal+Shopping%2C+Personal+Shopper%2C+Stilberatung%2C+Farb-+und+Stilberatung%2C+Stil%2C+Stilgerecht%2C+Stilecht%2C+Sch%EF%BF%BDnheit%2C+Mode%2C+Modestil%2C+Farbanalyse%2C+Stilanalyse%2C+Kundert%2C+Firmenberatung%2C+Seminare%2C+Garderobe%2C+Garderobenplanung%2C+silvanakundert%2C+Kundert%2C+Farbe%2C+Stil%2C+Einkauf%2C+Umgangsformen%2C+Business-Knigge%2C+Trainer%2C+Seminar%2C+Image%2C+St.+Gallen%2C+Abtwil%2C+Lifestyle%2C+Lifestyle-Manager%2C+Stylecoach';
var metaContents  = 'Imageberatung%2C+Firmenseminare%2C+Gruppenberatung%2C+Einzelberatung%2C+Farb-%2C+Stil-+und+Imageberatung%2C+Auftritt+-+Kleidung+-+Wirkung+-+Umgang%2C+Verlagen+Sie+unverbindlich+meine+Unterlagen.+Silvana+Kundert%2C+Imageberatung%2C+9030+Abtwil%2C+Farbberatung%2C+Auftritt%2C+Wirkung%2C+Kleidung%2C+Umgang%2C+Knigge%2C+Businessknigge%2C+Einkaufsbegleitung%2C+Personal+Shopping%2C+Personal+Shopper%2C+Stilberatung%2C+Stilgerecht%2C+Stilecht%2C+Farb-+und+Stilberatung%2C+Sch%EF%BF%BDnheit%2C+Mode%2C+Modestil%2C+Farbanalyse%2C+Stilanalyse%2C+Kundert%2C+Firmenberatung%2C+Seminare%2C+Garderobe%2C+Garderobenplanung%2C+silvanakundert%2C+Kundert%2C+Farbe%2C+Stil%2C+Einkauf%2C+Umgangsformen%2C+Trainer%2C+Seminar%2C+Image%2C+St.+Gallen%2C+Lifestyle%2C+Lifestyle-Manager%2C+Stylecoach';
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();
};
