/* [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','6101',jdecode('Home'),jdecode(''), jdecode('%2F6101.html'), 'true',[],'',''],
	['PAGE','6152',jdecode('Inspection+Services'),jdecode(''), jdecode('%2F6152.html'), 'true',[],'',''],
	['PAGE','6173',jdecode('Contact+Information'),jdecode(''), jdecode('%2F6173.html'), 'true',[],'',''],
	['PAGE','6194',jdecode('Client+Referrals+'),jdecode(''), jdecode('%2F6194.html'), 'true',[],'',''],
	['PAGE','6401',jdecode('Read+Inspection+Report'),jdecode(''), jdecode('%2F6401.html'), 'true',[],'',''],
	['PAGE','74901',jdecode('Tools+I+Use'),jdecode(''), jdecode('%2F74901.html'), 'true',[],'',''],
	['PAGE','75801',jdecode('Thermal+Imaging+Info'),jdecode(''), jdecode('%2F75801.html'), 'true',[],'',''],
	['PAGE','6422',jdecode('FAQ'),jdecode(''), jdecode('%2F6422.html'), 'true',[],'',''],
	['PAGE','6443',jdecode('Inspection+Fees'),jdecode(''), jdecode('%2F6443.html'), 'true',[],'',''],
	['PAGE','67101',jdecode('Inspectors+Blog'),jdecode(''), jdecode('%2F67101.html'), 'true',[],'',''],
	['PAGE','6464',jdecode('Flood+Plane+Maps'),jdecode(''), jdecode('%2F6464.html'), 'true',[],'',''],
	['PAGE','69401',jdecode('Search+Site'),jdecode(''), jdecode('%2F69401.html'), 'true',[],'',''],
	['PAGE','9501',jdecode('Inspected+Items'),jdecode(''), jdecode('%2F9501%2Findex.html'), 'true',[ 
		['PAGE','65001',jdecode('Foundation+Information'),jdecode(''), jdecode('%2F9501%2F65001.html'), 'true',[],'',''],
		['PAGE','65022',jdecode('Exterior+Grading+and+Drainage'),jdecode(''), jdecode('%2F9501%2F65022.html'), 'true',[],'',''],
		['PAGE','65043',jdecode('Roof+Structure'),jdecode(''), jdecode('%2F9501%2F65043.html'), 'true',[],'',''],
		['PAGE','65064',jdecode('Roof+Covering'),jdecode(''), jdecode('%2F9501%2F65064.html'), 'true',[],'',''],
		['PAGE','65085',jdecode('Walls+Interior+%26+Exterior'),jdecode(''), jdecode('%2F9501%2F65085.html'), 'true',[],'',''],
		['PAGE','65106',jdecode('Ceilings+and+Floors'),jdecode(''), jdecode('%2F9501%2F65106.html'), 'true',[],'',''],
		['PAGE','65148',jdecode('Doors+Interior+and+Exterior'),jdecode(''), jdecode('%2F9501%2F65148.html'), 'true',[],'',''],
		['PAGE','65169',jdecode('Windows'),jdecode(''), jdecode('%2F9501%2F65169.html'), 'true',[],'',''],
		['PAGE','65190',jdecode('Stairways'),jdecode(''), jdecode('%2F9501%2F65190.html'), 'true',[],'',''],
		['PAGE','65211',jdecode('Fireplace+Chimney'),jdecode(''), jdecode('%2F9501%2F65211.html'), 'true',[],'',''],
		['PAGE','65232',jdecode('Porches%2C+Decks+and+Carports'),jdecode(''), jdecode('%2F9501%2F65232.html'), 'true',[],'',''],
		['PAGE','65253',jdecode('Electrical+Service'),jdecode(''), jdecode('%2F9501%2F65253.html'), 'true',[],'',''],
		['PAGE','65274',jdecode('Branch+Circuits%2C+Outlets+and+Fixtures'),jdecode(''), jdecode('%2F9501%2F65274.html'), 'true',[],'',''],
		['PAGE','65295',jdecode('Heating+Equipment'),jdecode(''), jdecode('%2F9501%2F65295.html'), 'true',[],'',''],
		['PAGE','65316',jdecode('Cooling+Equipment'),jdecode(''), jdecode('%2F9501%2F65316.html'), 'true',[],'',''],
		['PAGE','65337',jdecode('Ducts+and+Vents'),jdecode(''), jdecode('%2F9501%2F65337.html'), 'true',[],'',''],
		['PAGE','65358',jdecode('Water+Supply+System'),jdecode(''), jdecode('%2F9501%2F65358.html'), 'true',[],'',''],
		['PAGE','65379',jdecode('Drains%2C+Wastes+and+Vents'),jdecode(''), jdecode('%2F9501%2F65379.html'), 'true',[],'',''],
		['PAGE','65400',jdecode('Water+Heater'),jdecode(''), jdecode('%2F9501%2F65400.html'), 'true',[],'',''],
		['PAGE','65421',jdecode('Hydro-Therapy+Equipment'),jdecode(''), jdecode('%2F9501%2F65421.html'), 'true',[],'',''],
		['PAGE','65442',jdecode('Appliances'),jdecode(''), jdecode('%2F9501%2F65442.html'), 'true',[],'',''],
		['PAGE','65463',jdecode('Gas+Supply+System+Inspection+Clear+Lake'),jdecode(''), jdecode('%2F9501%2F65463.html'), 'true',[],'',''],
		['PAGE','65484',jdecode('Additional+Items'),jdecode(''), jdecode('%2F9501%2F65484.html'), 'true',[],'','']
	],'',''],
	['PAGE','72801',jdecode('Real+Estate+Resources+-+Houston'),jdecode(''), jdecode('%2F72801.html'), 'true',[],'',''],
	['PAGE','70401',jdecode('Home+Inspection+Pasadena+Texas+-++Inspector'),jdecode(''), jdecode('%2F70401.html'), 'false',[],'',''],
	['PAGE','70801',jdecode('Baytown+Home+Inspector+-++Inspection+Company'),jdecode(''), jdecode('%2F70801.html'), 'false',[],'',''],
	['PAGE','70101',jdecode('Clear+Lake+Home+Inspection+-+Inspector'),jdecode(''), jdecode('%2F70101.html'), 'false',[],'','']];
var siteelementCount=40;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='01343D';
theSitetree.keyvisualId='2152';
theSitetree.keyvisualName='architektur.jpg';
theSitetree.fontsetId='355';
theSitetree.graphicsetId='409';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='01343D';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'bizland',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Medium',
				paletteFamily: 	'01343D',
				keyvisualId: 	'2152',
				keyvisualName: 	'architektur.jpg',
				fontsetId: 		'355',
				graphicsetId: 	'409',
				contentColor: 	'FFFFFF',
				contentBGColor: '01343D',
				a_color: 		'01343D',
				b_color: 		'8EBFC6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20110711-214338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6152',
internalId:  '',
customField: '20110708-133944'
};
webappMappings['7008']=webappMappings['7008-33366']={
webappId:    '7008',
documentId:  '6173',
internalId:  '33366',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6173',
internalId:  '',
customField: '20110115-115254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6194',
internalId:  '',
customField: '20110113-193430'
};
webappMappings['1002']=webappMappings['1002-6194aendu0inz6wm']={
webappId:    '1002',
documentId:  '6194',
internalId:  '6194aendu0inz6wm',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6401',
internalId:  '',
customField: '20110708-142000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6443',
internalId:  '',
customField: '20110804-095847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6422',
internalId:  '',
customField: '20110110-200331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20110117-172059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6464',
internalId:  '',
customField: '20110117-151902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65001',
internalId:  '',
customField: '20110114-180130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65022',
internalId:  '',
customField: '20110114-182336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65043',
internalId:  '',
customField: '20110114-182527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65064',
internalId:  '',
customField: '20110114-182733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65085',
internalId:  '',
customField: '20110117-174951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65106',
internalId:  '',
customField: '20110115-112618'
};
webappMappings['7050']=webappMappings['7050-19675']={
webappId:    '7050',
documentId:  '67101',
internalId:  '19675',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65148',
internalId:  '',
customField: '20110115-112340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65169',
internalId:  '',
customField: '20110115-112857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65190',
internalId:  '',
customField: '20110115-115508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65211',
internalId:  '',
customField: '20110115-115704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65232',
internalId:  '',
customField: '20110115-115851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65253',
internalId:  '',
customField: '20110115-120042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65274',
internalId:  '',
customField: '20110117-160623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65295',
internalId:  '',
customField: '20110115-120400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65316',
internalId:  '',
customField: '20110117-174513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65337',
internalId:  '',
customField: '20110115-120813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65358',
internalId:  '',
customField: '20110115-121030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65379',
internalId:  '',
customField: '20110115-121159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65400',
internalId:  '',
customField: '20110114-173341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65421',
internalId:  '',
customField: '20110114-173341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65442',
internalId:  '',
customField: '20110114-173341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65463',
internalId:  '',
customField: '20110114-173341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65484',
internalId:  '',
customField: '20110114-173341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67101',
internalId:  '',
customField: '20110115-111708'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '69401',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69401',
internalId:  '',
customField: '20110116-175857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70101',
internalId:  '',
customField: '20110117-132151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70401',
internalId:  '',
customField: '20110117-134339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70801',
internalId:  '',
customField: '20110117-145315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72801',
internalId:  '',
customField: '20110118-104504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74901',
internalId:  '',
customField: '20110708-124316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75801',
internalId:  '',
customField: '20110708-132219'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INZ6WM';
var companyName   = 'Brad+Leland+Professional+Inspection+Services';
var htmlTitle	  = 'Inspection+Houston+Inspector';
var metaKeywords  = 'houston+home+inspection%2C+houston+inspector%2C+houston+inspectors%2C+houston+inspection%2C+houston+home+inspector%2C+houston+real+estate+inspection%2C+houston+real+estate+inspector%2C+houston+construction+inspection%2C+houston+new+home+inspection%2C+houston+warranty+inspection%2C+thermal+imaging%2C+infared+thermal+imaging';
var metaContents  = 'I+inspect+the+home+you+are+buying+like+it+was+going+to+be+my+own.++Call+281-794-9102+for+a+reliable%2C+informative+and+detailed+inspection+in+the+greater+Houston+area.+Texas+Real+Estate+Inspector+License+%235229';
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();
};

