/* [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','1283',jdecode('Home'),jdecode(''),'/1283.html','true',[],'',''],
	['PAGE','1340',jdecode('Begleitete+Reisen'),jdecode(''),'/1340/index.html','true',[ 
		['PAGE','1367',jdecode('S%C3%9CDAFRIKA+%28gross%29'),jdecode(''),'/1340/1367.html','true',[],'',''],
		['PAGE','18047',jdecode('S%C3%9CDAFRIKA+%28klein%29'),jdecode(''),'/1340/18047.html','true',[],'',''],
		['PAGE','1394',jdecode('S%C3%9CDAFRIKA%2FNAMIBIA+'),jdecode(''),'/1340/1394.html','true',[],'',''],
		['PAGE','18074',jdecode('NAMIBIA+%28gross%29'),jdecode(''),'/1340/18074.html','true',[],'',''],
		['PAGE','18609',jdecode('NAMIBIA+%28klein%29'),jdecode(''),'/1340/18609.html','true',[],'',''],
		['PAGE','18101',jdecode('BOTSWANA'),jdecode(''),'/1340/18101.html','true',[],'','']
	],'',''],
	['PAGE','1421',jdecode('SELBSTFAHRER-Touren'),jdecode(''),'/1421.html','true',[],'',''],
	['PAGE','1475',jdecode('Reisedaten+und+Preise'),jdecode(''),'/1475.html','true',[],'',''],
	['PAGE','18128',jdecode('N%C3%BCtzliche+LINKS'),jdecode(''),'/18128.html','true',[],'',''],
	['PAGE','97833',jdecode('LAST+MINUTE+Urlaub'),jdecode(''),'/97833.html','true',[],'',''],
	['PAGE','16059',jdecode('Kontakt'),jdecode(''),'/16059/index.html','true',[ 
		['PAGE','16303',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/16059/16303.html','false',[],'','']
	],'',''],
	['PAGE','51942',jdecode('FERIENWOHNUNGEN'),jdecode(''),'/51942.html','true',[],'',''],
	['PAGE','104194',jdecode('HOLIDAY+Apartments'),jdecode(''),'/104194.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='FFCC66';
theSitetree.keyvisualId='1685';
theSitetree.keyvisualName='abendstimmung.jpg';
theSitetree.fontsetId='282';
theSitetree.graphicsetId='343';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFCC66';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Architekt',
				paletteFamily: 	'FFCC66',
				keyvisualId: 	'1685',
				keyvisualName: 	'abendstimmung.jpg',
				fontsetId: 		'282',
				graphicsetId: 	'343',
				contentColor: 	'000000',
				contentBGColor: 'FFCC66',
				a_color: 		'FFCC66',
				b_color: 		'CC6600',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1283',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51942',
internalId:  '',
customField: '20090514-181537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1475',
internalId:  '',
customField: '20081219-163341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1283',
internalId:  '',
customField: '20050424-133150'
};
webappMappings['7008']=webappMappings['7008-5615']={
webappId:    '7008',
documentId:  '16059',
internalId:  '5615',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1340',
internalId:  '',
customField: '20051204-204902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1367',
internalId:  '',
customField: '20040528-190425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18047',
internalId:  '',
customField: '20040719-174009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1394',
internalId:  '',
customField: '20051205-210054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18074',
internalId:  '',
customField: '20051212-114610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18609',
internalId:  '',
customField: '20051205-205710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20030107-192617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1421',
internalId:  '',
customField: '20081219-163039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18128',
internalId:  '',
customField: '20071202-114100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97833',
internalId:  '',
customField: '20060721-204800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16059',
internalId:  '',
customField: '20040522-233250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16303',
internalId:  '',
customField: '20021221-113444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104194',
internalId:  '',
customField: '20090514-182332'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INX28V';
var companyName   = 'SABONA++HOLIDAYS';
var htmlTitle	  = 'SABONA+Holidays%3A+S%C3%BCdafrika+%2B+Namibia+%2B+Ferienwohnungen+in+der+Schweiz';
var metaKeywords  = 'SABONA-TOURS%2C+Sabona-Tours%2C+sabona-tours%2C+Rundreisen%2C+Reisen%2C+Urlaub%2C+Erholung%2C+Sonne%2C+Meer%2C+Spezialist+f%C3%BCr+S%C3%BCdafrika%2C+Namibia%2C+NAMIBIA%2C+S%C3%BCdafrika%2C+S%C3%9CDAFRIKA%2C+s%C3%BCdafrika%2C+namibia%2C+Botswana%2C+Afrika%2C+Safari%2C+Abenteuer%2C+Abenteuerreisen%2C+Selbstfahrer%2C+Selbstfahrertour%2C+Selbstfahrertouren%2C+Automiete+Namibia%2C+Reiseanbieter+Namibia%2C+Rundreisen%2C+Kr%C3%BCger+Park%2C+Etosha+Nationalpark%2C+Etosha%2C+Kapstadt%2CCape+Town%2C+Durban%2C+Windhoek%2C+Namib+W%C3%BCste%2C+Sesriem%2C+Sossusvlei%2C+Vingerklip%2C+Johannesburg%2C+Garten+Route%2C+Garden+Route%2C+Badeferien%2C+Aktivferien%2C+Erlebnisferien%2C+Kap+der+guten+Hoffnung%2C+Cape+Town%2C+Cape+Peninsula%2C+Wein%2C+Weinregion%2C+Stellenbosch%2C+Paarl%2C+Golfferien%2C+Golf%2C+begleitete+Rundreisen%2C+s%C3%BCdliches+Afrika%2C+Fl%C3%BCge+nach+S%C3%BCdafrika%2C+Autovermittlung%2C+Unterk%C3%BCnfte+in+S%C3%BCdafrika%2C+Unterk%C3%BCnfte+in+Botswana%2C+Unterk%C3%BCnfte+in+Namibia%2C+Albert+Uehlinger%2C+A.+Uehlinger%2C+Uehlinger%2C+Hirschthal%2C+Grindelwald%2C+Ferienwohnungen%2C+Ferienwohnung+in+Grindelwald%2C+Berner+Oberland%2C+Verkauf+Wohnung+Tessin%2C+Monte+Br%C3%A8%2C+Aldesago';
var metaContents  = 'Willkommen+beim+Reiseveranstalter+SABONA-TOURS.+Ihr+Partner+f%C3%BCr+begleitete+Rundreisen+oder+Selbstfahrertouren+im+s%C3%BCdlichen+Afrika%2C+Ferienwohnungen+in+der+Schweiz';
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();
};
