/* [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 theSitetree=[ 
	['PAGE','801',jdecode('Home'),jdecode(''),'/801.html','true',[],''],
	['PAGE','852',jdecode('Markets+Served'),jdecode(''),'/852.html','true',[],''],
	['PAGE','873',jdecode('Services+and+Fees'),jdecode(''),'/873.html','true',[],''],
	['PAGE','894',jdecode('Appraisals+Defined'),jdecode(''),'/894/index.html','true',[ 
		['PAGE','915',jdecode('Appraisal+Purposes'),jdecode(''),'/894/915.html','true',[],''],
		['PAGE','936',jdecode('Appraisal+Facts'),jdecode(''),'/894/936.html','true',[],'']
	],''],
	['PAGE','15901',jdecode('Tax+Appeals'),jdecode(''),'/15901.html','true',[],''],
	['PAGE','978',jdecode('Order+an+Appraisal'),jdecode(''),'/978.html','true',[],''],
	['PAGE','999',jdecode('Contact'),jdecode(''),'/999.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='F5F5F5';
theSitetree.keyvisualId='2152';
theSitetree.keyvisualName='architektur.jpg';
theSitetree.fontsetId='360';
theSitetree.graphicsetId='407';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F5F5F5';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Medium',
				paletteFamily: 	'F5F5F5',
				keyvisualId: 	'2152',
				keyvisualName: 	'architektur.jpg',
				fontsetId: 		'360',
				graphicsetId: 	'407',
				contentColor: 	'000000',
				contentBGColor: 'F5F5F5',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'F5F5F5',
				b_color: 		'8EBFC6',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20100212-170150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20080909-152705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '873',
internalId:  '',
customField: '20100212-164757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20100212-165710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '915',
internalId:  '',
customField: '20100212-181611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '936',
internalId:  '',
customField: '20080308-195400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20100212-185356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '978',
internalId:  '',
customField: '20100212-164924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '999',
internalId:  '',
customField: '20080308-195525'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INXLMH';
var companyName   = 'A+Full-service%2C+Multi-state+Appraisal+and+Consulting+Company';
var htmlTitle	  = 'Hogan+Appraisal%2C+L.L.C.';
var metaKeywords  = 'New+Jersey+appraiser%2C+New+Jersey+residential%2C+New+Jersey+commercial%2C+New+Jersey+property+tax+appeals%2C+NJ+appraiser%2C+NJ+residential%2C+NJ+commercial%2C+NJ+property+tax+appeals%2C+estate+planning+appraisals%2C+ocean+county+appraiser%2C+point+pleasant+appraiser%2C+commercial+appraiser%2C+residential+appraiser%2C+fha+appraiser%2C+appraisal+expert+witness%2C+waste+water+appraisals%2C+waste+water+facility+appraisals%2C+insurable+value+appraisal%2C+house+appraiser%2C+appraisal+services%2C+appraisal+consulting%2C+hogan%2C+hogan+appraisal%2C+hogan+appraiser%2C+residential+home+appraiser%2C+NJ+appraisal+companies%2C+New+Jersey+appraisal+companies%2C+Jersey+shore+appraisal%2C+jersey+shore+appraisers%2C+appraisers+in+NJ%2C+appraisers+in+New+Jersey%2C+valuation%2C+valuation+specialist%2C+NJ+FHA+appraiser%2C+New+Jersey+FHA+appraiser%2C+arbitration%2C+absorption+studies%2C+counseling%2C+condemnation%2C+litigation+preparation%2C+cost+and+benefit+studies%2C+property+management+advice%2C+market+analysis%2C+market+trend+studies%2C+zoning+testimony%2C+tax+assessment+review%2C+tax+assessment+advice%2C+tax+appeals%2C';
var metaContents  = 'Hogan+Appraisal%2C+L.L.C.%2C+A+full-service%2C+statewide+appraisal+and+consulting+company+located+in+Point+Pleasant%2C+NJ%2C+Ocean+County';
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();
};

