/* [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 theSitetree=[ 
	['PAGE','1435',jdecode('Home'),jdecode(''),'/1435.html','true',[],''],
	['PAGE','7286',jdecode('Was+ist+%2F+What+is+Yoga%3F'),jdecode(''),'/7286.html','true',[],''],
	['PAGE','46422',jdecode('Biografie+%2F+Biography'),jdecode(''),'/46422.html','true',[],''],
	['PAGE','46401',jdecode('Studio'),jdecode(''),'/46401.html','true',[],''],
	['PAGE','46443',jdecode('Programm+%2F+Program'),jdecode(''),'/46443/index.html','true',[ 
		['PAGE','30300',jdecode('Yogakurse+%2F+Yoga+schedule'),jdecode(''),'/46443/30300.html','true',[],''],
		['PAGE','7502',jdecode('Workshops+2008%2F09'),jdecode(''),'/46443/7502.html','true',[],''],
		['PAGE','28886',jdecode('Privatlektionen+%2F+Private+Yoga'),jdecode(''),'/46443/28886.html','true',[],''],
		['PAGE','10341',jdecode('Yogalehrer+%2F+Teacher+Training'),jdecode(''),'/46443/10341.html','true',[],''],
		['PAGE','7475',jdecode('Yoga+f%C3%BCr+Firmen'),jdecode(''),'/46443/7475.html','true',[],'']
	],''],
	['PAGE','58001',jdecode('Yoga+Demonstrations'),jdecode(''),'/58001.html','true',[],''],
	['PAGE','8977',jdecode('Preise+%2F+Prices'),jdecode(''),'/8977.html','true',[],''],
	['PAGE','7529',jdecode('Bilder+%2F+Pictures'),jdecode(''),'/7529.html','true',[],''],
	['PAGE','44401',jdecode('Videos'),jdecode(''),'/44401.html','true',[],''],
	['PAGE','7737',jdecode('Guestbook%21%21'),jdecode(''),'/7737/index.html','true',[ 
		['PAGE','7738',jdecode('Eintr%C3%A4ge+%2F+Entries'),jdecode(''),'/7737/7738.html','false',[],'']
	],''],
	['PAGE','10082',jdecode('Kontakt+%2F+Contact'),jdecode(''),'/10082.html','true',[],''],
	['PAGE','7875',jdecode('Anfahrt+%2F+Directions'),jdecode(''),'/7875.html','true',[],''],
	['PAGE','7845',jdecode('Routenplaner'),jdecode(''),'/7845.html','true',[],''],
	['PAGE','22801',jdecode('Links'),jdecode(''),'/22801.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1435',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-7737ABW0X0INXXHP']={
webappId:    '1002',
documentId:  '7737',
internalId:  '7737ABW0X0INXXHP',
customField: 'icq=false'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '7845',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '7875',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1435',
internalId:  '',
customField: '20090715-144944'
};
webappMappings['1501']=webappMappings['1501-957714']={
webappId:    '1501',
documentId:  '1435',
internalId:  '957714',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7286',
internalId:  '',
customField: '20090715-155425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30300',
internalId:  '',
customField: '20090715-153310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7502',
internalId:  '',
customField: '20090930-104428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28886',
internalId:  '',
customField: '20090714-140934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58001',
internalId:  '',
customField: '20090716-153457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8977',
internalId:  '',
customField: '20090715-154043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10341',
internalId:  '',
customField: '20090714-131016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7475',
internalId:  '',
customField: '20090715-153446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7529',
internalId:  '',
customField: '20090715-142731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7737',
internalId:  '',
customField: '20090715-154129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7738',
internalId:  '',
customField: '20060418-210313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10082',
internalId:  '',
customField: '20090714-150644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7875',
internalId:  '',
customField: '20090715-154226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7845',
internalId:  '',
customField: '20090715-154325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20090714-164719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44401',
internalId:  '',
customField: '20090714-170342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46401',
internalId:  '',
customField: '20090714-171834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46422',
internalId:  '',
customField: '20090910-190059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46443',
internalId:  '',
customField: '20090714-144456'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXXHP';
var companyName   = 'Practical+Wellness+GmbH';
var htmlTitle	  = 'Yoga+Studio+Limmattal+-+Hatha%2C+Flow%2C+Release%2C+Advance+Yoga+-+Meditation+und+Atemtechniken';
var metaKeywords  = 'Hatha+-+Yoga+Release+-+Yoga+Flow+-+Yoga+Power+-+Yoga+Yoga+Spreitenbach+Yoga+Limmattal+Yoga+Z%C3%BCrich+Yoga+Aargau+Meditation+Erholung+Fitness+Yoga+Schweiz+Yoga+Switzerland+Yoga+Ausbildung+Yogalehrer+Yogalehrerausbildung+Yogaausbildung+-+Meditation+Yoga+-+Atemtechniken+Yoga';
var metaContents  = 'Hatha+-+Yoga+Release+-+Yoga+Flow+-+Yoga+Power+-+Yoga+-+Meditation+-+Atemtechniken+-+Yoga-Ausbildungen+-+';
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();
};
