/* [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','201',jdecode('Home'),jdecode(''),'/201.html','true',[],'',''],
	['PAGE','207',jdecode('Our+Properties'),jdecode(''),'/207/index.html','true',[ 
		['PAGE','212',jdecode('The+Faust+Building'),jdecode(''),'/207/212.html','true',[],'',''],
		['PAGE','217',jdecode('The+McFate+Building'),jdecode(''),'/207/217.html','true',[],'',''],
		['PAGE','222',jdecode('1125+SW+Taylor+Street'),jdecode(''),'/207/222.html','true',[],'',''],
		['PAGE','227',jdecode('1100+SW+Taylor+Street'),jdecode(''),'/207/227.html','true',[],'',''],
		['PAGE','13201',jdecode('1107+SW+Tenth+Street'),jdecode(''),'/207/13201.html','true',[],'',''],
		['PAGE','57001',jdecode('1009+SW+Fillmore'),jdecode(''),'/207/57001.html','true',[],'','']
	],'',''],
	['PAGE','237',jdecode('Currently+For+Rent'),jdecode(''),'/237/index.html','true',[ 
		['PAGE','242',jdecode('Apartments'),jdecode(''),'/237/242.html','true',[],'','']
	],'',''],
	['PAGE','61901',jdecode('Executive+Stay%2FFurnished'),jdecode(''),'/61901.html','true',[],'',''],
	['PAGE','247',jdecode('Currently+For+Sale'),jdecode(''),'/247.html','true',[],'',''],
	['PAGE','33101',jdecode('Property+Owners'),jdecode(''),'/33101.html','true',[],'',''],
	['PAGE','41201',jdecode('Tenants'),jdecode(''),'/41201/index.html','true',[ 
		['PAGE','33122',jdecode('Apartment+Finder+Svc.'),jdecode(''),'/41201/33122.html','true',[],'',''],
		['PAGE','38901',jdecode('Tenants+%28follow+up+page%29'),jdecode(''),'/41201/38901.html','false',[],'',''],
		['PAGE','40822',jdecode('Pay+Rent+Online'),jdecode(''),'/41201/40822.html','true',[],'',''],
		['PAGE','40843',jdecode('Fill+Out+An+Application'),jdecode(''),'/41201/40843.html','true',[],'','']
	],'',''],
	['PAGE','5702',jdecode('Photos'),jdecode(''),'/5702.html','true',[],'',''],
	['PAGE','257',jdecode('About+us'),jdecode(''),'/257.html','true',[],'',''],
	['PAGE','267',jdecode('Contact+Us'),jdecode(''),'/267.html','true',[],'',''],
	['PAGE','6402',jdecode('Guestbook'),jdecode(''),'/6402/index.html','true',[ 
		['PAGE','6403',jdecode('Read+Guestbook'),jdecode(''),'/6402/6403.html','false',[],'','']
	],'',''],
	['PAGE','35901',jdecode('Map'),jdecode(''),'/35901.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Fragment';
theSitetree.paletteFamily='AFD5C8';
theSitetree.keyvisualId='3452';
theSitetree.keyvisualName='kv_3452.jpg';
theSitetree.fontsetId='10646';
theSitetree.graphicsetId='10761';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Fragment',
				paletteFamily: 	'AFD5C8',
				keyvisualId: 	'3452',
				keyvisualName: 	'kv_3452.jpg',
				fontsetId: 		'10646',
				graphicsetId: 	'10761',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'AFD5C8',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'508E79',
				e_color: 		'508E79',
				f_color: 		'508E79',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-d99f2cd4d0dbcdd49dd8aac08c702449']={
webappId:    '7060',
documentId:  '5702',
internalId:  'd99f2cd4d0dbcdd49dd8aac08c702449',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-1346891']={
webappId:    '1501',
documentId:  '201',
internalId:  '1346891',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-6402aen010in2mi0']={
webappId:    '1002',
documentId:  '6402',
internalId:  '6402aen010in2mi0',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '35901',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61901',
internalId:  '',
customField: '20100801-125915'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20100729-172552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '207',
internalId:  '',
customField: '20050913-205707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212',
internalId:  '',
customField: '20090321-065114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217',
internalId:  '',
customField: '20090321-065202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222',
internalId:  '',
customField: '20060916-085023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '227',
internalId:  '',
customField: '20061231-135457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20061231-140234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57001',
internalId:  '',
customField: '20091213-095730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '237',
internalId:  '',
customField: '20080714-191812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '242',
internalId:  '',
customField: '20100801-125817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247',
internalId:  '',
customField: '20051003-072308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33101',
internalId:  '',
customField: '20080906-080918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41201',
internalId:  '',
customField: '20080907-090116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33122',
internalId:  '',
customField: '20080831-071036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38901',
internalId:  '',
customField: '20080802-085549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40822',
internalId:  '',
customField: '20080831-071917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40843',
internalId:  '',
customField: '20080831-072000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5702',
internalId:  '',
customField: '20060426-183435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '257',
internalId:  '',
customField: '20060719-185048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '267',
internalId:  '',
customField: '20061001-104109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6402',
internalId:  '',
customField: '20050913-213511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6403',
internalId:  '',
customField: '20050913-213511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20080531-180401'
};
webappMappings['7008']=webappMappings['7008-621']={
webappId:    '7008',
documentId:  '33122',
internalId:  '621',
customField: 'language:en;country:US;'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010IN2MI0';
var companyName   = 'The+HouseHuggers+-+Come+Live+With+Us';
var htmlTitle	  = 'TheHouseHuggers';
var metaKeywords  = 'topeka+apartments%2C+holliday+park%2C+topeka+rentals%2C+topeka%2C+kansas%2C+historic%2C+property+management%2C+topeka+executive+lease%2C+topeka+corporate+rentals%2C+topeka+corporate+suites%2C+topeka+short-term+stay';
var metaContents  = 'Apartments+in+Historic+Holliday+Park%2C+Topeka%2C+Kansas.';
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();
};
