/* [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','5148',jdecode('Hotel'),jdecode(''), jdecode('%2F5148%2Findex.html'), 'true',[ 
		['PAGE','11564',jdecode('Bildergalerie+Hotel'),jdecode(''), jdecode('%2F5148%2F11564.html'), 'true',[],'','']
	],'',''],
	['PAGE','5169',jdecode('Zimmer+%26+Preise'),jdecode(''), jdecode('%2F5169%2Findex.html'), 'true',[ 
		['PAGE','5064',jdecode('Zimmerpreise+'),jdecode(''), jdecode('%2F5169%2F5064.html'), 'true',[],'',''],
		['PAGE','11801',jdecode('Spezialangebote'),jdecode(''), jdecode('%2F5169%2F11801.html'), 'true',[],'','']
	],'',''],
	['PAGE','58711',jdecode('Winterangebote'),jdecode(''), jdecode('%2F58711.html'), 'true',[],'',''],
	['PAGE','48911',jdecode('Restaurant'),jdecode(''), jdecode('%2F48911%2Findex.html'), 'true',[ 
		['PAGE','48932',jdecode('Saal'),jdecode(''), jdecode('%2F48911%2F48932.html'), 'true',[],'',''],
		['PAGE','48953',jdecode('St%C3%BCbli'),jdecode(''), jdecode('%2F48911%2F48953.html'), 'true',[],'','']
	],'',''],
	['PAGE','5085',jdecode('Kontakt'),jdecode(''), jdecode('%2F5085%2Findex.html'), 'true',[ 
		['PAGE','11501',jdecode('Kontaktformular'),jdecode(''), jdecode('%2F5085%2F11501.html'), 'true',[],'','']
	],'',''],
	['PAGE','11522',jdecode('Lageplan+'),jdecode(''), jdecode('%2F11522%2Findex.html'), 'true',[ 
		['PAGE','5106',jdecode('Routenplaner'),jdecode(''), jdecode('%2F11522%2F5106.html'), 'true',[],'',''],
		['PAGE','11606',jdecode('Karte'),jdecode(''), jdecode('%2F11522%2F11606.html'), 'true',[],'','']
	],'',''],
	['PAGE','5001',jdecode('Freizeitaktivit%C3%A4ten'),jdecode(''), jdecode('%2F5001%2Findex.html'), 'true',[ 
		['PAGE','5190',jdecode('Gastronomie'),jdecode(''), jdecode('%2F5001%2F5190.html'), 'true',[],'',''],
		['PAGE','5211',jdecode('Sport+%2F+Fitness'),jdecode(''), jdecode('%2F5001%2F5211.html'), 'true',[],'',''],
		['PAGE','5022',jdecode('Ausfl%C3%BCge+%2F+Kultur'),jdecode(''), jdecode('%2F5001%2F5022.html'), 'true',[],'',''],
		['PAGE','19201',jdecode('Wellness+%2F+Beauty'),jdecode(''), jdecode('%2F5001%2F19201.html'), 'true',[],'',''],
		['PAGE','5043',jdecode('Fun+%2F+Gruppen+%2F+Events'),jdecode(''), jdecode('%2F5001%2F5043.html'), 'true',[],'','']
	],'',''],
	['PAGE','5127',jdecode('Links'),jdecode(''), jdecode('%2F5127.html'), 'true',[],'',''],
	['PAGE','11543',jdecode('Feedback'),jdecode(''), jdecode('%2F11543.html'), 'true',[],'',''],
	['PAGE','5232',jdecode('News+-+Newsletter'),jdecode(''), jdecode('%2F5232.html'), 'true',[],'',''],
	['PAGE','16101',jdecode('H%C3%B6fli+Pub'),jdecode(''), jdecode('%2F16101.html'), 'true',[],'',''],
	['PAGE','11585',jdecode('Suche'),jdecode(''), jdecode('%2F11585.html'), 'true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Cascade';
theSitetree.paletteFamily='F3E8D2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32870';
theSitetree.graphicsetId='13959';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F3E8D2';
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: 			'Cascade',
				paletteFamily: 	'F3E8D2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32870',
				graphicsetId: 	'13959',
				contentColor: 	'000000',
				contentBGColor: 'F3E8D2',
				a_color: 		'F3E8D2',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20111207-183248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20111123-201713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20111123-202359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5043',
internalId:  '',
customField: '20111123-203342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5064',
internalId:  '',
customField: '20111123-194007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5085',
internalId:  '',
customField: '20111123-201629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5106',
internalId:  '',
customField: '20090508-093329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5127',
internalId:  '',
customField: '20111123-203558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5148',
internalId:  '',
customField: '20111010-190034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5169',
internalId:  '',
customField: '20111123-193029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5190',
internalId:  '',
customField: '20111123-204630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5211',
internalId:  '',
customField: '20111123-202212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5232',
internalId:  '',
customField: '20090508-110303'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '5106',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['7008']=webappMappings['7008-295']={
webappId:    '7008',
documentId:  '11501',
internalId:  '295',
customField: 'language:de;country:CH;'
};
webappMappings['1002']=webappMappings['1002-11543abw0x0ine7au']={
webappId:    '1002',
documentId:  '11543',
internalId:  '11543abw0x0ine7au',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-296']={
webappId:    '7008',
documentId:  '5232',
internalId:  '296',
customField: 'language:de;country:CH;'
};
webappMappings['7060']=webappMappings['7060-7da7a7a71a1865b544c71a24b99b2ba5']={
webappId:    '7060',
documentId:  '11564',
internalId:  '7da7a7a71a1865b544c71a24b99b2ba5',
customField: 'language:de;country:CH;'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '11585',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '11606',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20111123-201637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11522',
internalId:  '',
customField: '20111123-201314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11543',
internalId:  '',
customField: '20111123-203805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11564',
internalId:  '',
customField: '20090507-163159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11585',
internalId:  '',
customField: '20090508-112134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11606',
internalId:  '',
customField: '20090508-093900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20111123-194211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20111123-204825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20111123-203408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48911',
internalId:  '',
customField: '20111123-201256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48932',
internalId:  '',
customField: '20111123-200937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48953',
internalId:  '',
customField: '20111123-201547'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '58711',
internalId:  '-',
customField: '20111207-183331'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INE7AU';
var companyName   = '';
var htmlTitle	  = 'Hotel%2C+Restaurant+und+Pub+%7C+Schweizerhof+Mels';
var metaKeywords  = '';
var metaContents  = '12+heimelige%2C+komfortable+Zimmer+%2820+Betten%29+mit+Dusche+oder+Bad%2C+WC%2C+Fernseher%2C+Minibar+und+gratis+Wireless-Lan.+Restaurant%2C+Saal+%26+St%C3%BCbli+und+Pub+freuen+sich+auf+Ihren+Besuch%21';
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();
};

