/* [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','4497',jdecode('Home'),jdecode(''), jdecode('%2F4497.html'), 'true',[],'',''],
	['PAGE','119504',jdecode('Formular+Offerte'),jdecode(''), jdecode('%2F119504.html'), 'true',[],'',''],
	['PAGE','119601',jdecode('Formular+Buchung'),jdecode(''), jdecode('%2F119601.html'), 'true',[],'',''],
	['PAGE','130325',jdecode('Kreuzfahrten'),jdecode(''), jdecode('%2F130325%2Findex.html'), 'true',[ 
		['PAGE','130334',jdecode('Costa+Kreuzfahrten'),jdecode(''), jdecode('%2F130325%2F130334.html'), 'true',[],'',''],
		['PAGE','131909',jdecode('Princess+Cruises+'),jdecode(''), jdecode('%2F130325%2F131909.html'), 'true',[],'',''],
		['PAGE','131918',jdecode('Carnival+Cruises+'),jdecode(''), jdecode('%2F130325%2F131918.html'), 'true',[],'',''],
		['PAGE','219112',jdecode('MSC'),jdecode(''), jdecode('%2F130325%2F219112.html'), 'true',[],'','']
	],'',''],
	['PAGE','5930',jdecode('Tarife+Thailand'),jdecode(''), jdecode('%2F5930%2Findex.html'), 'true',[ 
		['PAGE','6902',jdecode('spezielle+Angebote'),jdecode(''), jdecode('%2F5930%2F6902.html'), 'true',[],'','']
	],'',''],
	['PAGE','118328',jdecode('Thailand+generell'),jdecode(''), jdecode('%2F118328.html'), 'true',[],'',''],
	['PAGE','121885',jdecode('Touren%2C+Abenteuer'),jdecode(''), jdecode('%2F121885.html'), 'true',[],'',''],
	['PAGE','119513',jdecode('Bangkok'),jdecode(''), jdecode('%2F119513.html'), 'true',[],'',''],
	['PAGE','130343',jdecode('Nordthailand'),jdecode(''), jdecode('%2F130343.html'), 'true',[],'',''],
	['PAGE','118373',jdecode('Hua+Hin+%2F+Cha-Am+'),jdecode(''), jdecode('%2F118373.html'), 'true',[],'',''],
	['PAGE','118355',jdecode('Pattaya%2FJomtien%2FRayong'),jdecode(''), jdecode('%2F118355.html'), 'true',[],'',''],
	['PAGE','118364',jdecode('Ko+Chang'),jdecode(''), jdecode('%2F118364.html'), 'true',[],'',''],
	['PAGE','118337',jdecode('Ko+Samui'),jdecode(''), jdecode('%2F118337.html'), 'true',[],'',''],
	['PAGE','212312',jdecode('Ko+Phangan'),jdecode(''), jdecode('%2F212312.html'), 'true',[],'',''],
	['PAGE','212333',jdecode('Ko+Tao'),jdecode(''), jdecode('%2F212333.html'), 'true',[],'',''],
	['PAGE','118346',jdecode('Phuket%2FKao+Lak'),jdecode(''), jdecode('%2F118346.html'), 'true',[],'',''],
	['PAGE','212396',jdecode('Ko+Lanta'),jdecode(''), jdecode('%2F212396.html'), 'true',[],'',''],
	['PAGE','212354',jdecode('Ko+Yao'),jdecode(''), jdecode('%2F212354.html'), 'true',[],'',''],
	['PAGE','212375',jdecode('Ko+Phi+Phi'),jdecode(''), jdecode('%2F212375.html'), 'true',[],'',''],
	['PAGE','132313',jdecode('Reisen+weltweit'),jdecode(''), jdecode('%2F132313.html'), 'true',[],'',''],
	['PAGE','4662',jdecode('Links'),jdecode(''), jdecode('%2F4662.html'), 'true',[],'',''],
	['PAGE','5957',jdecode('allgemeine+Infos'),jdecode(''), jdecode('%2F5957.html'), 'true',[],'',''],
	['PAGE','119438',jdecode('Ihr+Weg+zu+uns'),jdecode(''), jdecode('%2F119438.html'), 'true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Easy';
theSitetree.paletteFamily='006666';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='49';
theSitetree.graphicsetId='53';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'Easy',
				paletteFamily: 	'006666',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'49',
				graphicsetId: 	'53',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'006666',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				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:  '4497',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-2953867']={
webappId:    '1501',
documentId:  '4497',
internalId:  '2953867',
customField: '1501'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '119438',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['7008']=webappMappings['7008-1775']={
webappId:    '7008',
documentId:  '119504',
internalId:  '1775',
customField: 'language:de;country:CH;'
};
webappMappings['7008']=webappMappings['7008-1776']={
webappId:    '7008',
documentId:  '119601',
internalId:  '1776',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4497',
internalId:  '',
customField: '20120125-181204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130325',
internalId:  '',
customField: '20100206-102242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130334',
internalId:  '',
customField: '20100812-115548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131909',
internalId:  '',
customField: '20080814-122510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131918',
internalId:  '',
customField: '20080812-181332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132313',
internalId:  '',
customField: '20110611-123357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119504',
internalId:  '',
customField: '20060717-182134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119601',
internalId:  '',
customField: '20060718-100111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5930',
internalId:  '',
customField: '20111217-094309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6902',
internalId:  '',
customField: '20100813-144525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118328',
internalId:  '',
customField: '20091209-115859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119513',
internalId:  '',
customField: '20110620-133158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118373',
internalId:  '',
customField: '20110416-135122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118355',
internalId:  '',
customField: '20101222-095748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118364',
internalId:  '',
customField: '20100319-155551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130343',
internalId:  '',
customField: '20101002-143835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118337',
internalId:  '',
customField: '20101222-101046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118346',
internalId:  '',
customField: '20110626-184600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121885',
internalId:  '',
customField: '20101222-094037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4662',
internalId:  '',
customField: '20100329-093846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5957',
internalId:  '',
customField: '20080717-152301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '119438',
internalId:  '',
customField: '20060718-113134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212312',
internalId:  '',
customField: '20110416-142525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212333',
internalId:  '',
customField: '20110416-142659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212354',
internalId:  '',
customField: '20110416-134352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212375',
internalId:  '',
customField: '20110416-132538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212396',
internalId:  '',
customField: '20100708-165532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '219112',
internalId:  '',
customField: '20100812-123415'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXXOE';
var companyName   = '.....Asien+und+Kreuzfahrten.....';
var htmlTitle	  = 'Thailand%2C+Bangkok%2C+Chiang+Mai%2C+Phuket%2C+Ko+Samui%2C+Krabi%2C+Pattaya';
var metaKeywords  = 'Asien%2C+Reisen%2C+Asia%2C+Travel%2C+Thailand%2C+Bangkok%2C+Ko+Samui%2C+Phuket%2C+Ko+Chang%2C+Pattaya%2C+Hua+Hin%2C+Thai+Take+Away%2C+Cruises%2C+Kreuzfahrten';
var metaContents  = 'Thailand+Reisen%2C+Asien+Reisen%2C+Thailand+Travel%2C+Asia+Travel%2C+Ethnik+Reisen+nach+Asien%2C+Asia+Ethnic+Travel%2C+Cruises%2C+Asienspezialist%2C+Kreuzfahrten%2C+Kreuzfahrten+Spezialist%2C+Reiseb%C3%BCro+f%C3%BCr+Asien%2C+Thailand+Tours+';
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();
};

