/* [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','1701',jdecode('Home'),jdecode(''),'/1701.html','true',[],'',''],
	['PAGE','5901',jdecode('Our+Mission'),jdecode(''),'/5901.html','true',[],'',''],
	['PAGE','1878',jdecode('About+us'),jdecode(''),'/1878/index.html','true',[ 
		['PAGE','1899',jdecode('Our+team'),jdecode(''),'/1878/1899.html','true',[],'',''],
		['PAGE','1920',jdecode('How+to+find+us'),jdecode(''),'/1878/1920.html','true',[],'','']
	],'',''],
	['PAGE','1773',jdecode('Our+Service'),jdecode(''),'/1773.html','true',[],'',''],
	['PAGE','5922',jdecode('Commercial+Insurance'),jdecode(''),'/5922/index.html','true',[ 
		['PAGE','9801',jdecode('Commericial+Insurance+Company+Link'),jdecode(''),'/5922/9801.html','true',[],'','']
	],'',''],
	['PAGE','5943',jdecode('Personal+Insurance'),jdecode(''),'/5943/index.html','true',[ 
		['PAGE','12201',jdecode('Auto'),jdecode(''),'/5943/12201.html','true',[],'',''],
		['PAGE','12401',jdecode('Motorcycle'),jdecode(''),'/5943/12401.html','true',[],'',''],
		['PAGE','12422',jdecode('Motor+Home+and+RV'),jdecode(''),'/5943/12422.html','true',[],'',''],
		['PAGE','12443',jdecode('Boat+%26+Yacht'),jdecode(''),'/5943/12443.html','true',[],'',''],
		['PAGE','12464',jdecode('Homeowners'),jdecode(''),'/5943/12464.html','true',[],'',''],
		['PAGE','12485',jdecode('Condos'),jdecode(''),'/5943/12485.html','true',[],'',''],
		['PAGE','12506',jdecode('Renters+'),jdecode(''),'/5943/12506.html','true',[],'',''],
		['PAGE','12527',jdecode('Mobile+Home'),jdecode(''),'/5943/12527.html','true',[],'',''],
		['PAGE','12548',jdecode('Umbrella'),jdecode(''),'/5943/12548.html','true',[],'',''],
		['PAGE','9822',jdecode('Personal+Insurance+Company+Link'),jdecode(''),'/5943/9822.html','true',[],'','']
	],'',''],
	['PAGE','5964',jdecode('Life+%26+Long+Term+Care+Insurance'),jdecode(''),'/5964/index.html','true',[ 
		['PAGE','9843',jdecode('Life+Insurance+Company+Link'),jdecode(''),'/5964/9843.html','true',[],'','']
	],'',''],
	['PAGE','5985',jdecode('Health+%26+Disability+Insurance'),jdecode(''),'/5985/index.html','true',[ 
		['PAGE','9864',jdecode('Apply+Health+Insurance+Instantly'),jdecode(''),'/5985/9864.html','true',[],'',''],
		['PAGE','37445',jdecode('Dental+%26+Vision+Insurance'),jdecode(''),'/5985/37445.html','true',[],'',''],
		['PAGE','22512',jdecode('Accident+%26+Health+Insurance'),jdecode(''),'/5985/22512.html','true',[],'',''],
		['PAGE','28812',jdecode('Limited+Medical+Plan-KOREA'),jdecode(''),'/5985/28812.html','true',[],'',''],
		['PAGE','35923',jdecode('International+Travel+Medical+Insurance+'),jdecode(''),'/5985/35923.html','true',[],'','']
	],'',''],
	['PAGE','6027',jdecode('Service+Request'),jdecode(''),'/6027.html','true',[],'',''],
	['PAGE','1752',jdecode('Contact+us'),jdecode(''),'/1752.html','true',[],'',''],
	['PAGE','1941',jdecode('Affiliate+Partner'),jdecode(''),'/1941.html','true',[],'',''],
	['PAGE','1962',jdecode('Career+Opportunities'),jdecode(''),'/1962.html','true',[],'',''],
	['PAGE','14301',jdecode('Get+A+Quote'),jdecode(''),'/14301.html','true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Jakarta';
theSitetree.paletteFamily='A9A975';
theSitetree.keyvisualId='7854';
theSitetree.keyvisualName='kv_7854.jpg';
theSitetree.fontsetId='16854';
theSitetree.graphicsetId='12294';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCC99';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'true',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Jakarta',
				paletteFamily: 	'A9A975',
				keyvisualId: 	'7854',
				keyvisualName: 	'kv_7854.jpg',
				fontsetId: 		'16854',
				graphicsetId: 	'12294',
				contentColor: 	'000000',
				contentBGColor: 'CCCC99',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'A9A975',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20100714-183616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1962',
internalId:  '',
customField: '20100602-141932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1752',
internalId:  '',
customField: '20100708-172040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1773',
internalId:  '',
customField: '20100611-130549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5943',
internalId:  '',
customField: '20100714-144424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20100721-194358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5922',
internalId:  '',
customField: '20100714-143913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1878',
internalId:  '',
customField: '20100721-194456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1899',
internalId:  '',
customField: '20100730-170212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1920',
internalId:  '',
customField: '20100702-184522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1941',
internalId:  '',
customField: '20100714-142103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5964',
internalId:  '',
customField: '20100714-145059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5985',
internalId:  '',
customField: '20100714-190211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6027',
internalId:  '',
customField: '20100602-140915'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-2884205']={
webappId:    '1501',
documentId:  '1701',
internalId:  '2884205',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20100714-183854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9864',
internalId:  '',
customField: '20100714-190358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9822',
internalId:  '',
customField: '20100721-193638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9843',
internalId:  '',
customField: '20100624-202551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12201',
internalId:  '',
customField: '20100624-200123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20100624-200156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12422',
internalId:  '',
customField: '20100624-200229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12443',
internalId:  '',
customField: '20100624-200302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12464',
internalId:  '',
customField: '20100624-200331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12485',
internalId:  '',
customField: '20100624-200414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12506',
internalId:  '',
customField: '20100624-200446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12527',
internalId:  '',
customField: '20100624-200515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12548',
internalId:  '',
customField: '20100624-200539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37445',
internalId:  '',
customField: '20100630-193926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22512',
internalId:  '',
customField: '20100624-202926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28812',
internalId:  '',
customField: '20100721-193530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20100702-185002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35923',
internalId:  '',
customField: '20100720-175605'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CX70';
var companyName   = 'London+General%2C+Inc.+DBA%3A+London+General+Insurance+Agency';
var htmlTitle	  = 'Lowest+Premium+%26+Valued+Coverage';
var metaKeywords  = 'Best+Valued+Insurance+Agency';
var metaContents  = 'Insurance';
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();
};
