/* [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','4559',jdecode('Home'),jdecode(''), jdecode('%2F4559.html'), 'true',[],'',''],
	['PAGE','4751',jdecode('AYURVEDA'),jdecode(''), jdecode('%2F4751.html'), 'true',[],'',''],
	['PAGE','98201',jdecode('HEALING'),jdecode(''), jdecode('%2F98201.html'), 'true',[],'',''],
	['PAGE','92101',jdecode('ANGEBOT'),jdecode(''), jdecode('%2F92101%2Findex.html'), 'true',[ 
		['PAGE','4670',jdecode('Ayurveda+'),jdecode(''), jdecode('%2F92101%2F4670.html'), 'true',[],'',''],
		['PAGE','98222',jdecode('Healing'),jdecode(''), jdecode('%2F92101%2F98222.html'), 'true',[],'','']
	],'',''],
	['PAGE','72422',jdecode('SEMINARE'),jdecode(''), jdecode('%2F72422.html'), 'true',[],'',''],
	['PAGE','4616',jdecode('%C3%9Cber+mich'),jdecode(''), jdecode('%2F4616.html'), 'true',[],'',''],
	['PAGE','5790',jdecode('Ihr+Weg+zu+mir'),jdecode(''), jdecode('%2F5790.html'), 'true',[],'',''],
	['PAGE','6932',jdecode('Lageplan'),jdecode(''), jdecode('%2F6932.html'), 'true',[],'',''],
	['PAGE','4697',jdecode('Zum+Nachdenken'),jdecode(''), jdecode('%2F4697.html'), 'true',[],'',''],
	['PAGE','109701',jdecode('Oshos+Weisheiten'),jdecode(''), jdecode('%2F109701%2Findex.html'), 'true',[ 
		['PAGE','110801',jdecode('Freiheit+und+Liebe'),jdecode(''), jdecode('%2F109701%2F110801.html'), 'true',[],'',''],
		['PAGE','110822',jdecode('Intuition'),jdecode(''), jdecode('%2F109701%2F110822.html'), 'true',[],'',''],
		['PAGE','110843',jdecode('Ego+und+Liebe'),jdecode(''), jdecode('%2F109701%2F110843.html'), 'true',[],'','']
	],'',''],
	['PAGE','4724',jdecode('Tipps'),jdecode(''), jdecode('%2F4724%2Findex.html'), 'true',[ 
		['PAGE','58201',jdecode('Infos+zu+Behandlungen'),jdecode(''), jdecode('%2F4724%2F58201.html'), 'true',[],'',''],
		['PAGE','58501',jdecode('Ern%C3%A4herung'),jdecode(''), jdecode('%2F4724%2F58501.html'), 'true',[],'',''],
		['PAGE','70201',jdecode('Chutneys'),jdecode(''), jdecode('%2F4724%2F70201.html'), 'true',[],'','']
	],'',''],
	['PAGE','109722',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F109722.html'), 'true',[],'',''],
	['PAGE','4778',jdecode('LINKS'),jdecode(''), jdecode('%2F4778.html'), 'true',[],'',''],
	['PAGE','13935',jdecode('Fragen+%2F+Gutschein'),jdecode(''), jdecode('%2F13935.html'), 'true',[],'',''],
	['PAGE','46001',jdecode('SHANTI+SCHWEIZ'),jdecode(''), jdecode('%2F46001.html'), 'true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Speed';
theSitetree.paletteFamily='920000';
theSitetree.keyvisualId='2342';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='373';
theSitetree.graphicsetId='424';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='920000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Speed',
				paletteFamily: 	'920000',
				keyvisualId: 	'2342',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'373',
				graphicsetId: 	'424',
				contentColor: 	'FFFFFF',
				contentBGColor: '920000',
				a_color: 		'920000',
				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:  '4559',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-4804']={
webappId:    '7008',
documentId:  '72422',
internalId:  '4804',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98222',
internalId:  '',
customField: '20110403-180813'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5790',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '6932',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13935',
internalId:  '',
customField: '20100402-121725'
};
webappMappings['7008']=webappMappings['7008-4805']={
webappId:    '7008',
documentId:  '13935',
internalId:  '4805',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4559',
internalId:  '',
customField: '20110203-195100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98201',
internalId:  '',
customField: '20110403-180710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4616',
internalId:  '',
customField: '20090423-132303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4778',
internalId:  '',
customField: '20100920-200207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4751',
internalId:  '',
customField: '20090422-150617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92101',
internalId:  '',
customField: '20080424-164507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4670',
internalId:  '',
customField: '20110403-180423'
};
webappMappings['1002']=webappMappings['1002-109722abw0x0inxsgp']={
webappId:    '1002',
documentId:  '109722',
internalId:  '109722abw0x0inxsgp',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72422',
internalId:  '',
customField: '20110403-180955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109722',
internalId:  '',
customField: '20091125-061442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5790',
internalId:  '',
customField: '20060608-160958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6932',
internalId:  '',
customField: '20100402-121638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4697',
internalId:  '',
customField: '20110422-092749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4724',
internalId:  '',
customField: '20080423-114423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58201',
internalId:  '',
customField: '20080424-091945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58501',
internalId:  '',
customField: '20080424-092104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70201',
internalId:  '',
customField: '20080415-162009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20070731-143429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109701',
internalId:  '',
customField: '20091128-234308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110801',
internalId:  '',
customField: '20110415-222411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110843',
internalId:  '',
customField: '20110415-222457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110822',
internalId:  '',
customField: '20110415-222437'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXSGP';
var companyName   = 'Ayurveda+Oase+%26+Spiritual+Healing';
var htmlTitle	  = 'Martina+Faoro+Ayurveda+%26+spiritual+Healing';
var metaKeywords  = 'Ayurveda+MassageAngebotSeele+baumeln+lassenK%EF%BF%BDrper+verw%EF%BF%BDhnenSie+verdienen+esAbhyangaMassageDoshasayurvedaMartina+Faorowas+ist+ayurveda+reife+intuitionvatapittakaphaerfahrungswissenschaftr%EF%BF%BDckenschmerzentherapie';
var metaContents  = 'Ayurveda++Spiritual+Healing+Martina+Faoro+';
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();
};

