/* [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','239245',jdecode('Properties+by+Area'),jdecode(''),'/239245/index.html','true',[ 
		['PAGE','239545',jdecode('Central'),jdecode(''),'/239245/239545.html','true',[],'',''],
		['PAGE','239266',jdecode('North'),jdecode(''),'/239245/239266.html','true',[],'',''],
		['PAGE','239287',jdecode('Northwest'),jdecode(''),'/239245/239287.html','true',[],'',''],
		['PAGE','239308',jdecode('Northeast'),jdecode(''),'/239245/239308.html','true',[],'',''],
		['PAGE','239329',jdecode('South'),jdecode(''),'/239245/239329.html','true',[],'',''],
		['PAGE','239350',jdecode('Southwest'),jdecode(''),'/239245/239350.html','true',[],'',''],
		['PAGE','239371',jdecode('Southeast'),jdecode(''),'/239245/239371.html','true',[],'','']
	],'',''],
	['PAGE','80823',jdecode('Apartments+For+Rent'),jdecode(''),'/80823/index.html','true',[ 
		['PAGE','285856',jdecode('1021+Water+St.+Unit+A'),jdecode(''),'/80823/285856.html','true',[],'',''],
		['PAGE','285877',jdecode('1021+Water+St.+Unit+C'),jdecode(''),'/80823/285877.html','true',[],'',''],
		['PAGE','141187',jdecode('2300+South+Eye+St.+Unit+B'),jdecode(''),'/80823/141187.html','false',[],'',''],
		['PAGE','290167',jdecode('Villa+De+Oro'),jdecode(''),'/80823/290167.html','true',[],'',''],
		['PAGE','312089',jdecode('8000+N+Laurelglen+Unit+A'),jdecode(''),'/80823/312089.html','false',[],'',''],
		['PAGE','323000',jdecode('640+Spring+Meadow+Unit+2'),jdecode(''),'/80823/323000.html','false',[],'',''],
		['PAGE','340600',jdecode('113+Hopkins+Ave+Unit+4'),jdecode(''),'/80823/340600.html','false',[],'','']
	],'',''],
	['PAGE','153045',jdecode('Condo%26%23x27%3Bs+For+Rent'),jdecode(''),'/153045.html','false',[],'',''],
	['PAGE','601',jdecode('Houses+For+Rent'),jdecode(''),'/601/index.html','true',[ 
		['PAGE','321300',jdecode('8914+S.+Union+Ave'),jdecode(''),'/601/321300.html','true',[],'',''],
		['PAGE','285982',jdecode('5801+Pine+Trail+Dr.'),jdecode(''),'/601/285982.html','true',[],'',''],
		['PAGE','305299',jdecode('5317+New+Grove'),jdecode(''),'/601/305299.html','false',[],'',''],
		['PAGE','350200',jdecode('11817+Privet+Place'),jdecode(''),'/601/350200.html','true',[],'',''],
		['PAGE','333500',jdecode('2005+Carlton'),jdecode(''),'/601/333500.html','true',[],'',''],
		['PAGE','356400',jdecode('3107+Agnew+Meadows'),jdecode(''),'/601/356400.html','true',[],'',''],
		['PAGE','305320',jdecode('10316+Seneca+Falls'),jdecode(''),'/601/305320.html','true',[],'',''],
		['PAGE','300599',jdecode('10420+Holland+St'),jdecode(''),'/601/300599.html','true',[],'',''],
		['PAGE','333521',jdecode('8617+Beaver+Drive'),jdecode(''),'/601/333521.html','false',[],'',''],
		['PAGE','335821',jdecode('2900+Singing+Hills'),jdecode(''),'/601/335821.html','true',[],'',''],
		['PAGE','204229',jdecode('3120+Fillmore+Ave'),jdecode(''),'/601/204229.html','true',[],'',''],
		['PAGE','252145',jdecode('4808+Ohman+Ct.'),jdecode(''),'/601/252145.html','false',[],'',''],
		['PAGE','305278',jdecode('7405+Hachita'),jdecode(''),'/601/305278.html','false',[],'',''],
		['PAGE','297878',jdecode('7401+Arleta+Ave'),jdecode(''),'/601/297878.html','false',[],'',''],
		['PAGE','335800',jdecode('10103+Santa+Anita'),jdecode(''),'/601/335800.html','false',[],'','']
	],'',''],
	['PAGE','262045',jdecode('Arvin+Area'),jdecode(''),'/262045/index.html','false',[ 
		['PAGE','263145',jdecode('25417+Judith+St'),jdecode(''),'/262045/263145.html','false',[],'','']
	],'',''],
	['PAGE','76423',jdecode('Taft+Area'),jdecode(''),'/76423/index.html','true',[ 
		['PAGE','285940',jdecode('28179+McClaren+Ave'),jdecode(''),'/76423/285940.html','true',[],'','']
	],'',''],
	['PAGE','52112',jdecode('Coming+Soon'),jdecode(''),'/52112/index.html','true',[ 
		['PAGE','333542',jdecode('1124+Mac+Brady'),jdecode(''),'/52112/333542.html','true',[],'',''],
		['PAGE','340621',jdecode('5801+Willowcrest+St'),jdecode(''),'/52112/340621.html','true',[],'',''],
		['PAGE','323021',jdecode('6001+Auburn+Oaks+Unit+C'),jdecode(''),'/52112/323021.html','true',[],'',''],
		['PAGE','264245',jdecode('113+Hopkins+Unit+6'),jdecode(''),'/52112/264245.html','true',[],'',''],
		['PAGE','264266',jdecode('113+Hopkins+Unit+7'),jdecode(''),'/52112/264266.html','true',[],'',''],
		['PAGE','190187',jdecode('1838+Monterey+St+Unit+B'),jdecode(''),'/52112/190187.html','true',[],'','']
	],'',''],
	['PAGE','664',jdecode('For+Sale'),jdecode(''),'/664.html','true',[],'',''],
	['PAGE','340642',jdecode('Tenant+FAQ'),jdecode(''),'/340642.html','true',[],'',''],
	['PAGE','11001',jdecode('Maintenance'),jdecode(''),'/11001.html','true',[],'',''],
	['PAGE','727',jdecode('Owners+Services'),jdecode(''),'/727.html','true',[],'',''],
	['PAGE','748',jdecode('Application'),jdecode(''),'/748.html','true',[],'',''],
	['PAGE','769',jdecode('Contact'),jdecode(''),'/769/index.html','true',[ 
		['PAGE','5401',jdecode('Map'),jdecode(''),'/769/5401.html','true',[],'','']
	],'','']];
var siteelementCount=52;
theSitetree.topTemplateName='Basic';
theSitetree.paletteFamily='36566E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10828';
theSitetree.graphicsetId='11283';
theSitetree.contentColor='36566E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Basic',
				paletteFamily: 	'36566E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10828',
				graphicsetId: 	'11283',
				contentColor: 	'36566E',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-114']={
webappId:    '7008',
documentId:  '769',
internalId:  '114',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '239',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '5401',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7008']=webappMappings['7008-115']={
webappId:    '7008',
documentId:  '11001',
internalId:  '115',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239',
internalId:  '',
customField: '20100901-145821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100903-120530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '664',
internalId:  '',
customField: '20090629-130446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '350200',
internalId:  '',
customField: '20100823-182327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '727',
internalId:  '',
customField: '20090827-184325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '748',
internalId:  '',
customField: '20091202-162923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20080908-170657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '769',
internalId:  '',
customField: '20091202-162317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20080902-150311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141187',
internalId:  '',
customField: '20100831-185106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '356400',
internalId:  '',
customField: '20100831-190424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '305278',
internalId:  '',
customField: '20100726-161127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '285940',
internalId:  '',
customField: '20100831-150320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '323021',
internalId:  '',
customField: '20100726-164821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '285982',
internalId:  '',
customField: '20100830-114139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '335821',
internalId:  '',
customField: '20100810-173022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52112',
internalId:  '',
customField: '20100903-114039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80823',
internalId:  '',
customField: '20100903-180944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76423',
internalId:  '',
customField: '20100831-150055'
};
webappMappings['1501']=webappMappings['1501-4004848']={
webappId:    '1501',
documentId:  '239',
internalId:  '4004848',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '335800',
internalId:  '',
customField: '20100809-151352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '290167',
internalId:  '',
customField: '20100804-112343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '285877',
internalId:  '',
customField: '20100817-155533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '323000',
internalId:  '',
customField: '20100701-173211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '264266',
internalId:  '',
customField: '20100817-114438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '333521',
internalId:  '',
customField: '20100726-163907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '333542',
internalId:  '',
customField: '20100726-163412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '300599',
internalId:  '',
customField: '20100804-113406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297878',
internalId:  '',
customField: '20100804-113115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153045',
internalId:  '',
customField: '20100609-151444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '340600',
internalId:  '',
customField: '20100810-163126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '340621',
internalId:  '',
customField: '20100818-174215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '340642',
internalId:  '',
customField: '20100803-154941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '305320',
internalId:  '',
customField: '20100611-162942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190187',
internalId:  '',
customField: '20100719-132130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '312089',
internalId:  '',
customField: '20100614-114436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '204229',
internalId:  '',
customField: '20100827-154554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '264245',
internalId:  '',
customField: '20100817-114408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '321300',
internalId:  '',
customField: '20100817-114722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '263145',
internalId:  '',
customField: '20100616-155942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '333500',
internalId:  '',
customField: '20100827-160538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239245',
internalId:  '',
customField: '20100208-145653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239545',
internalId:  '',
customField: '20100903-181024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239266',
internalId:  '',
customField: '20100827-154713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239287',
internalId:  '',
customField: '20100903-181101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239308',
internalId:  '',
customField: '20100730-170720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239329',
internalId:  '',
customField: '20100827-154749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239350',
internalId:  '',
customField: '20100903-181141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239371',
internalId:  '',
customField: '20100804-111706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '305299',
internalId:  '',
customField: '20100827-154517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252145',
internalId:  '',
customField: '20100817-113659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '285856',
internalId:  '',
customField: '20100817-155510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '262045',
internalId:  '',
customField: '20100616-155922'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INVQD7';
var companyName   = 'KBS+Property+Management';
var htmlTitle	  = 'KBS+Property+Management';
var metaKeywords  = 'Property+Management%2C+Rental+Properties%2C+for+rent%2C+real+estate%2C+investment+properties%2C+apartments%2C+condos%2C+houses%2C+house%2C+home%2C+moving%2CBakersfield+real+estate%2C+Bakersfield+CA+real+estate%2C+Rosedale+homes+for+sale%2C+Rosedale+real+estate+listings%2C+North+East+Bakersfield+real+estate+agent%2C+homes+for+sale+in+North+East+Bakersfield%2CBakersfield+Rentals%2C+Bakersfield+Apartments+for+Rent%2C+Rentals+in+Bakersfield%2C+Bakersfield+Houses+for+rent%2C+rental+housing%2C+bakersfield+property+management%2C+property+management+companies+in+bakersfield%2C+real+estate+rentals%2Ckbs+management+services%2Cbakersfield+rentals%2Chome+rentals%2Capartment+rentals%2Ckern+county+rental+properties%2Cproperty%2Cmanagement%2Crental+owner+services%2Cmaintenance%2Cpaying%2Cbills%2Ctaxes%2Cgardening%2Ccleaning%2Clocal%2Cworkmen%2Cestate%2Cagent%2Csearch%2Chouse%2Capartment%2Ccalifornia%2Ckern+county+real+estate%2C+bakersfield+realty+management+services%2Csouthern+california%2C+kbs%2C+kbsproperty+management%2C+kbs+rentals%2C+kbs+real+estate++Bakersfield+professional+property+management%2C+property+management+in+Bakersfield%2C+affordable+professional+property+management+in+Bakersfield%2C+Homes+for+rent+in+Bakersfield%2C+Bakersfield+real+estate+rentals%2C+Bakersfield+California+rental+properties%2C+Bakersfield+mls+listings%2C+Bakersfield+single+family+homes+for+rent%2C+Bakersfield+rental+homes%2C+Bakersfield+property+managers%2C+Bakersfield+professional+property+managers%2C+Bakersfield+real+estate+listings%2C+Bakersfield+real+estate+agent%2C+homes+for+sale+in+Bakersfield%2C+Bakersfield+apartments%2C+Bakersfield+%2C+California%2C';
var metaContents  = 'Property+Management%2C+Rental+Properties%2C+for+rent%2C+real+estate%2C+investment+properties%2C+apartments%2C+condos%2C+houses%2C+house%2C+home%2C+moving%2C+Bakersfield+professional+property+management%2C+property+management+in+Bakersfield%2C+affordable+professional+property+management+in+Bakersfield%2C+Homes+for+rent+in+Bakersfield%2C+Bakersfield+real+estate+rentals%2C+Bakersfield+California+rental+properties%2C+Bakersfield+mls+listings%2C+Bakersfield+single+family+homes+for+rent%2C+Bakersfield+rental+homes%2C+Bakersfield+property+managers%2C+Bakersfield+professional+property+managers%2C+Bakersfield+real+estate+listings%2C+Bakersfield+real+estate+agent%2C+homes+for+sale+in+Bakersfield%2C+Bakersfield+apartments%2C+Bakersfield+%2C+California%2C';
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();
};
