/* [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(''),'/401/index.html','true',[ 
		['PAGE','18101',jdecode('Home+Views'),jdecode(''),'/401/18101.html','true',[],'','']
	],'',''],
	['PAGE','5122',jdecode('The+team'),jdecode(''),'/5122.html','true',[],'',''],
	['PAGE','8801',jdecode('Photo+Album'),jdecode(''),'/8801.html','true',[],'',''],
	['PAGE','452',jdecode('Accomodation'),jdecode(''),'/452/index.html','true',[ 
		['PAGE','5164',jdecode('The+Apartments'),jdecode(''),'/452/5164.html','true',[],'',''],
		['PAGE','41101',jdecode('Disability+Friendly+Apartment'),jdecode(''),'/452/41101.html','true',[],'','']
	],'',''],
	['PAGE','5290',jdecode('Rates+and+service'),jdecode(''),'/5290.html','true',[],'',''],
	['PAGE','26601',jdecode('Specials'),jdecode(''),'/26601.html','true',[],'',''],
	['PAGE','31022',jdecode('Winter+Fishing+Special'),jdecode(''),'/31022.html','true',[],'',''],
	['PAGE','15501',jdecode('Reservations'),jdecode(''),'/15501.html','true',[],'',''],
	['PAGE','5101',jdecode('About+Mallacoota'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','21401',jdecode('How+to+find+us%2FMap'),jdecode(''),'/21401.html','true',[],'',''],
	['PAGE','25401',jdecode('Links'),jdecode(''),'/25401.html','true',[],'',''],
	['PAGE','40806',jdecode('Guestbook'),jdecode(''),'/40806/index.html','true',[ 
		['PAGE','40801',jdecode('Read+Guestbook'),jdecode(''),'/40806/40801.html','false',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Natural';
theSitetree.paletteFamily='136F83';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='155';
theSitetree.graphicsetId='170';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FCFCF4';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Natural',
				paletteFamily: 	'136F83',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'155',
				graphicsetId: 	'170',
				contentColor: 	'000000',
				contentBGColor: 'FCFCF4',
				a_color: 		'136F83',
				b_color: 		'66CCFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-8e172264dd4541e0791dd9a3918abbc6']={
webappId:    '7060',
documentId:  '8801',
internalId:  '8e172264dd4541e0791dd9a3918abbc6',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-c7e1a40be09ffb4b044e50df0011fa2b']={
webappId:    '7060',
documentId:  '18101',
internalId:  'c7e1a40be09ffb4b044e50df0011fa2b',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-8ad81f08304a7a8702475b15ef5e2ac6']={
webappId:    '7060',
documentId:  '21401',
internalId:  '8ad81f08304a7a8702475b15ef5e2ac6',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-40806aen010in3dur']={
webappId:    '1002',
documentId:  '40806',
internalId:  '40806aen010in3dur',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090204-010959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20070317-190336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5122',
internalId:  '',
customField: '20070321-170725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20070317-170107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20080128-020108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5164',
internalId:  '',
customField: '20100303-180507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41101',
internalId:  '',
customField: '20100303-180606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5290',
internalId:  '',
customField: '20100303-175222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20090502-015120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31022',
internalId:  '',
customField: '20100303-175327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20090204-010632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20070704-021832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21401',
internalId:  '',
customField: '20070517-212433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20090204-011435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40806',
internalId:  '',
customField: '20070901-193048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20070901-193048'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010IN3DUR';
var companyName   = 'Coull+Waters+Holiday+Apartments%2C+Mallacoota';
var htmlTitle	  = 'Mallacoota+Accommodation+Coull+Waters+Apartments-Holiday';
var metaKeywords  = 'Mallacoota%2C+Accomodation%2C+Fishing%2C+Beach%2C+Family+Frendly%2C+Holiday%2C+East+Gippsland%2C+Water+views%2C+Scenic+location%2C+Gippsland%2C+east%2C+Beach%2C+Sea%2C+Charters%2C+Internet+Access%2C+Self+Contained%2C+Modern%2C+BBQ+Facilities%2C+Bar+B+Que+Facilities%2C+Bar-B-Que+Facilities%2C+Disabled+Room%2C+Accommodation%2C+Australia%2C+Victoria%2C+Coull+Waters%2C+Coullwaters%2C+coullwaters%2C+coolwaters%2C+coolwater%2C+BBQ%2C+Boating%2C+Boat%2C+Boat+facilities%2C+vic%2C+Vic%2C+NSW%2C+New+South+Wales';
var metaContents  = 'Coull+Waters+holiday+Apartments+are+new%2C+fully+self+contained%2C+self+catering%2C+luxury+apartments+with+magnificent%2C+scenic+views+of+Colls+inlet.++They+are+well+appointed+within+a+two+minute+walk+of+the+towns+beaches+and+boat+ramps.++Coull+Waters+is+located+within+a+few+minutes+walk+of+Mallacootas+CBD.';
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();
};

