/* [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','4560',jdecode('Home'),jdecode(''),'/4560.html','true',[],''],
	['PAGE','4903',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/4903/index.html','true',[ 
		['PAGE','22625',jdecode('Philosophie'),jdecode(''),'/4903/22625.html','true',[],'']
	],''],
	['PAGE','25716',jdecode('Produkte+%2F+Leistungen'),jdecode(''),'/25716/index.html','true',[ 
		['PAGE','36222',jdecode('%22THE+WORLD%22-Cruiser'),jdecode(''),'/25716/36222.html','true',[],''],
		['PAGE','57184',jdecode('%22THE+WORLD%22-Route+'),jdecode(''),'/25716/57184.html','true',[],''],
		['PAGE','36249',jdecode('SEADREAM+Cruises'),jdecode(''),'/25716/36249.html','true',[],''],
		['PAGE','97920',jdecode('SILVERSEA+Cruises'),jdecode(''),'/25716/97920.html','true',[],''],
		['PAGE','59884',jdecode('Corporate+Events'),jdecode(''),'/25716/59884.html','true',[],''],
		['PAGE','36276',jdecode('Yacht-Charters+%26+Crew'),jdecode(''),'/25716/36276.html','true',[],''],
		['PAGE','36303',jdecode('Private+Jets'),jdecode(''),'/25716/36303.html','true',[],'']
	],''],
	['PAGE','5146',jdecode('Aktuelle+Angebote'),jdecode(''),'/5146/index.html','true',[ 
		['PAGE','38822',jdecode('%22WORLD%22-Travel'),jdecode(''),'/5146/38822.html','true',[],''],
		['PAGE','54411',jdecode('%22SEADREAM%22+Travel'),jdecode(''),'/5146/54411.html','true',[],''],
		['PAGE','54438',jdecode('Yacht-Charter+Hits'),jdecode(''),'/5146/54438.html','true',[],''],
		['PAGE','54465',jdecode('Yacht-Verk%C3%A4ufe'),jdecode(''),'/5146/54465.html','true',[],''],
		['PAGE','65332',jdecode('Private+Jet+Tours'),jdecode(''),'/5146/65332.html','true',[],'']
	],''],
	['PAGE','5200',jdecode('Kontakt'),jdecode(''),'/5200/index.html','true',[ 
		['PAGE','5227',jdecode('Adresse%2C+Telefon'),jdecode(''),'/5200/5227.html','true',[],'']
	],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Animal';
theSitetree.paletteFamily='7E7E7F';
theSitetree.keyvisualId='4318';
theSitetree.keyvisualName='kv_4318.jpg';
theSitetree.fontsetId='10789';
theSitetree.graphicsetId='11212';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='DFDFDF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				name: 			'Animal',
				paletteFamily: 	'7E7E7F',
				keyvisualId: 	'4318',
				keyvisualName: 	'kv_4318.jpg',
				fontsetId: 		'10789',
				graphicsetId: 	'11212',
				contentColor: 	'000000',
				contentBGColor: 'DFDFDF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'7E7E7F',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'7E7E7F',
				e_color: 		'7E7E7F',
				f_color: 		'7E7E7F',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4560',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4560',
internalId:  '',
customField: '20080516-120340'
};
webappMappings['7008']=webappMappings['7008-3876']={
webappId:    '7008',
documentId:  '5200',
internalId:  '3876',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4903',
internalId:  '',
customField: '20070717-112011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22625',
internalId:  '',
customField: '20070717-112257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25716',
internalId:  '',
customField: '20070117-120400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36222',
internalId:  '',
customField: '20090327-171917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57184',
internalId:  '',
customField: '20080128-140844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36249',
internalId:  '',
customField: '20050412-094745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97920',
internalId:  '',
customField: '20070515-091701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59884',
internalId:  '',
customField: '20050412-163408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36276',
internalId:  '',
customField: '20050412-163445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36303',
internalId:  '',
customField: '20080515-173342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5146',
internalId:  '',
customField: '20070717-113008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38822',
internalId:  '',
customField: '20070717-120712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54411',
internalId:  '',
customField: '20050411-092832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54438',
internalId:  '',
customField: '20070717-120929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54465',
internalId:  '',
customField: '20080515-173527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65332',
internalId:  '',
customField: '20070313-093632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5200',
internalId:  '',
customField: '20080515-173014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5227',
internalId:  '',
customField: '20040920-161412'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXVXO';
var companyName   = 'GMC+GROUP++R.W.+Greter+%26+Partners';
var htmlTitle	  = 'www.world-cruising.net';
var metaKeywords  = 'Seereisen%2C+Kreuzfahrten%2C+Yachtreisen%2C+Yacht-Charters%2C+World-Cruising%2C+THE+WORLD%2C+Yacht-Verkauf%2C+SEADREAM-Seereisen%2C+Weltreisen%2C+Seereisen%2C+Private+Jets.+';
var metaContents  = 'Yacht-Charters%2C+Charter-Yachten%2C+THE+WORLD+Luxus-Cruiser%2C+SEADREAM-Seereisen%2C+Privat-Jets.+++';
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();
};
