/* [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 theSitetree=[ 
	['PAGE','1401',jdecode('Home'),jdecode(''),'/1401.html','true',[],''],
	['PAGE','5448',jdecode('A+%26+T+Insurance+'),jdecode(''),'/5448.html','true',[],''],
	['PAGE','2901',jdecode('About+us'),jdecode(''),'/2901.html','true',[],''],
	['PAGE','3401',jdecode('Contact'),jdecode(''),'/3401.html','true',[],''],
	['PAGE','3601',jdecode('How+to+find+us'),jdecode(''),'/3601.html','true',[],''],
	['PAGE','3801',jdecode('Driver%26%23x27%3Bs+License+Check'),jdecode(''),'/3801.html','true',[],''],
	['PAGE','4501',jdecode('Parking+Citation+Check'),jdecode(''),'/4501.html','true',[],''],
	['PAGE','4522',jdecode('Moving+Violation+Check'),jdecode(''),'/4522.html','true',[],''],
	['PAGE','4543',jdecode('Forms'),jdecode(''),'/4543.html','true',[],''],
	['PAGE','12601',jdecode('Services'),jdecode(''),'/12601/index.html','true',[ 
		['PAGE','4564',jdecode('Title+Transfers'),jdecode(''),'/12601/4564.html','true',[],''],
		['PAGE','4701',jdecode('Tag+Renewals'),jdecode(''),'/12601/4701.html','true',[],''],
		['PAGE','4722',jdecode('Out+of+State+Registration'),jdecode(''),'/12601/4722.html','true',[],''],
		['PAGE','5301',jdecode('Duplicate+%26+Replacements'),jdecode(''),'/12601/5301.html','true',[],''],
		['PAGE','5322',jdecode('Boat'),jdecode(''),'/12601/5322.html','true',[],''],
		['PAGE','5343',jdecode('Handicap+Permits'),jdecode(''),'/12601/5343.html','true',[],''],
		['PAGE','5364',jdecode('Temporary+Plates'),jdecode(''),'/12601/5364.html','true',[],''],
		['PAGE','5385',jdecode('Personalized+Plates'),jdecode(''),'/12601/5385.html','true',[],''],
		['PAGE','5406',jdecode('Dealers'),jdecode(''),'/12601/5406.html','true',[],''],
		['PAGE','5427',jdecode('Fees'),jdecode(''),'/12601/5427.html','true',[],'']
	],''],
	['PAGE','12701',jdecode('Our+Staff'),jdecode(''),'/12701.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Fields';
theSitetree.paletteFamily='0D0D0D';
theSitetree.keyvisualId='11286';
theSitetree.keyvisualName='kv_11286.jpg';
theSitetree.fontsetId='31969';
theSitetree.graphicsetId='13806';
theSitetree.contentColor='F5F3F3';
theSitetree.contentBGColor='0D0D0D';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Fields',
				paletteFamily: 	'0D0D0D',
				keyvisualId: 	'11286',
				keyvisualName: 	'kv_11286.jpg',
				fontsetId: 		'31969',
				graphicsetId: 	'13806',
				contentColor: 	'F5F3F3',
				contentBGColor: '0D0D0D',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20100212-131213'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20090129-165829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20090205-142732'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '3601',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3601',
internalId:  '',
customField: '20090127-211858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3801',
internalId:  '',
customField: '20090709-124408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4564',
internalId:  '',
customField: '20090911-170654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20090911-170810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4722',
internalId:  '',
customField: '20090911-171055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20090911-172031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5322',
internalId:  '',
customField: '20090129-171135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5343',
internalId:  '',
customField: '20090128-110453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5364',
internalId:  '',
customField: '20090128-110644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5385',
internalId:  '',
customField: '20090911-172410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5406',
internalId:  '',
customField: '20090205-142647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5427',
internalId:  '',
customField: '20090911-172604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5448',
internalId:  '',
customField: '20090625-172122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20090709-123805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4522',
internalId:  '',
customField: '20090709-124847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4543',
internalId:  '',
customField: '20090205-150636'
};
webappMappings['7050']=webappMappings['7050-7552']={
webappId:    '7050',
documentId:  '12701',
internalId:  '7552',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20090911-164143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20090205-144122'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INEZQG';
var companyName   = 'BEACH+AUTO+TAG+AGENCY';
var htmlTitle	  = '';
var metaKeywords  = 'miami%2C+beach%2C+tag%2C+agency%2C+auto%2C+florida%2C+car%2C+title%2C+registration%2C+handicap%2C+permit%2C+insurance%2C+home%2C+condo%2C+health%2C+decal%2C+vehicle%2C+boat%2C+boats%2C+automobile%2C+notary%2C+public%2C+scooters%2C+motorcycle%2C+title%2C+vehicle+insurance%2Cvessel%2Chov';
var metaContents  = 'Tag+agency+responsible+for+providing+title+and+registration+services.+We+also+handle+tag+renewals%2C+new+plates%2C+personalized+plates%2C+vessel+transactions%2C+HOV+decals+and+much+more.+In+addition+we+provide+our+clients+with+an+on-site++insurance+agency+with+over+10+years+of+insurance+experience.+Their+competitive+quotes+and+reliable+insurance+companies+will+make+getting+insurance+a+new+pleasant+and+worth+while+experience+like+never+before.';
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();
};
