/* [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','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','2052',jdecode('Personal+Lines'),jdecode(''),'/2052/index.html','true',[ 
		['PAGE','2073',jdecode('Automobile'),jdecode(''),'/2052/2073.html','true',[],'',''],
		['PAGE','2701',jdecode('Homeowner'),jdecode(''),'/2052/2701.html','true',[],'',''],
		['PAGE','3401',jdecode('Valuable+Items'),jdecode(''),'/2052/3401.html','true',[],'',''],
		['PAGE','2722',jdecode('Fire+Dwelling'),jdecode(''),'/2052/2722.html','true',[],'',''],
		['PAGE','2764',jdecode('Umbrella'),jdecode(''),'/2052/2764.html','true',[],'',''],
		['PAGE','5801',jdecode('Renters'),jdecode(''),'/2052/5801.html','true',[],'',''],
		['PAGE','2743',jdecode('Watercraft'),jdecode(''),'/2052/2743.html','true',[],'',''],
		['PAGE','5501',jdecode('Flood'),jdecode(''),'/2052/5501.html','true',[],'',''],
		['PAGE','3422',jdecode('Health+Insurance'),jdecode(''),'/2052/3422.html','true',[],'',''],
		['PAGE','3443',jdecode('Life+Insurance'),jdecode(''),'/2052/3443.html','true',[],'','']
	],'',''],
	['PAGE','3464',jdecode('Commercial+Lines'),jdecode(''),'/3464/index.html','true',[ 
		['PAGE','3485',jdecode('Liability+Coverage'),jdecode(''),'/3464/3485.html','true',[],'',''],
		['PAGE','3506',jdecode('Property+Coverage'),jdecode(''),'/3464/3506.html','true',[],'',''],
		['PAGE','3527',jdecode('Workers+Compensation'),jdecode(''),'/3464/3527.html','true',[],'',''],
		['PAGE','3548',jdecode('Group+Health'),jdecode(''),'/3464/3548.html','true',[],'',''],
		['PAGE','3569',jdecode('Group+Life'),jdecode(''),'/3464/3569.html','true',[],'',''],
		['PAGE','3590',jdecode('Bonds'),jdecode(''),'/3464/3590.html','true',[],'','']
	],'',''],
	['PAGE','2220',jdecode('About+us'),jdecode(''),'/2220.html','true',[],'',''],
	['PAGE','2806',jdecode('Contact+Us'),jdecode(''),'/2806.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Champagne';
theSitetree.paletteFamily='426388';
theSitetree.keyvisualId='11354';
theSitetree.keyvisualName='kv_11354.jpg';
theSitetree.fontsetId='31943';
theSitetree.graphicsetId='13786';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='426388';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Champagne',
				paletteFamily: 	'426388',
				keyvisualId: 	'11354',
				keyvisualName: 	'kv_11354.jpg',
				fontsetId: 		'31943',
				graphicsetId: 	'13786',
				contentColor: 	'000000',
				contentBGColor: '426388',
				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:  '2001',
internalId:  '',
customField: '20100817-121734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2052',
internalId:  '',
customField: '20100817-121734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2073',
internalId:  '',
customField: '20100817-121734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3464',
internalId:  '',
customField: '20100817-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20100817-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20100818-123228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20100818-123848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2220',
internalId:  '',
customField: '20100817-121734'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-19157']={
webappId:    '7008',
documentId:  '2806',
internalId:  '19157',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2806',
internalId:  '',
customField: '20100817-124820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20100817-124820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2722',
internalId:  '',
customField: '20100817-124820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2743',
internalId:  '',
customField: '20100817-124820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2764',
internalId:  '',
customField: '20100817-124820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3422',
internalId:  '',
customField: '20100817-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3443',
internalId:  '',
customField: '20100817-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3485',
internalId:  '',
customField: '20100817-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3506',
internalId:  '',
customField: '20100817-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3527',
internalId:  '',
customField: '20100817-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3548',
internalId:  '',
customField: '20100817-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3569',
internalId:  '',
customField: '20100817-135928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3590',
internalId:  '',
customField: '20100817-135928'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I715XK';
var companyName   = 'Oliveira+%26+Arnold+Insurance+Brokers%2C+Inc.';
var htmlTitle	  = 'Oliveira+and+Arnold+Insurance+Brokers';
var metaKeywords  = 'insurance%2C+auto%2C+automobile%2C+broker%2C+agent%2C+Newark%2C+Union+City%2C+Fremont%2C+Hayward%2C+San+Leandro%2C+San+Jose%2C+Milpitas%2C+home%2C+homeowner%2C+homeowners%2C+cheap%2C+inexpensive%2C+rate%2C+compare%2C+best%2C+policy%2C+local%2C+license%2C+business%2C+workers+comp%2C+workers+compensation%2C+commercial%2C+bond%2C+bank%2C+Pleasanton%2C+Dublin%2C+Oakland%2C+Alameda%2C+Alameda+County%2C+Thornton%2C+compare';
var metaContents  = 'Serving+the+community+since+1960.+We+are+located+in+Newark%2C+California+and+can+service+all+of+your+insurance+needs+including+Homeowner%2C+Automobile%2C+Business%2C+Life%2C+and+Health+policies.+You+can+find+us+at+6222+Thornton+Avenue+or+by+calling+us+at+%28510%29+793-4567+or+toll+free+at+%28877%29+450-6117.';
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();
};

