/* [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','5201',jdecode('Mornington+Boat+Hire+bait+and+tackle'),jdecode(''),'/5201.html','true',[],'',''],
	['PAGE','9701',jdecode('Hire+boat+fleet'),jdecode(''),'/9701.html','true',[],'',''],
	['PAGE','9722',jdecode('Kayak+Hire+Mornington'),jdecode(''),'/9722.html','true',[],'',''],
	['PAGE','9743',jdecode('Rates'),jdecode(''),'/9743.html','true',[],'',''],
	['PAGE','9764',jdecode('Bait+and+Tackle+'),jdecode(''),'/9764.html','true',[],'',''],
	['PAGE','9785',jdecode('Fishing+tips+'),jdecode(''),'/9785.html','true',[],'',''],
	['PAGE','12301',jdecode('Fish+Species+'),jdecode(''),'/12301.html','true',[],'',''],
	['PAGE','9806',jdecode('Fishing+report'),jdecode(''),'/9806.html','true',[],'',''],
	['PAGE','9827',jdecode('Boat+Hire+Location'),jdecode(''),'/9827.html','true',[],'',''],
	['PAGE','12322',jdecode('Fishing+Map'),jdecode(''),'/12322.html','true',[],'',''],
	['PAGE','17101',jdecode('Snapper+Secrets'),jdecode(''),'/17101.html','true',[],'',''],
	['PAGE','17122',jdecode('Snapper+Tactics'),jdecode(''),'/17122.html','true',[],'',''],
	['PAGE','17143',jdecode('Squid+Secrets'),jdecode(''),'/17143.html','true',[],'',''],
	['PAGE','18801',jdecode('Fishing+Mornington+Tips'),jdecode(''),'/18801.html','true',[],'',''],
	['PAGE','17164',jdecode('Whiting+Fishing'),jdecode(''),'/17164.html','true',[],'',''],
	['PAGE','20101',jdecode('Fishing+Basics'),jdecode(''),'/20101.html','true',[],'',''],
	['PAGE','20501',jdecode('Seafood+Recipes'),jdecode(''),'/20501.html','true',[],'',''],
	['PAGE','9848',jdecode('FAQ'),jdecode(''),'/9848.html','true',[],'',''],
	['PAGE','9869',jdecode('What+to+bring'),jdecode(''),'/9869.html','true',[],'',''],
	['PAGE','12343',jdecode('Why+choose+us'),jdecode(''),'/12343.html','true',[],'',''],
	['PAGE','9890',jdecode('Contact'),jdecode(''),'/9890.html','true',[],'',''],
	['PAGE','12364',jdecode('Buy+a+fishing+Licence'),jdecode(''),'/12364.html','true',[],'',''],
	['PAGE','12385',jdecode('Weather'),jdecode(''),'/12385.html','true',[],'',''],
	['PAGE','16501',jdecode('Comments'),jdecode(''),'/16501.html','true',[],'',''],
	['PAGE','23201',jdecode('Join+us+on+Face+Book'),jdecode(''),'/23201.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='93A6CC';
theSitetree.keyvisualId='2224';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='415';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='93A6CC';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'93A6CC',
				keyvisualId: 	'2224',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'415',
				contentColor: 	'FFFFFF',
				contentBGColor: '93A6CC',
				a_color: 		'93A6CC',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100214-165412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20100214-174616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9722',
internalId:  '',
customField: '20100214-174749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9743',
internalId:  '',
customField: '20100214-180033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9764',
internalId:  '',
customField: '20100214-180426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9785',
internalId:  '',
customField: '20091201-180245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9806',
internalId:  '',
customField: '20091215-130314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9827',
internalId:  '',
customField: '20091126-234637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9848',
internalId:  '',
customField: '20091203-145839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9869',
internalId:  '',
customField: '20091215-130427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9890',
internalId:  '',
customField: '20091103-085834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12322',
internalId:  '',
customField: '20091126-234902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12301',
internalId:  '',
customField: '20091201-180433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12343',
internalId:  '',
customField: '20100214-180516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12385',
internalId:  '',
customField: '20091103-091424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12364',
internalId:  '',
customField: '20091103-091615'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5201',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-22475962']={
webappId:    '1501',
documentId:  '5201',
internalId:  '22475962',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20100127-180859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20091203-140345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17122',
internalId:  '',
customField: '20091127-012932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17143',
internalId:  '',
customField: '20091127-012733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17164',
internalId:  '',
customField: '20091127-013936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20091127-013724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20091215-121828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20091203-145657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23201',
internalId:  '',
customField: '20100224-032915'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN330INFN79';
var companyName   = 'Mornington+Boat+Hire+Bait+%26+Tackle';
var htmlTitle	  = 'Mornington+Boat+Hire+bait+and+tackle%2C+fishing+mornington';
var metaKeywords  = 'Mornington%2C+Boat%2C+Boats%2C+Hire%2C+hires%2C+rent%2C+rental%2C+fishing%2C+Peninsula%2C+frankston%2C+snapper%2C+Kayak%2C+Bait%2C+tackle%2C+port+phillip+bay%2C+fish%2C+kayaks%2C+charter%2C+shop%2C+store%2C+shop%2C+squid%2C+sport%2C+marine%2C+schnapper%2C+point%2C+angeling%2C+boat+hire%2C+boat+rental%2C+gear%2C+pier%2C+melbourne%2C+rosebud%2C+rye%2C+southern%2C+south%2C+baits';
var metaContents  = 'Mornington+Boat+Hire+bait+and+Tackle%2C+Kayak+Hire%2C+fishing+Boat+rental%2C+hire+boats%2C+close+to+mebloune+and+frankston%2C+on+the+shores+of+port+phillip+bay+and+on+the+Mornington+peninsula.+Snapper%2F+Schnapper+is+King+in+Mornington+let+us+get+you+in+a+rental%2F+Hire%2F+charter+boat+and+get+you+fishing';
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();
};
