/* [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','15125',jdecode('Home'),jdecode(''),'/15125.html','true',[],''],
	['PAGE','15501',jdecode('Services'),jdecode(''),'/15501/index.html','true',[ 
		['PAGE','15522',jdecode('Tax+Compliance'),jdecode(''),'/15501/15522.html','true',[],''],
		['PAGE','15543',jdecode('Late+Filers'),jdecode(''),'/15501/15543.html','true',[],''],
		['PAGE','15564',jdecode('Small+Business'),jdecode(''),'/15501/15564.html','true',[],''],
		['PAGE','18001',jdecode('Financial+Planning'),jdecode(''),'/15501/18001.html','true',[],''],
		['PAGE','18022',jdecode('Financial+Seminars'),jdecode(''),'/15501/18022.html','true',[],'']
	],''],
	['PAGE','15585',jdecode('About+AAR-3+Financial'),jdecode(''),'/15585.html','true',[],''],
	['PAGE','15606',jdecode('Contact+Us'),jdecode(''),'/15606.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Qben';
theSitetree.paletteFamily='3871AA';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17182';
theSitetree.graphicsetId='12657';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Qben',
				paletteFamily: 	'3871AA',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17182',
				graphicsetId: 	'12657',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'DC9E3C',
				e_color: 		'C976A5',
				f_color: 		'DC9E3C',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15606',
internalId:  '',
customField: '20090624-052541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15585',
internalId:  '',
customField: '20090624-061613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15522',
internalId:  '',
customField: '20090623-172156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20090624-050458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15125',
internalId:  '',
customField: '20090624-055317'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '15125',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-9697823']={
webappId:    '1501',
documentId:  '15125',
internalId:  '9697823',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15543',
internalId:  '',
customField: '20090623-172603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15564',
internalId:  '',
customField: '20090624-050157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20090624-060207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18022',
internalId:  '',
customField: '20090624-054832'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2XHI';
var companyName   = 'Welcome+to+AAR-3+Financial%21';
var htmlTitle	  = 'Welcome+to+the+AAR-3+Financial%21';
var metaKeywords  = 'Brentwood%2C+CA%2C+California%2C+Oakley%2C+Antioch%2C+Pittsburg%2C+Tax%2C+Accounting%2C+Bookeeping%2C+Financial+Planning%2C+Controller%2C+Back+Taxes%2C+IRS%2C+AAR%2C+AAR-III%2C+AAR3%2C+AAR-3%2C+Three+Reeses%2C+Reese%2C+3+Reeses%2C+3Reeses%2C+Reese+III';
var metaContents  = 'Ambrus+has+been+successfully+solving+his+client%E2%80%99s+tax+and+accounting+problems+for+almost+7+years.++A+graduate+of+CSUEB+with+a+B.S.+in+Accounting%2C+Finance%2C+Marketing+and+a+MBA%2C+Ambrus+uses+his+education+to+provide+year-round+tax+compliance%2C+bookkeeping%2C+controller%2C+and+financial+planning+services+to+individuals+and+small+businesses.++Ambrus+also+specializing+in+helping+delinquent+filers+become+current+and+helping+individuals+understand+the+nuts+and+bolts+of+the+financial+planning+process.++With+the+constant+changes+to+the+tax+code+and+the+uncertainty+of+a+slowing+economy%2C+it+is+essential+to+always+be+planning+for+2010+and+beyond.+++Due+to+the+recent+recession%2C+I+have+also+cut+prices+to+provide+all+my+clients+with+a+much+needed+break%21';
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();
};
