/* [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','239',jdecode('Home'),jdecode(''),'/239.html','true',[],'',''],
	['PAGE','5001',jdecode('Personal+Auto+Insurance'),jdecode(''),'/5001/index.html','true',[ 
		['PAGE','32170',jdecode('Teenagers'),jdecode(''),'/5001/32170.html','true',[],'',''],
		['PAGE','32233',jdecode('Young+Marrieds'),jdecode(''),'/5001/32233.html','true',[],'',''],
		['PAGE','32242',jdecode('Family+Insurance'),jdecode(''),'/5001/32242.html','true',[],'',''],
		['PAGE','32251',jdecode('Senior+Citizens'),jdecode(''),'/5001/32251.html','true',[],'','']
	],'',''],
	['PAGE','5043',jdecode('Homeowners%2FCondos'),jdecode(''),'/5043/index.html','true',[ 
		['PAGE','5064',jdecode('HOW+MUCH+IS+ENOUGH%3F'),jdecode(''),'/5043/5064.html','true',[],'',''],
		['PAGE','5085',jdecode('Condos'),jdecode(''),'/5043/5085.html','true',[],'',''],
		['PAGE','5106',jdecode('Renters'),jdecode(''),'/5043/5106.html','true',[],'',''],
		['PAGE','32260',jdecode('Flood'),jdecode(''),'/5043/32260.html','true',[],'','']
	],'',''],
	['PAGE','5127',jdecode('Make+Payments-Claims-Service'),jdecode(''),'/5127/index.html','true',[ 
		['PAGE','33682',jdecode('CLAIMS'),jdecode(''),'/5127/33682.html','true',[],'',''],
		['PAGE','33691',jdecode('Service%2C+ID+Cards%2C+Changes'),jdecode(''),'/5127/33691.html','true',[],'',''],
		['PAGE','33711',jdecode('Make+a+Payment'),jdecode(''),'/5127/33711.html','true',[],'',''],
		['PAGE','34031',jdecode('NAIC+Codes'),jdecode(''),'/5127/34031.html','true',[],'','']
	],'',''],
	['PAGE','32157',jdecode('Business+Insurance'),jdecode(''),'/32157/index.html','true',[ 
		['PAGE','32179',jdecode('Restaurants'),jdecode(''),'/32157/32179.html','true',[],'',''],
		['PAGE','32188',jdecode('Car+Washes'),jdecode(''),'/32157/32188.html','true',[],'',''],
		['PAGE','32197',jdecode('Tradesmen'),jdecode(''),'/32157/32197.html','true',[],'',''],
		['PAGE','32206',jdecode('Main+Street+Business'),jdecode(''),'/32157/32206.html','true',[],'','']
	],'',''],
	['PAGE','5148',jdecode('Antiques%2C+Classics%2C+Rods'),jdecode(''),'/5148/index.html','true',[ 
		['PAGE','32984',jdecode('Antiques'),jdecode(''),'/5148/32984.html','true',[],'',''],
		['PAGE','32993',jdecode('Classics'),jdecode(''),'/5148/32993.html','true',[],'',''],
		['PAGE','33002',jdecode('Street+Rods'),jdecode(''),'/5148/33002.html','true',[],'',''],
		['PAGE','33011',jdecode('Collectibles'),jdecode(''),'/5148/33011.html','true',[],'','']
	],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Anlage';
theSitetree.paletteFamily='92B4DE';
theSitetree.keyvisualId='2014';
theSitetree.keyvisualName='schule4.jpg';
theSitetree.fontsetId='333';
theSitetree.graphicsetId='387';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='92BEDE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Anlage',
				paletteFamily: 	'92B4DE',
				keyvisualId: 	'2014',
				keyvisualName: 	'schule4.jpg',
				fontsetId: 		'333',
				graphicsetId: 	'387',
				contentColor: 	'000000',
				contentBGColor: '92BEDE',
				a_color: 		'92B4DE',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '239',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US:'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '239',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239',
internalId:  '',
customField: '20110127-121850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20110127-131233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5043',
internalId:  '',
customField: '20110127-114537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5127',
internalId:  '',
customField: '20090724-124820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5148',
internalId:  '',
customField: '20090820-190016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33002',
internalId:  '',
customField: '20090621-190703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32993',
internalId:  '',
customField: '20090621-190518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32984',
internalId:  '',
customField: '20090621-190249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32157',
internalId:  '',
customField: '20110127-120953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5064',
internalId:  '',
customField: '20090626-151239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5085',
internalId:  '',
customField: '20090710-140250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5106',
internalId:  '',
customField: '20090710-140433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32170',
internalId:  '',
customField: '20110127-111825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32233',
internalId:  '',
customField: '20110127-113416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32242',
internalId:  '',
customField: '20110127-113309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32251',
internalId:  '',
customField: '20110127-113221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32260',
internalId:  '',
customField: '20090724-124800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32179',
internalId:  '',
customField: '20090626-151818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32188',
internalId:  '',
customField: '20090615-135551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32197',
internalId:  '',
customField: '20090615-135631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32206',
internalId:  '',
customField: '20090615-135658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33011',
internalId:  '',
customField: '20090621-190942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33682',
internalId:  '',
customField: '20110127-114728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33691',
internalId:  '',
customField: '20090805-094422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33711',
internalId:  '',
customField: '20110127-114837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34031',
internalId:  '',
customField: '20110127-120700'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN30QT';
var companyName   = 'Rumbaugh+Insurance';
var htmlTitle	  = 'PA+Insurance%2C+Hanover+Insurance%2C+Car+Insurance%2C+Home+Insurance%2C+Homeowners+Insurance%2C+Hanover+Business+Insurance%2C+Bonds%2C+Workers+Comp+';
var metaKeywords  = 'Auto+Insurance%2C+Homeowners%2C+Cycle%2C+Harley%2C+Honda%2C+Motorcycle%2C+Antique%2C+Classic%2C+Street+Rods%2C+Builders%2C+Contractors%2C+Pavers%2C+Electricians%2C+Plumbers%2C+Roofers%2C+Excavators%2C+Restaurant';
var metaContents  = 'Auto+Insurance%2C+Homeowners%2C+Cycle%2C+Harley%2C+Honda%2C+Motorcycle%2C+Antique%2C+Classic%2C+Street+Rods%2C+Builders%2C+Contractors%2C+Pavers%2C+Electricians%2C+Plumbers%2C+Roofers%2C+Excavators%2C+Restaurant%2C+Dry+Cleaners%2C+Office%2C+Physician.';
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();
};

