/* [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','801',jdecode('Home'),jdecode(''),'/801.html','true',[],'',''],
	['PAGE','852',jdecode('Products'),jdecode(''),'/852/index.html','true',[ 
		['PAGE','11201',jdecode('PVC+Rub+Rails'),jdecode(''),'/852/11201.html','true',[],'',''],
		['PAGE','11222',jdecode('Remodel+Kits'),jdecode(''),'/852/11222.html','true',[],'',''],
		['PAGE','11243',jdecode('Fuel+Tank'),jdecode(''),'/852/11243.html','true',[],'',''],
		['PAGE','16001',jdecode('Fiberglass+Deck+Set'),jdecode(''),'/852/16001.html','true',[],'',''],
		['PAGE','16022',jdecode('Engine+Box+Covers'),jdecode(''),'/852/16022.html','true',[],'',''],
		['PAGE','16043',jdecode('Bait+Tank%2FCockpit'),jdecode(''),'/852/16043.html','true',[],'',''],
		['PAGE','16064',jdecode('Aluminum+Trailer'),jdecode(''),'/852/16064.html','true',[],'','']
	],'',''],
	['PAGE','17301',jdecode('Restoration+Services'),jdecode(''),'/17301.html','true',[],'',''],
	['PAGE','11264',jdecode('Oops+Sale'),jdecode(''),'/11264.html','true',[],'',''],
	['PAGE','29801',jdecode('Bertrams+For+Sale'),jdecode(''),'/29801/index.html','true',[ 
		['PAGE','33501',jdecode('31+Bertram+Bahia+Mar'),jdecode(''),'/29801/33501.html','true',[],'',''],
		['PAGE','34801',jdecode('Bahia+Mar+Surveyor+Report'),jdecode(''),'/29801/34801.html','true',[],'',''],
		['PAGE','35401',jdecode('Bahia+Mar+Page+2'),jdecode(''),'/29801/35401.html','true',[],'',''],
		['PAGE','35422',jdecode('Bahia+Mar+Page+3'),jdecode(''),'/29801/35422.html','true',[],'',''],
		['PAGE','35443',jdecode('Bahia+Mar+Page+4'),jdecode(''),'/29801/35443.html','true',[],'','']
	],'',''],
	['PAGE','11327',jdecode('New+Location'),jdecode(''),'/11327.html','true',[],'',''],
	['PAGE','11348',jdecode('Contact+Us'),jdecode(''),'/11348.html','true',[],'',''],
	['PAGE','11369',jdecode('Links'),jdecode(''),'/11369.html','true',[],'',''],
	['PAGE','11390',jdecode('Bertram+Rendezvous'),jdecode(''),'/11390.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Dispose';
theSitetree.paletteFamily='718DF8';
theSitetree.keyvisualId='9706';
theSitetree.keyvisualName='kv_9706.gif';
theSitetree.fontsetId='10659';
theSitetree.graphicsetId='11186';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCACA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Dispose',
				paletteFamily: 	'718DF8',
				keyvisualId: 	'9706',
				keyvisualName: 	'kv_9706.gif',
				fontsetId: 		'10659',
				graphicsetId: 	'11186',
				contentColor: 	'000000',
				contentBGColor: 'CCCACA',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-14509429']={
webappId:    '1501',
documentId:  '801',
internalId:  '14509429',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20081013-111910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20091005-123602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20091005-123449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11327',
internalId:  '',
customField: '20091005-123638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11348',
internalId:  '',
customField: '20091005-123713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11369',
internalId:  '',
customField: '20081010-124559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11390',
internalId:  '',
customField: '20081010-130425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20081014-200802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20080823-101020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11222',
internalId:  '',
customField: '20080823-101219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11243',
internalId:  '',
customField: '20080823-104634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20080823-101357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16022',
internalId:  '',
customField: '20080823-101433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16043',
internalId:  '',
customField: '20080823-101722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16064',
internalId:  '',
customField: '20081010-124020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20081013-143049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11264',
internalId:  '',
customField: '20081013-141350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34801',
internalId:  '',
customField: '20091005-130614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20091005-130714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35422',
internalId:  '',
customField: '20091005-130753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35443',
internalId:  '',
customField: '20091005-130844'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010IN2GV2';
var companyName   = '31+Bertram.com';
var htmlTitle	  = 'www.31Bertram.com';
var metaKeywords  = '';
var metaContents  = '';
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();
};

