/* [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','11324',jdecode('%C3%9Cber+uns'),jdecode(''),'/11324.html','true',[],'',''],
	['PAGE','4559',jdecode('Reisen+mit+uns'),jdecode(''),'/4559.html','true',[],'',''],
	['PAGE','9824',jdecode('Angebote+'),jdecode(''),'/9824/index.html','true',[ 
		['PAGE','9878',jdecode('Rundreisen'),jdecode(''),'/9824/9878.html','true',[],'',''],
		['PAGE','32853',jdecode('Tagestouren+lokal'),jdecode(''),'/9824/32853.html','true',[],'','']
	],'',''],
	['PAGE','33102',jdecode('Spezialangebot'),jdecode(''),'/33102.html','true',[],'',''],
	['PAGE','32826',jdecode('Gruppenreisen%2F+Reiseleitung+'),jdecode(''),'/32826.html','true',[],'',''],
	['PAGE','9851',jdecode('Tauchreisen'),jdecode(''),'/9851.html','true',[],'',''],
	['PAGE','11378',jdecode('N%C3%BCtzliche+Informationen'),jdecode(''),'/11378.html','true',[],'',''],
	['PAGE','24524',jdecode('K%C3%B6nigreich+der+Zulus'),jdecode(''),'/24524.html','true',[],'',''],
	['PAGE','9905',jdecode('Kontakte+%2F+Links'),jdecode(''),'/9905.html','true',[],'',''],
	['PAGE','36123',jdecode('G%C3%A4stebuch'),jdecode(''),'/36123/index.html','true',[ 
		['PAGE','36124',jdecode('Eintr%C3%A4ge'),jdecode(''),'/36123/36124.html','false',[],'','']
	],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='FFCC33';
theSitetree.keyvisualId='1007';
theSitetree.keyvisualName='strasse.jpg';
theSitetree.fontsetId='166';
theSitetree.graphicsetId='199';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'NewYork',
				paletteFamily: 	'FFCC33',
				keyvisualId: 	'1007',
				keyvisualName: 	'strasse.jpg',
				fontsetId: 		'166',
				graphicsetId: 	'199',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000066',
				b_color: 		'FFCC33',
				c_color: 		'000000',
				d_color: 		'406BC0',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11324',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4559',
internalId:  '',
customField: '20060716-125750'
};
webappMappings['1002']=webappMappings['1002-36123ABW0X0INX3GM']={
webappId:    '1002',
documentId:  '36123',
internalId:  '36123ABW0X0INX3GM',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11324',
internalId:  '',
customField: '20060716-175844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9824',
internalId:  '',
customField: '20060716-130355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9878',
internalId:  '',
customField: '20060716-133241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32853',
internalId:  '',
customField: '20060716-165457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33102',
internalId:  '',
customField: '20060716-170901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32826',
internalId:  '',
customField: '20070805-091628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9851',
internalId:  '',
customField: '20070625-205621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11378',
internalId:  '',
customField: '20060716-174958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24524',
internalId:  '',
customField: '20060716-175121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9905',
internalId:  '',
customField: '20070625-211159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36123',
internalId:  '',
customField: '20051119-200941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36124',
internalId:  '',
customField: '20051119-200941'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INX3GM';
var companyName   = 'Aurora+Tours+S%C3%BCdafrika+';
var htmlTitle	  = 'Aurora+Tours+S%C3%BCdafrika';
var metaKeywords  = 'Afrika%2C+S%C3%BCdafrika%2C+S%C3%BCdliches+Afrika%2C+KZN%2C+KwaZulu-Natal%2C+Reisen%2C+Rundreisen%2CAurora+Tours%2C+Reiseb%C3%BCro%2C+Tours%2C+Touren%2C+Aktivit%C3%A4ten%2C+deutsch%2C+individuell%2C+Kleingruppe%2C+Afrikaniche%2C+Tiere%2C+Tauchen%2C+Tauchreisen%2C+Golf%2C++Golfreisen%2C+Abenteuer%2C+Rundreise%2C+Rundfahrt%2C+Landschaft%2C+Kultur%2C+Geschichte%2C+Kulinarisch%2C+Spezialist%2C+Durban%2C+Kapstadt%2C+Drakensberge%2C+Port+Edward%2C+Zulu%2C+Wandern%2C+Erfahrung%2C+Attraktionen%2C+Reisebegleitung%2C+Tradition%2C+Nationalpark%2C+gef%C3%BChrt%2C+Busfahrt%2C+Big+Five%2C+Gardenroute%2C+Reisef%C3%BChrung%2C+Schweizer%2C+Deutsch+sprechend%2C+Mosambik%2C+Mantas%2C+Whalhaie%2C+Haie%2C+Kr%C3%BCger+Park%2C+Safari+';
var metaContents  = 'Pers%C3%B6nlich+gef%C3%BChrte+Touren+in+S%C3%BCdafrika+mit+schweizer+Reisef%C3%BChrung+%28Deutsch+und+Englisch+sprechend%29.+Touren+in+KwaZulu+Natal+und+K%C3%BCstentouren+von+Durban+bis+nach+Kapstadt+und+Region.Gruppen+bis+max.+6+Personen+pro+Tour.++';
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();
};

