/* [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','21801',jdecode('Welcome'),jdecode(''), jdecode('%2F21801.html'), 'true',[],'',''],
	['PAGE','7901',jdecode('The+cottage'),jdecode(''), jdecode('%2F7901.html'), 'true',[],'',''],
	['PAGE','9501',jdecode('The+area'),jdecode(''), jdecode('%2F9501.html'), 'true',[],'',''],
	['PAGE','36801',jdecode('Prices%2Favailability'),jdecode(''), jdecode('%2F36801.html'), 'true',[],'',''],
	['PAGE','44701',jdecode('Christmas%2FNew+Year'),jdecode(''), jdecode('%2F44701.html'), 'true',[],'',''],
	['PAGE','24701',jdecode('Special+offers'),jdecode(''), jdecode('%2F24701.html'), 'true',[],'',''],
	['PAGE','9931',jdecode('Contact+us'),jdecode(''), jdecode('%2F9931.html'), 'true',[],'',''],
	['PAGE','9957',jdecode('Feedback+'),jdecode(''), jdecode('%2F9957.html'), 'true',[],'',''],
	['PAGE','19201',jdecode('Useful+liinks'),jdecode(''), jdecode('%2F19201.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Linedup';
theSitetree.paletteFamily='40AE35';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10359';
theSitetree.graphicsetId='10506';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='40AE35';
var localeDef={
  language: 'en',
  country: 'GB'
};
var prodDef={
  wl_name: 'easily_co_uk',
  product: 'WSCSYSSSSLY0XVDH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Linedup',
				paletteFamily: 	'40AE35',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10359',
				graphicsetId: 	'10506',
				contentColor: 	'FFFFFF',
				contentBGColor: '40AE35',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20101024-064245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20101024-071335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20110729-152800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9931',
internalId:  '',
customField: '20100805-142237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44701',
internalId:  '',
customField: '20111108-153759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9957',
internalId:  '',
customField: '20110501-111845'
};
webappMappings['7008']=webappMappings['7008-7380']={
webappId:    '7008',
documentId:  '9931',
internalId:  '7380',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20110227-173523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20110724-072311'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '21801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36801',
internalId:  '',
customField: '20110913-140359'
};
var webAppHostname = 'cgi.easily.co.uk:80';
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT30IN38UT';
var companyName   = 'Lyndale+Cottage';
var htmlTitle	  = 'Lyndale+holiday+cottage%2C+Exmoor+National+Park';
var metaKeywords  = 'lynton+self+catering%2Clynton+cottage%2Clynton+lynmouth+accommodation%2Ccottage+holiday+lynton%2Clynton+holiday+breaks%2Choliday+cottage+lynmouth+lynton%2Cself+catering+minehead%2Choliday+cottage+minehead%2Cself+catering+cottage+minehead%2Ccountry+cottages+minehead%2Cdunster+self+catering%2Ccountry+cottages+dunster%2Choliday+cottages+dunster%2Cself+catering+cottage+dunster%2Cexmoor+national+park+self+catering%2Cexmoor+national+park+cottages%2Caccommodation+in+exmoor+national+park%2Cself+catering+accommodation+in+somerset+%2Ccottage+holidays+somerset+%2Cself+catering+cottage+somerset%2Ccountry+cottages+somerset%2Clynmouth+self+catering%2Choliday+cottage+lynmouth%2Cporlock+self+catering%2Caccommodation+quantock+hills+area%2C+www.lyndalecottage-exmoor.com';
var metaContents  = 'Lyndale+is+a+character+cottage+situated+at+the+foot+of+the+Brendon+Hills%2C+in+Exmoor+National+Park.+The+area+is+beautiful+and+varied+with+rolling+hills%2C+ancient+woodlands%2C+moors+and+a+spectacular+coastline.';
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();
};

