/* [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','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','2094',jdecode('Contact+Information'),jdecode(''),'/2094.html','true',[],'',''],
	['PAGE','35501',jdecode('Map'),jdecode(''),'/35501.html','true',[],'',''],
	['PAGE','60191',jdecode('Feedback+Now'),jdecode(''),'/60191.html','true',[],'',''],
	['PAGE','2052',jdecode('About+Us'),jdecode(''),'/2052.html','true',[],'',''],
	['PAGE','2157',jdecode('Our+Services'),jdecode(''),'/2157.html','true',[],'',''],
	['PAGE','2178',jdecode('Taxation'),jdecode(''),'/2178.html','true',[],'',''],
	['PAGE','2199',jdecode('Accounting+'),jdecode(''),'/2199.html','true',[],'',''],
	['PAGE','2220',jdecode('Audting'),jdecode(''),'/2220.html','true',[],'',''],
	['PAGE','2241',jdecode('Investigations'),jdecode(''),'/2241.html','true',[],'',''],
	['PAGE','2262',jdecode('Advisory'),jdecode(''),'/2262.html','true',[],'',''],
	['PAGE','59703',jdecode('Audit'),jdecode(''),'/59703.html','true',[],'',''],
	['PAGE','59438',jdecode('Litigation+'),jdecode(''),'/59438.html','true',[],'',''],
	['PAGE','7006',jdecode('Guestbook'),jdecode(''),'/7006.html','true',[],'',''],
	['PAGE','2283',jdecode('Fun'),jdecode(''),'/2283.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Billy';
theSitetree.paletteFamily='589955';
theSitetree.keyvisualId='7078';
theSitetree.keyvisualName='kv_7078.jpg';
theSitetree.fontsetId='16379';
theSitetree.graphicsetId='12123';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='589955';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Billy',
				paletteFamily: 	'589955',
				keyvisualId: 	'7078',
				keyvisualName: 	'kv_7078.jpg',
				fontsetId: 		'16379',
				graphicsetId: 	'12123',
				contentColor: 	'FFFFFF',
				contentBGColor: '589955',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-7934']={
webappId:    '7008',
documentId:  '60191',
internalId:  '7934',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-7006AHW050INX38W']={
webappId:    '1002',
documentId:  '7006',
internalId:  '7006AHW050INX38W',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-225324']={
webappId:    '1501',
documentId:  '2001',
internalId:  '225324',
customField: '1501'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '35501',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20100619-160109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2052',
internalId:  '',
customField: '20100201-165634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2094',
internalId:  '',
customField: '20100619-160136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60191',
internalId:  '',
customField: '20081109-203359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2157',
internalId:  '',
customField: '20081121-115151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2178',
internalId:  '',
customField: '20090709-150530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2199',
internalId:  '',
customField: '20080729-202315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2220',
internalId:  '',
customField: '20061119-131231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2241',
internalId:  '',
customField: '20080807-160729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2262',
internalId:  '',
customField: '20080807-161009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59703',
internalId:  '',
customField: '20081109-204008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59438',
internalId:  '',
customField: '20080807-155424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2283',
internalId:  '',
customField: '20090714-103749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7006',
internalId:  '',
customField: '20070429-211000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35501',
internalId:  '',
customField: '20090724-104128'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX38W';
var companyName   = '+++++++Timothy+W+Hald%2C+CPA';
var htmlTitle	  = 'Tim+Hald+-+Certified+Public+Accountant+-+Austin%2C+TX+-+TAXES+%26+IRS+PROBLEMS+SOLVED';
var metaKeywords  = '78729%2C+Austin%2C+Cedar+Park%2C+Tim+Hald%2C+CPA%2C+Austin+CPA%2C+Austin+Quickbooks%2C+Tuneup%2C+Bookkeeping+Austin%2C+Tax+Austin%2C+Tax+Preparation%2C+Austin%2C+Accounting%2C+Incorporation%2C+LLC%2C+Tax+Representation%2C+IRS%2C+CPA%2C+CPA+TEXAS%2C+Quickbooks+Setup%2C+Accountant+Austin%2C+Balance+Sheet%2C+Agreed+upon+Procedure%2C+HUD+AUDIT%2C+NON+PROFIT%2C+990%2C+1120%2C+1120S%2C+';
var metaContents  = 'Austin%2C+Texas%2C+CPA+Austin%2C+Texas+CPA%2C+Tax+Preparation%2C+Tim+Hald%2C+CPA%2C+Austin+CPA%2C+Austin+Quickbooks%2C+Tuneup%2C+Bookkeeping+Austin%2C+Tax+Austin%2C+Tax+Preparation%2C+Austin%2C+Accounting%2C+Incorporation%2C+LLC%2C+Tax+Representation%2C+IRS%2C+CPA%2C+CPA+TEXAS%2C+Quickbooks+Setup%2C+Accountant+Austin%2C+Balance+Sheet%2C+Agreed+upon+Procedure%2C+HUD+AUDIT%2C+NON+PROFIT%2C+990%2C+1120%2C+1120S';
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();
};

