/* [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',[],'',''],
	['ITEM','55337',jdecode('Contact+Us+%2F+Map'),jdecode(''),'http://www.almondburyguestfarm.co.za/2301.try1.html','true',[],'','_blank'],
	['PAGE','48337',jdecode('Winter+Specials'),jdecode(''),'/48337.html','true',[],'',''],
	['PAGE','34827',jdecode('Special+Packages'),jdecode(''),'/34827.html','true',[],'',''],
	['PAGE','2322',jdecode('Accommodation'),jdecode(''),'/2322.html','true',[],'',''],
	['PAGE','41627',jdecode('Luxury+Safaris'),jdecode(''),'/41627.html','true',[],'',''],
	['PAGE','38627',jdecode('Weddings'),jdecode(''),'/38627.html','true',[],'',''],
	['PAGE','31727',jdecode('Rates'),jdecode(''),'/31727.html','true',[],'',''],
	['PAGE','2343',jdecode('Picture+Gallary'),jdecode(''),'/2343.html','true',[],'',''],
	['PAGE','2364',jdecode('Restaurant'),jdecode(''),'/2364.html','true',[],'',''],
	['PAGE','2469',jdecode('Airport+Transfers'),jdecode(''),'/2469.html','true',[],'',''],
	['PAGE','2490',jdecode('Nomad+Trips'),jdecode(''),'/2490.html','true',[],'',''],
	['PAGE','2511',jdecode('Activaties'),jdecode(''),'/2511.html','true',[],'',''],
	['PAGE','33827',jdecode('Guestbook'),jdecode(''),'/33827.html','true',[],'',''],
	['ITEM','41327',jdecode('Fifa+World+Cup'),jdecode(''),'http://travelsa2010soccer.co.za','true',[],'','_blank'],
	['ITEM','41428',jdecode('Photography'),jdecode(''),'http://misasphotography.co.za','true',[],'','_blank'],
	['PAGE','50637',jdecode('Robertson+Slow'),jdecode(''),'/50637.html','true',[],'',''],
	['PAGE','50658',jdecode('Wine+on+the+river'),jdecode(''),'/50658.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Bloom';
theSitetree.paletteFamily='B11231';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33065';
theSitetree.graphicsetId='14050';
theSitetree.contentColor='232323';
theSitetree.contentBGColor='fcd2be';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Bloom',
				paletteFamily: 	'B11231',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33065',
				graphicsetId: 	'14050',
				contentColor: 	'232323',
				contentBGColor: 'fcd2be',
				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: '20090724-105207'
};
webappMappings['1501']=webappMappings['1501-6759169']={
webappId:    '1501',
documentId:  '1901',
internalId:  '6759169',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2322',
internalId:  '',
customField: '20090727-101422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2343',
internalId:  '',
customField: '20090727-105127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2364',
internalId:  '',
customField: '20090720-120700'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2343',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50658',
internalId:  '',
customField: '20090706-141005'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '1901',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2469',
internalId:  '',
customField: '20090206-214501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2490',
internalId:  '',
customField: '20090708-104515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2511',
internalId:  '',
customField: '20090727-102127'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '31727',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31727',
internalId:  '',
customField: '20090218-162337'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-fdbe846b355091f820fdba88a46cf49a']={
webappId:    '7060',
documentId:  '2343',
internalId:  'fdbe846b355091f820fdba88a46cf49a',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-33827ahtz10inxhpz']={
webappId:    '1002',
documentId:  '33827',
internalId:  '33827ahtz10inxhpz',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33827',
internalId:  '',
customField: '20090217-230520'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2322',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2364',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2469',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2490',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2511',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '33827',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34827',
internalId:  '',
customField: '20090429-125623'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '34827',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50637',
internalId:  '',
customField: '20090804-134150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38627',
internalId:  '',
customField: '20090429-130628'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '38627',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41627',
internalId:  '',
customField: '20090318-190647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48337',
internalId:  '',
customField: '20090429-124014'
};
var canonHostname = 'sitebuilder1.jnb2.host-h.net';
var accountId     = 'AHTZ10INXHPZ';
var companyName   = 'Almondbury+Guest+Farm';
var htmlTitle	  = 'Almondbury+Guest+Farm+-+Robertson+-+Western+Cape+-+Breede+River+Valley';
var metaKeywords  = 'Almondbury+Guest+Farm%2C+Robertson%2C+Breede+River+Valley%2C+bed+and+breakfast+Robertson+Western+Cape%2C+South+Africa%2C+Guest+Houses%2Cself+catering+accommodation+breede+river+valley+western+cape+south+africa+robertson+south+Africa+Accommodation%2C+South+Africa+hotels%2C+South+Africa%2C+hotels%2C+accommodation%2C+ccommodation+south+africa%2C+reservations%2C+bookings%2C+hotels%2C+bed+and+breakfasts%2C+guest+houses%2C+lodges%2C+chalets%2C+self-catering%2C+safari%2C+travel%2C+accomodation%2C+game+parks+reserves%2C+wheretostay%2C+rates%2C+discounts%2C+Accommodation+Robertson%2C+Guest+house+Robertson%2C+BB+Robertson%2C+Route+62%2C+Accommodation+Route+62%2C+Western+Cape%2C+South+Africa%2C+Cape+Town%2C+Golf+Robertson%2C+Boutique+guest+house%2C+Boutique+hotel%2C+Dinner%2C+Champagne+breakfast%2C+Winelands%2C+Robertson+Wine+Valley%2C+Cape+Winelands%2C+Robertson+Winery%2C+Breede+River%2C+Montagu%2C+Garden+Route%2C+WIFI-internet%2C+Air-conditioning%2C+Robertson+Zuid-Afrika%2C+Accommodatie+Robertson%2C+Route+62%2C+Verblijf+Robertson%2C+Guesthouse+Robertson%2C+Vlamingen+in+Zuid-Afrika%2C+Gastenhuis%2C+BB%2C+Zwembad%2C+Wijnstreek%2C+Westkaap%2C+Zuid-Afrika%2C+Charmehotel%2C+Diner%2C+Tuinroute%2C+Belgen%2C+Breederivier%2C+Kaapstad%2C+Franschhoek%2C+Table+dh%C3%99tes+Robertson%2C+Chambre+dh%C3%99tes%2C+Piscine%2C+Hotel+de+charme%2C+Vignobles%2C+Route+des+Vins%2C+Diner%2C+Route+des+Jardins%2C+Belge%2C+Afrique+du+Sud%2C+Cap%2C+Franschhoek%2C+Unterkunft+Robertson%2C+Unterkunft+Kapstadt%2C+Unterkunft+Route+62%2C+Weingebiet+Robertson%2C+G%E2%80%9Dstehaus%2C+Pool%2C+Golfen%2C+Kapstadt%2C+Gartenroute%2C+Fl%E2%80%9Dmisch%2C+S%C2%B8d-Afrikawestern%2C+capetown%2C+south+africa%2C+southafrica%2C+cpt%2C+sa%2C+za%2C+CPT%2C+SA%2C+ZA%2C+accomm%2C+accom%2C+acomm';
var metaContents  = 'Guest+Houses+Robertson+Breede+River+Valley+Western+Cape+South+Africa+-+Self+Catering+Accommodation+Breede+River+-+Almondbury+Guest+Farm+-+Accommodation+Robertson+Tourism+';
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();
};
