/* [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','11101',jdecode('Home'),jdecode(''),'/11101.html','true',[],'',''],
	['PAGE','11152',jdecode('F+A+Q'),jdecode(''),'/11152.html','true',[],'',''],
	['PAGE','11173',jdecode('About+us'),jdecode(''),'/11173.html','true',[],'','']];
var siteelementCount=3;
theSitetree.topTemplateName='Simple';
theSitetree.paletteFamily='C1BCB6';
theSitetree.keyvisualId='4621';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='10346';
theSitetree.graphicsetId='10456';
theSitetree.contentColor='A00000';
theSitetree.contentBGColor='C1BCB6';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Simple',
				paletteFamily: 	'C1BCB6',
				keyvisualId: 	'4621',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'10346',
				graphicsetId: 	'10456',
				contentColor: 	'A00000',
				contentBGColor: 'C1BCB6',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'857157',
				e_color: 		'FFFFFF',
				f_color: 		'817E7E',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20100304-195206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11173',
internalId:  '',
customField: '20100306-112949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11152',
internalId:  '',
customField: '20100304-195226'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11101',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010IN36V8';
var companyName   = 'B.+O.+C.+VENTURES%2C+REALTORS';
var htmlTitle	  = 'B.O.C.+Ventures%2C+Realtors';
var metaKeywords  = 'HAFA%2C+foreclosure%2C+real+estate%2C+realtor%2C+realator%2C+houston%2C+humble%2C+kingwood%2C+huffman%2C+missouri+city%2C+stafford%2C+sugarland%2C+katy%2C+har%2C+houston+association+of+realtors%2C+rent%2C+rental%2C+lease%2C+buy%2C+homeowner%2C+foreclosure+specialist%2C+real+estate+specialist%2C+housing%2C+apartments%2C+condo%2C+commercial+property%2C+retail+property%2C+investing%2C+for+sale+by+owner%2C+house+for+sale%2C+sell%2C+sold+homes%2C+fair+market+value%2C+rent+to+own%2C+lease+to+own%2C+home+affordable+foreclosure+alternative%2C+down+payment+assistance%2C+naca.com%2C+har.com%2C+bpo%2C+broker+price+opinion%2C+atascocita%2C+spring%2C+find+a+home%2C+property%2C+properties';
var metaContents  = 'AS+AN+EXCLUSIVE+BUYER%27S+BROKERAGE+FIRM%0D%0A%0D%0AWE+USE+OVER+30+YEARS+OF+EXPERIENCE++EMPLOYING+EXTREMISM+WHILE+EDUCATING+AND+INSTILLING+AN+IN+%7EFRANGIBLE+DESIRE+TO+EXPLORE+THE+SIMPLICITY+OF+HOME+OWNERSHIP+OWNING+THAT+WHICH+IS+REAL%7EESTATE%0D%0A%0D%0A+%0D%0A%0D%0A+++++++++++++++++++++++++%0D%0A%0D%0AB.O.C.VENTURES+WILL+GUIDE+YOU+FROM+CONTACT+TO+CONSUMMATION+%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0APUTTING+YOUR+INTEREST+FIRST+BECAUSE+YOU+ARE+THE+CURATOR+AND+IMPLEMENTAL+IN+THE+PURCHASE+OF+ONE+OF+YOUR+GREATEST+INVESTMENTS+++++++++++++++++++++++++%7EREAL+ESTATE%0D%0A%0D%0A+%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0APRE+%26+POST+FORECLOSURE+SPECIALIST%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ACREDIT+RESULTANT%0D%0A%0D%0A++++++++++++++%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AFORECLOSURE+IS+NOT+FATAL+%0D%0A%0D%0A+++++++++++++++++%0D%0A%0D%0A+%0D%0A%0D%0AEXCLUSIVE+BUYER%27S+BROKERAGE+FIRM+%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A';
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();
};
