/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','452',jdecode('Ihr+Gastgeber'),jdecode(''), jdecode('%2F452.html'), 'true',[],'',''],
	['PAGE','473',jdecode('Schlafen+%26+Wohnen'),jdecode(''), jdecode('%2F473%2Findex.html'), 'true',[ 
		['PAGE','52612',jdecode('Zimmer+%22Buddha%22'),jdecode(''), jdecode('%2F473%2F52612.html'), 'true',[],'',''],
		['PAGE','52633',jdecode('Zimmer+%22Romantica%22'),jdecode(''), jdecode('%2F473%2F52633.html'), 'true',[],'',''],
		['PAGE','52654',jdecode('Zimmer+%22s%26%23x27%3BTr%C3%A4umli%22'),jdecode(''), jdecode('%2F473%2F52654.html'), 'true',[],'',''],
		['PAGE','52675',jdecode('Badezimmer'),jdecode(''), jdecode('%2F473%2F52675.html'), 'true',[],'',''],
		['PAGE','515',jdecode('Wohnbereich'),jdecode(''), jdecode('%2F473%2F515.html'), 'true',[],'','']
	],'',''],
	['PAGE','494',jdecode('Fr%C3%BChst%C3%BCck'),jdecode(''), jdecode('%2F494.html'), 'true',[],'',''],
	['PAGE','536',jdecode('Garten+und+Pool'),jdecode(''), jdecode('%2F536.html'), 'true',[],'',''],
	['PAGE','17901',jdecode('Fotogalerie'),jdecode(''), jdecode('%2F17901.html'), 'true',[],'',''],
	['PAGE','578',jdecode('Links'),jdecode(''), jdecode('%2F578.html'), 'true',[],'',''],
	['PAGE','21101',jdecode('Preise+'),jdecode(''), jdecode('%2F21101.html'), 'true',[],'',''],
	['PAGE','599',jdecode('Kontakt+%2F+Reservation'),jdecode(''), jdecode('%2F599.html'), 'true',[],'',''],
	['PAGE','746',jdecode('Impressum'),jdecode(''), jdecode('%2F746.html'), 'true',[],'',''],
	['PAGE','7206',jdecode('G%C3%A4stebuch+%2F+Guestbook'),jdecode(''), jdecode('%2F7206%2Findex.html'), 'true',[ 
		['PAGE','7201',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F7206%2F7201.html'), 'false',[],'','']
	],'',''],
	['PAGE','20401',jdecode('Anfahrt'),jdecode(''), jdecode('%2F20401.html'), 'true',[],'',''],
	['PAGE','23701',jdecode('Downloads'),jdecode(''), jdecode('%2F23701.html'), 'true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='364EB6';
theSitetree.keyvisualId='7150';
theSitetree.keyvisualName='kv_7150.jpg';
theSitetree.fontsetId='16395';
theSitetree.graphicsetId='12129';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'364EB6',
				keyvisualId: 	'7150',
				keyvisualName: 	'kv_7150.jpg',
				fontsetId: 		'16395',
				graphicsetId: 	'12129',
				contentColor: 	'000000',
				contentBGColor: 'E5E2E2',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-7206ahopt0in3ym0']={
webappId:    '1002',
documentId:  '7206',
internalId:  '7206ahopt0in3ym0',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090512-161031'
};
webappMappings['7060']=webappMappings['7060-74944a798087345b8315ed3f9cd74904']={
webappId:    '7060',
documentId:  '17901',
internalId:  '74944a798087345b8315ed3f9cd74904',
customField: 'language:de;country:CH;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '20401',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-13633842']={
webappId:    '1501',
documentId:  '401',
internalId:  '13633842',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-780']={
webappId:    '7008',
documentId:  '599',
internalId:  '780',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20111102-061020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20090125-153042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52612',
internalId:  '',
customField: '20111101-205313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52633',
internalId:  '',
customField: '20100405-154822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52654',
internalId:  '',
customField: '20100405-085651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52675',
internalId:  '',
customField: '20111101-205405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20100404-143912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20111101-205610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20100930-150124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20111101-205716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20080321-172101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20111101-205918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20111101-210038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '746',
internalId:  '',
customField: '20111101-210136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7206',
internalId:  '',
customField: '20111101-210214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7201',
internalId:  '',
customField: '20080121-200839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20111101-210246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20111101-210453'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHOPT0IN3YM0';
var companyName   = 'Bed+%26+Breakfast+Schaffhausen';
var htmlTitle	  = 'bnb-schaffhausen';
var metaKeywords  = 'bnb%2C+BnB%2C+BandB%2C+Bed+and+Breakfast%2C++tourist+information%2C+tourist+information%2C+schaffhausen%2C+schaffhaussen%2C+Schlafen%2C+%C3%BCbernachten%2C+unterkunft%2C+Bed++Breakfast%2C+B+and+B%2C+Bed+and+Breakfast';
var metaContents  = 'Uebernachten+und+Fr%C3%BChst%C3%BCcken%2C+geniessen%2C+entspannen...+Willkommen+in+Schaffhausens+sch%C3%B6nstem+Bed++Breakfast';
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();
};

