/* [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','801',jdecode('DEUTSCH'),jdecode(''),'/801.html','true',[],'',''],
	['PAGE','873',jdecode('Zimmer'),jdecode(''),'/873/index.html','true',[ 
		['PAGE','894',jdecode('Einzelzimmer'),jdecode(''),'/873/894.html','true',[],'',''],
		['PAGE','915',jdecode('Doppelzimmer'),jdecode(''),'/873/915.html','true',[],'',''],
		['PAGE','936',jdecode('Junior-Suiten+%26+Suite'),jdecode(''),'/873/936.html','true',[],'',''],
		['PAGE','957',jdecode('Familienzimmer'),jdecode(''),'/873/957.html','true',[],'',''],
		['PAGE','978',jdecode('Ferienwohnungen'),jdecode(''),'/873/978.html','true',[],'','']
	],'',''],
	['PAGE','852',jdecode('Gastronomie'),jdecode(''),'/852.html','true',[],'',''],
	['PAGE','999',jdecode('Kinder+%26+Familien'),jdecode(''),'/999.html','true',[],'',''],
	['PAGE','1041',jdecode('Winterpreise'),jdecode(''),'/1041/index.html','true',[ 
		['PAGE','117512',jdecode('Humor+Festival+Package'),jdecode(''),'/1041/117512.html','true',[],'',''],
		['PAGE','141534',jdecode('Kick-off+Pauschale'),jdecode(''),'/1041/141534.html','true',[],'',''],
		['PAGE','121923',jdecode('Dezemberm%C3%A4rchen'),jdecode(''),'/1041/121923.html','true',[],'',''],
		['PAGE','1062',jdecode('Silvesterpauschale'),jdecode(''),'/1041/1062.html','true',[],'',''],
		['PAGE','122723',jdecode('Januar-Wintertraum'),jdecode(''),'/1041/122723.html','true',[],'',''],
		['PAGE','122744',jdecode('Fr%C3%BChjahrs-Ski-+und+Wanderplausch'),jdecode(''),'/1041/122744.html','true',[],'',''],
		['PAGE','1125',jdecode('Gut+zu+wissen'),jdecode(''),'/1041/1125.html','true',[],'','']
	],'',''],
	['PAGE','1083',jdecode('Sommerpreise'),jdecode(''),'/1083/index.html','true',[ 
		['PAGE','114912',jdecode('Familienangebote'),jdecode(''),'/1083/114912.html','true',[],'',''],
		['PAGE','46401',jdecode('Wanderpauschale'),jdecode(''),'/1083/46401.html','true',[],'',''],
		['PAGE','64601',jdecode('Sommer+Kursangebote'),jdecode(''),'/1083/64601.html','true',[],'',''],
		['PAGE','111912',jdecode('Winterstammg%C3%A4ste-Wochen'),jdecode(''),'/1083/111912.html','true',[],'',''],
		['PAGE','57501',jdecode('Arosa+Musik+Theater'),jdecode(''),'/1083/57501.html','true',[],'',''],
		['PAGE','139734',jdecode('Gut+zu+wissen'),jdecode(''),'/1083/139734.html','true',[],'','']
	],'',''],
	['PAGE','81601',jdecode('Wellness'),jdecode(''),'/81601.html','true',[],'',''],
	['PAGE','1188',jdecode('ENGLISH'),jdecode(''),'/1188.html','true',[],'',''],
	['PAGE','1230',jdecode('Rooms'),jdecode(''),'/1230/index.html','true',[ 
		['PAGE','1251',jdecode('Single+room'),jdecode(''),'/1230/1251.html','true',[],'',''],
		['PAGE','1272',jdecode('Double+room'),jdecode(''),'/1230/1272.html','true',[],'',''],
		['PAGE','1293',jdecode('Junior+Suite+%26+Suite'),jdecode(''),'/1230/1293.html','true',[],'',''],
		['PAGE','1314',jdecode('Family+room'),jdecode(''),'/1230/1314.html','true',[],'',''],
		['PAGE','1335',jdecode('Apartments'),jdecode(''),'/1230/1335.html','true',[],'','']
	],'',''],
	['PAGE','1209',jdecode('Restaurant+%26+Bar'),jdecode(''),'/1209.html','true',[],'',''],
	['PAGE','1356',jdecode('Children+%26+families'),jdecode(''),'/1356.html','true',[],'',''],
	['PAGE','81622',jdecode('Wellness'),jdecode(''),'/81622.html','true',[],'',''],
	['PAGE','1377',jdecode('Rates'),jdecode(''),'/1377/index.html','true',[ 
		['PAGE','1419',jdecode('Winter+Packages'),jdecode(''),'/1377/1419.html','true',[],'',''],
		['PAGE','1440',jdecode('Summer+Rates'),jdecode(''),'/1377/1440.html','true',[],'',''],
		['PAGE','58201',jdecode('Hiking+week'),jdecode(''),'/1377/58201.html','true',[],'',''],
		['PAGE','1482',jdecode('Good+to+know'),jdecode(''),'/1377/1482.html','true',[],'','']
	],'',''],
	['PAGE','109712',jdecode('NEWS'),jdecode(''),'/109712.html','true',[],'',''],
	['PAGE','54501',jdecode('IMPRESSIONEN'),jdecode(''),'/54501.html','true',[],'',''],
	['PAGE','88801',jdecode('JOBS'),jdecode(''),'/88801.html','true',[],'',''],
	['PAGE','11201',jdecode('LINKS'),jdecode(''),'/11201.html','true',[],'',''],
	['PAGE','134523',jdecode('BUCHEN+-+ANFRAGEN'),jdecode(''),'/134523/index.html','true',[ 
		['PAGE','1167',jdecode('ONLINE-ANFRAGE+%2F+INQUIRY'),jdecode(''),'/134523/1167.html','true',[],'','']
	],'','']];
var siteelementCount=46;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10892';
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: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20100901-210931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20100801-195029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '873',
internalId:  '',
customField: '20100824-110600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20100803-185546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '915',
internalId:  '',
customField: '20100803-185702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '936',
internalId:  '',
customField: '20100803-185755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '957',
internalId:  '',
customField: '20100803-185901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '978',
internalId:  '',
customField: '20100803-190012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '999',
internalId:  '',
customField: '20100829-214450'
};
webappMappings['7060']=webappMappings['7060-2efe8d9944c0acee2556b4c3af88fd0e']={
webappId:    '7060',
documentId:  '54501',
internalId:  '2efe8d9944c0acee2556b4c3af88fd0e',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1041',
internalId:  '',
customField: '20100901-210641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1125',
internalId:  '',
customField: '20100829-212440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54501',
internalId:  '',
customField: '20100803-185144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117512',
internalId:  '',
customField: '20100829-212225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1062',
internalId:  '',
customField: '20100829-212303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1083',
internalId:  '',
customField: '20100829-204024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1167',
internalId:  '',
customField: '20100803-182628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1188',
internalId:  '',
customField: '20100803-185511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1209',
internalId:  '',
customField: '20100803-183654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1230',
internalId:  '',
customField: '20100803-183720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1356',
internalId:  '',
customField: '20100803-184251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1377',
internalId:  '',
customField: '20100901-210805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1482',
internalId:  '',
customField: '20100803-184910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1251',
internalId:  '',
customField: '20100803-183807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1272',
internalId:  '',
customField: '20100803-183853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1293',
internalId:  '',
customField: '20100803-183951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1314',
internalId:  '',
customField: '20100803-184056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1335',
internalId:  '',
customField: '20100803-184219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1440',
internalId:  '',
customField: '20100803-184442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109712',
internalId:  '',
customField: '20100803-185011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20100803-185202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1419',
internalId:  '',
customField: '20100829-211808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141534',
internalId:  '',
customField: '20100829-212201'
};
webappMappings['7008']=webappMappings['7008-1129']={
webappId:    '7008',
documentId:  '1167',
internalId:  '1129',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46401',
internalId:  '',
customField: '20100803-175407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57501',
internalId:  '',
customField: '20100803-180116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58201',
internalId:  '',
customField: '20100803-184554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64601',
internalId:  '',
customField: '20100716-141536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81601',
internalId:  '',
customField: '20100902-111247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81622',
internalId:  '',
customField: '20100829-203240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88801',
internalId:  '',
customField: '20100830-112649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139734',
internalId:  '',
customField: '20100824-111633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111912',
internalId:  '',
customField: '20100803-175957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114912',
internalId:  '',
customField: '20100824-110549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121923',
internalId:  '',
customField: '20100829-212248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122723',
internalId:  '',
customField: '20100829-212335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122744',
internalId:  '',
customField: '20100829-212420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134523',
internalId:  '',
customField: '20100824-113513'
};
var canonHostname = 'wsc.genotec.ch';
var accountId     = 'AGT010IN2DQE';
var companyName   = 'Weit+weg+vom+Alltag+Sonntage+feiern%21';
var htmlTitle	  = '';
var metaKeywords  = 'Hotel%2C+Arosa%2C+Winter%2C+Sommer%2C+Ferien%2C+Skiurlaub%2C+Wanderurlaub%2C+Familien%2C+Kinder%2C+Last+Minute%2C+Hotels%2C+Wandern%2C+Urlaub+mit+Kindern%2C+Wellness%2C+Spa%2C+Schlafen%2C+Essen%2C+Graub%C3%BCnden%2C+Schweiz%2C+Switzerland%2C+Hunde';
var metaContents  = 'Hotel+Streiff+in+Arosa+-+Weit+weg+vom+Altag+Sonntage+feiern%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();
};
