/* [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','1901',jdecode('Home'),jdecode(''),'/1901.html','true',[],'',''],
	['PAGE','1952',jdecode('Accommodation'),jdecode(''),'/1952.html','true',[],'',''],
	['PAGE','1973',jdecode('Innspired+Restaurant'),jdecode(''),'/1973.html','true',[],'',''],
	['PAGE','1994',jdecode('Inn+Touch+Day+Spa'),jdecode(''),'/1994.html','true',[],'',''],
	['PAGE','2015',jdecode('Events+%26+Special+offers'),jdecode(''),'/2015.html','true',[],'',''],
	['PAGE','2036',jdecode('Receptions%2FConferences'),jdecode(''),'/2036.html','true',[],'','']];
var siteelementCount=6;
theSitetree.topTemplateName='Hotel';
theSitetree.paletteFamily='898167';
theSitetree.keyvisualId='11680';
theSitetree.keyvisualName='kv_11680.jpg';
theSitetree.fontsetId='32959';
theSitetree.graphicsetId='13994';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='898167';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Hotel',
				paletteFamily: 	'898167',
				keyvisualId: 	'11680',
				keyvisualName: 	'kv_11680.jpg',
				fontsetId: 		'32959',
				graphicsetId: 	'13994',
				contentColor: 	'000000',
				contentBGColor: '898167',
				a_color: 		'000000',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20100713-192257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1952',
internalId:  '',
customField: '20100713-192716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1973',
internalId:  '',
customField: '20100507-011330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1994',
internalId:  '',
customField: '20091210-004707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2015',
internalId:  '',
customField: '20100719-183930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2036',
internalId:  '',
customField: '20091029-141033'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN330INZFQT';
var companyName   = 'Daylesford+Inn';
var htmlTitle	  = 'Daylesford+Inn+-+Boutique+Accommodation%2C+Restaurant+licensed+Bar+and+Events';
var metaKeywords  = 'food%2C+dinning%2C+organic%2C+restaurant%2C+cafe%2C+bar%2C+accommodation+daylesford%2C+rooms%2C+units%2C+chalets%2C+massage%2C+lomi%2C+relax%2C+relaxation%2C+coffee%2C+jasper+coffee%2C+scones%2C+home+cooking%2C+weddings%2C+conferences%2C+catering%2C+groups%2C+schools%2C+disabled%2C+environmental+tours%2C+volcano%2C+springs%2C+water%2C+room+service.+pampering%2C+indulge%2C+intimate%2C+workshops%2C+concerts%2C+bands%2C+live+music%2C+courses%2C+spiritual+healing%2C+therapies.+cooking%2C+meals%2C+best+food%2C+culinary+delight.+cocktails.+retired%2C+winter+escape%2C+spring+escape%2C+summer+escape%2C+autumn+escape.+wild+life.+birds%2C+bush+setting%2C+regional+wines%2C+garden+dining.+acommodation+daylesford.+dining+daylesford.+conference+centre.+dutch+cream+potatoes.rainbow+carrots.+boags.+squire.+beer+big+screen+karaoke+peaceful.+words+in+winter%2C+sanskrit%2C+bakti%2C+pies%2C+pinot%2C+james+squire+draught.+james+boags%2C+best+beer.+win+money.+live+music.+seminars+conferences%2C+complete+service%2Clounge+bar%2C+daylesford+organic+accommodation.+geta+way%2C+escapes.+babysitting.+daylesford+accommodation+theatre+cafe+melbourne+cup+lunch%2C+411%2C+4%3A11+play+live.+Paris+Payne+12+dec.+nail+treatments.nail+biters+remedy.+tapis+bar+menu.+prawns.+dolmades.+kofka.+quail+eggs+with+duhka%2C+wheelchair+friendly%2C+disabled+access.+convent+gallery%2C+art+workshops%2C+art+classes%2C+artist.+family+accommodation+house%2C+dennis+o%27keefe+live%2C+holiday+cottacge+daylesford.+FOLK+AND+BLUES+FEST+daylesford';
var metaContents  = 'Accommodation+daylesford+accomodation%2C+hotel%2C+motel%2C+cafe%2C+restaurant%2C+bar%2C+organic+food%2C+Jasper+coffee%2C+Dayspa+centre%2C+massage+therapies%2C+hot+stone%2C+lomi+lomi%2C+Steak%2C+Fish%2C+Lamb%2C+Vegetarian.holiday+house+rentals.+Meal+deals+available.+spa%2C+bridal%2C+excecutive%2C+room+service%2C+alcohol%2C+licensed.+Weddings%2C+concerts%2C+live+music%2C+private+dinning%2C+counsellling%2C+beauty+therapy.luxury%2C+room+service.+pre+wedding+dinners%2C+regional+wines%2C+garden+dining%2C+innspired+restaurant.dining+daylesford.+accommodation+daylesford.+conference+centre.hepburn+spa%2C+hepburn+springwater.+dutch+cream+potatoes.+licensed+bar.wraps+scrubs+detox+facials+family+friendly+beer+wine+big+screen+words+in+winter%2C+sanskrit%2C+bakti%2C+rick+diamond%2C+roy+orbison%2C+elvis.+david+holmgren%2C+greg+joseph+music.+the+baron.+boag+boags%2C+j+squire%2C+Squire+draught+amber+ale.+coldest+beer.+organic+daylesford%2C+daylesford+escape.+hotel+accommodation.+boutique+restaurant+hotel.+bush+getaway.+retreat%2C+retreats.+massages+therapy%2C+babysitting.theatre+cafe+dining.+Melbourne+cup+lunch.Paris+Payne+12+dec%2C+nail+treatments.+Tapis+bar+menu.+kofka.+dolmades..harissa+prawns.+quail+eggs.+disabled+access%2C+disabled+accommodation.+wheelchair+friendly.+convent+gallery.+caravan+park+next+door.++Victoria+park+holidays.chillout+event%2C+3+bedroom+house+holiday+cottage+daylesford.+native+american+lakota+drumming%2Cflute%2Csinging%2Ccody+blackbird+sunbear+live.Matthew+Fagan+collaborates+with+Flamenco+Maestro+Juan+Martinez+Ortega%2C+and+Flamenco+and+belly+dancers+to+take+you+on+a+musical+journey+into+the+historical+origins+of+traditional+and+contemporary+Spanish+flamenco%2C+Brazilian%2C+South+American+and+Classical+Guitar.++Featuring+6+and+10+string+Spanish+Guitar.++Also+featuring+Celtic+steel+string%2C+bluegrass%2C+roots+and+slide+guitar.+daylesfordart%2C+lynn+buddenbaum.+words+in+winter+-+sylvia+Plath+august+8+and+15%2C+spanish+flamenco+dance+workshop.+janette+geri+fantastic+musician+open+mic+night.Daylesford+Folk+and+Blues+Fest';
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();
};
