/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','652',jdecode('Service'),jdecode(''),'/652.html','true',[],'',''],
	['PAGE','24301',jdecode('Parts+%26+Products'),jdecode(''),'/24301/index.html','true',[ 
		['PAGE','29322',jdecode('Outdrives'),jdecode(''),'/24301/29322.html','true',[],'','']
	],'',''],
	['PAGE','5822',jdecode('Tips+%26+Tricks'),jdecode(''),'/5822/index.html','true',[ 
		['PAGE','35901',jdecode('Owners+you+need+to%3A'),jdecode(''),'/5822/35901.html','true',[],'',''],
		['PAGE','35922',jdecode('Things+you+need+to+know'),jdecode(''),'/5822/35922.html','true',[],'',''],
		['PAGE','36401',jdecode('Batteries'),jdecode(''),'/5822/36401.html','true',[],'',''],
		['PAGE','36422',jdecode('Outdrive+Neglect'),jdecode(''),'/5822/36422.html','true',[],'',''],
		['PAGE','36443',jdecode('Pre-purchase+Inspection'),jdecode(''),'/5822/36443.html','true',[],'',''],
		['PAGE','49232',jdecode('Ethanol+-+what+you+need+to+know'),jdecode(''),'/5822/49232.html','true',[],'','']
	],'',''],
	['PAGE','51920',jdecode('BLOGS'),jdecode(''),'/51920.html','true',[],'',''],
	['PAGE','48675',jdecode('+Links+%26+Valuable+Contacts'),jdecode(''),'/48675.html','true',[],'',''],
	['PAGE','673',jdecode('Contact+or+E-Mail+Us'),jdecode(''),'/673.html','true',[],'',''],
	['PAGE','35801',jdecode('Economy+Photos%2Fblogs'),jdecode(''),'/35801.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Bombay';
theSitetree.paletteFamily='395987';
theSitetree.keyvisualId='7522';
theSitetree.keyvisualName='kv_7522.jpg';
theSitetree.fontsetId='16586';
theSitetree.graphicsetId='12202';
theSitetree.contentColor='395987';
theSitetree.contentBGColor='C0B89D';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Bombay',
				paletteFamily: 	'395987',
				keyvisualId: 	'7522',
				keyvisualName: 	'kv_7522.jpg',
				fontsetId: 		'16586',
				graphicsetId: 	'12202',
				contentColor: 	'395987',
				contentBGColor: 'C0B89D',
				a_color: 		'395987',
				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['7060']=webappMappings['7060-17c7a11036706f9763899d5dc574cd6a']={
webappId:    '7060',
documentId:  '35801',
internalId:  '17c7a11036706f9763899d5dc574cd6a',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51920',
internalId:  '',
customField: '20091201-141238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100329-122851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20100329-123833'
};
webappMappings['1003']=webappMappings['1003-ahw050in2brl1254bd0e017']={
webappId:    '1003',
documentId:  '51920',
internalId:  'ahw050in2brl1254bd0e017',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20091201-134833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29322',
internalId:  '',
customField: '20070508-111909'
};
webappMappings['1501']=webappMappings['1501-6429232']={
webappId:    '1501',
documentId:  '601',
internalId:  '6429232',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5822',
internalId:  '',
customField: '20070508-155432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20070508-140726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35922',
internalId:  '',
customField: '20070508-142706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36401',
internalId:  '',
customField: '20070508-144223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36422',
internalId:  '',
customField: '20070508-145540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36443',
internalId:  '',
customField: '20070508-150306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49232',
internalId:  '',
customField: '20080820-121529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48675',
internalId:  '',
customField: '20100401-083916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20100326-151905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35801',
internalId:  '',
customField: '20100401-083936'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2BRL';
var companyName   = 'Tampa+Boat+Repair+';
var htmlTitle	  = 'www.tampaboatrepair.com';
var metaKeywords  = '%2Coutboard+motors%2C+marine+parts%2C+lower+units%2C+outdrives%2Ctrailers%2Cpowerhead+rebuild%2Cmarine+engines%2Crigging%2Cgelcoat+repair%2Ctroling+motors%2Cbass+boats%2C+salt+water+boats%2Cdockside+repair';
var metaContents  = 'dockside+repair%2Csurvey%2Coutdrives%2Coutboard+motor+repair%2C+inboard%2C+marine+parts%2C+marine+engines%2C+sterndrive+repairs+%2C+propellars%2Chydraulic+steering%2C+tune+ups%2C+powerhead+rebuild%2C+trailer%2C+trailer+parts%2C';
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();
};
