/* [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','63',jdecode('HOME'),jdecode(''),'/63.html','true',[],'',''],
	['PAGE','147',jdecode('CONTACT+US'),jdecode(''),'/147/index.html','true',[ 
		['PAGE','1648',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/147/1648.html','false',[],'','']
	],'',''],
	['PAGE','2220',jdecode('QUICK+QUOTE'),jdecode(''),'/2220.html','true',[],'',''],
	['PAGE','129',jdecode('APPLY+ONLINE'),jdecode(''),'/129.html','true',[],'',''],
	['PAGE','1890',jdecode('DOWNLOAD+APPLICATION'),jdecode(''),'/1890.html','true',[],'',''],
	['PAGE','84',jdecode('HEALTH+INSURANCE'),jdecode(''),'/84/index.html','true',[ 
		['PAGE','2146',jdecode('ALL+COMPANIES'),jdecode(''),'/84/2146.html','true',[],'',''],
		['PAGE','46801',jdecode('AETNA'),jdecode(''),'/84/46801.html','true',[],'',''],
		['PAGE','138',jdecode('ANTHEM+BLUE+CROSS'),jdecode(''),'/84/138.html','true',[],'',''],
		['PAGE','1665',jdecode('BLUE+SHIELD'),jdecode(''),'/84/1665.html','true',[],'',''],
		['PAGE','46822',jdecode('CIGNA'),jdecode(''),'/84/46822.html','true',[],'',''],
		['PAGE','1674',jdecode('HEALTH+NET'),jdecode(''),'/84/1674.html','true',[],'',''],
		['PAGE','42601',jdecode('KAISER+PERMANENTE'),jdecode(''),'/84/42601.html','true',[],'','']
	],'',''],
	['PAGE','93',jdecode('DENTAL+PLANS'),jdecode(''),'/93.html','true',[],'',''],
	['PAGE','52801',jdecode('PROVIDER+SEARCH'),jdecode(''),'/52801.html','true',[],'',''],
	['PAGE','111',jdecode('MEDICARE+SUPPLEMENTS'),jdecode(''),'/111.html','true',[],'',''],
	['PAGE','120',jdecode('LONG+TERM+CARE+INS.'),jdecode(''),'/120.html','true',[],'',''],
	['PAGE','102',jdecode('LIFE+INSURANCE'),jdecode(''),'/102.html','true',[],'',''],
	['PAGE','48501',jdecode('MEDICAL+JOKES'),jdecode(''),'/48501.html','true',[],'',''],
	['PAGE','49901',jdecode('NEWS+BLOG'),jdecode(''),'/49901.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Easylife';
theSitetree.paletteFamily='B650B7';
theSitetree.keyvisualId='5814';
theSitetree.keyvisualName='kv_5814.jpg';
theSitetree.fontsetId='11095';
theSitetree.graphicsetId='11870';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easylife',
				paletteFamily: 	'B650B7',
				keyvisualId: 	'5814',
				keyvisualName: 	'kv_5814.jpg',
				fontsetId: 		'11095',
				graphicsetId: 	'11870',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '63',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63',
internalId:  '',
customField: '20100207-193516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147',
internalId:  '',
customField: '20100127-144543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1648',
internalId:  '',
customField: '20080314-072120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2220',
internalId:  '',
customField: '20100202-203433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129',
internalId:  '',
customField: '20100209-190155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1890',
internalId:  '',
customField: '20100202-203533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84',
internalId:  '',
customField: '20080529-193714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2146',
internalId:  '',
customField: '20100202-200808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138',
internalId:  '',
customField: '20090427-154607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1665',
internalId:  '',
customField: '20080529-194112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1674',
internalId:  '',
customField: '20100209-190108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93',
internalId:  '',
customField: '20081118-205227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111',
internalId:  '',
customField: '20100226-233043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120',
internalId:  '',
customField: '20100202-212300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102',
internalId:  '',
customField: '20100227-000357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42601',
internalId:  '',
customField: '20100127-144243'
};
webappMappings['1501']=webappMappings['1501-155009']={
webappId:    '1501',
documentId:  '63',
internalId:  '155009',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46801',
internalId:  '',
customField: '20100202-201525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46822',
internalId:  '',
customField: '20100202-201756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48501',
internalId:  '',
customField: '20100226-163524'
};
webappMappings['7050']=webappMappings['7050-2185']={
webappId:    '7050',
documentId:  '49901',
internalId:  '2185',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49901',
internalId:  '',
customField: '20100210-141418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52801',
internalId:  '',
customField: '20100227-005642'
};
webappMappings['7008']=webappMappings['7008-9051']={
webappId:    '7008',
documentId:  '147',
internalId:  '9051',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXENW';
var companyName   = 'Health+Quote+Plus';
var htmlTitle	  = 'Quotes+for+California+Health+Insurance%2C+Northridge%2C+California';
var metaKeywords  = 'health+insurance%2C+medical+insurance%2C+health+insurance+quotes%2C+affordable+health+insurance%2C+individual+health+insurance%2C+health+insurance+quote%2C+california+health+insurance%2C+blue+cross+blue+shield+health+insurance%2C+aetna+health+insurance%2C+health+net+health+insurance%2C+united+health+insurance%2C+group+health+insurance%2C+business+health+insurance.+dental+plans%2C+dentalplan%2C+dentist%2C+coverage%2C+dental+insurance%2C+individual%2C+family%2C+affordable%2C+discount+dental+plans';
var metaContents  = 'Best+and+fastest+Health+Insurance+quotes+for+Los+Angeles%2C+Ventura+County%2C+Santa+Clarita+and+all+of+California+by+Holenstein+Insurance+Services.+Health+and+Life+Insurance+by+Blue+Cross+of+California+now+called+Anthem.+Free+Health+Insurance+quotes+from+multiple+providers.+Quick+quote%2C+compare+health+and+dental+plans%2C+sign+up+online+or+download+your+Health+Insurance+Application.++Are+Dental+Plans+cheaper+then+Dental+Insurance%3F+Look+up+participating+Dentists+by+zip+code+in+your+area%2C+in+all++the+states+of+America.++How+do+I+qualify+for+the+Healthy+Family+Insurance+Plan.+Discount+Dental+Plans+and+Group+Dental+Insurance+Plans.++Affordable+Dental+Care+Starting+at+%2479.95+a+Year%21';
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();
};
