/* [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','2301',jdecode('Home'),jdecode(''),'/2301.html','true',[],'',''],
	['PAGE','11501',jdecode('About+us'),jdecode(''),'/11501.html','true',[],'',''],
	['PAGE','2422',jdecode('Services'),jdecode(''),'/2422.html','true',[],'',''],
	['PAGE','53101',jdecode('Photo+Gallery'),jdecode(''),'/53101.html','true',[],'',''],
	['PAGE','36601',jdecode('All+About+Boats+%28Forum%29'),jdecode(''),'/36601.html','true',[],'',''],
	['PAGE','2443',jdecode('Contact+Us'),jdecode(''),'/2443.html','true',[],'','']];
var siteelementCount=6;
theSitetree.topTemplateName='Elegant';
theSitetree.paletteFamily='223892';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32899';
theSitetree.graphicsetId='13974';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='223892';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Elegant',
				paletteFamily: 	'223892',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32899',
				graphicsetId: 	'13974',
				contentColor: 	'FFFFFF',
				contentBGColor: '223892',
				a_color: 		'000000',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20100826-061553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2443',
internalId:  '',
customField: '20100823-145823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20100823-145352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2422',
internalId:  '',
customField: '20100823-145229'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1003']=webappMappings['1003-avfl30inhaz0128384ab001']={
webappId:    '1003',
documentId:  '36601',
internalId:  'avfl30inhaz0128384ab001',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53101',
internalId:  '',
customField: '20100823-145521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36601',
internalId:  '',
customField: '20100823-145612'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHAZ0';
var companyName   = 'AMS+-+Boat+Yacht+Mobile+Repairs+Fiberglass+Refinishing+Florida';
var htmlTitle	  = '+Florida+Mobile+Marine+Boat+Yacht+Repairs+Fiberglass+Gelcoat+Painting+Refinishing+';
var metaKeywords  = 'Boat+Repairs%2CYacht+Repairs%2CBoat+Repair+Shop%2CFort+Lauderdale%2CMiami%2CSouth+Florida%2CDockside+Repairs%2CMobile+Repairs%2CFiberglass+Repairs%2CBlister+Repairs%2CGelcoat+Repairs%2CGelcoat+Color+Matching%2CGelcoat+Restoration%2CYacht+%26+Boat+Refinishing%2CBoat+%26+Yacht+Painting%2CPaint+Color+Matching%2CPaint+Spot+Repairs%2CPaint+Blends%2CPaint+Scratch+Repairs%2CBoat+%26+Yacht+Restoration%2CEpoxy+Painting%2CBottom+Painting%2CBarrier+Coating%2CMarine+Carpentry%2CYacht+%26+Boat+Carpentry%2CTeak+Repairs%2CInterior+Refits%2C+Interior+Remodeling%2CCabinets+Resurfacing+%26+Refacing%2C+Countertops+Refacing+%26+Resurfacing%2CVeneer%2CWood+Refinishing%2CWood+Staining%2CStain+Color+Matching%2CVarnishing%2CWoodworking%2CBoat+%26+Yacht+Waxing%2CYacht+%26+Boat+Detailing%2CBoat+%26+Yacht+Compounding%2C+Boat+%26+Yacht+Cleaning%2CBoat+%26+Yacht+Washing%2CYacht+%26+Boat+Maintenance';
var metaContents  = 'Expert+South+Florida+Mobile+Fiberglass+Boat+%26+Yacht+Repairs+%26+Refinishing+-+Boat+%26+Yacht++Painting%2C+Fiberglass+%26+Gelcoat+Repairs%2C+Marine+Carpentry%2C+Teak+Repairs%2C+Varnishing+%26+Wood+Refinishing%2C+Yacht+%26+Boat+Detailing+%26++Maintenance%2C+Dockside+%26++Mobile+Repairs+Service';
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();
};
