/* [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','5201',jdecode('Welcome'),jdecode(''),'/5201.html','true',[],'',''],
	['PAGE','5273',jdecode('History+and+Dedication'),jdecode(''),'/5273.html','true',[],'',''],
	['PAGE','5252',jdecode('Professional+Services'),jdecode(''),'/5252.html','true',[],'',''],
	['PAGE','15801',jdecode('Healthcare+Services'),jdecode(''),'/15801.html','true',[],'',''],
	['PAGE','21901',jdecode('Payroll+Services+%26+Tips'),jdecode(''),'/21901.html','true',[],'',''],
	['PAGE','17501',jdecode('Tax+Planning'),jdecode(''),'/17501.html','true',[],'',''],
	['PAGE','17522',jdecode('Financial+Calculators'),jdecode(''),'/17522.html','true',[],'',''],
	['PAGE','5294',jdecode('Other+Useful+Links'),jdecode(''),'/5294.html','true',[],'',''],
	['PAGE','5315',jdecode('Contact+Us'),jdecode(''),'/5315.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='AAA0CD';
theSitetree.keyvisualId='1705';
theSitetree.keyvisualName='handschlag.jpg';
theSitetree.fontsetId='280';
theSitetree.graphicsetId='346';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='AAA0CD';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Architekt',
				paletteFamily: 	'AAA0CD',
				keyvisualId: 	'1705',
				keyvisualName: 	'handschlag.jpg',
				fontsetId: 		'280',
				graphicsetId: 	'346',
				contentColor: 	'000066',
				contentBGColor: 'AAA0CD',
				a_color: 		'AAA0CD',
				b_color: 		'3E3361',
				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:  '5201',
internalId:  '',
customField: '20091203-173702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5252',
internalId:  '',
customField: '20091113-142743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5273',
internalId:  '',
customField: '20100701-174003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5294',
internalId:  '',
customField: '20091112-111251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5315',
internalId:  '',
customField: '20100924-132608'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5201',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-5911295']={
webappId:    '1501',
documentId:  '5201',
internalId:  '5911295',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20091114-212309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20091203-183315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17522',
internalId:  '',
customField: '20091113-120928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21901',
internalId:  '',
customField: '20091204-171653'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INLZ3Z';
var companyName   = 'PSA%2C+Inc.++Quality+CPA+Services...';
var htmlTitle	  = 'Quality+CPA+Services...++Free+hour+consultation...++Let+us+help+you+today%21';
var metaKeywords  = 'Accounting+Services++++Bokkeeping+Services++++Individual++Taxes+++++Corporate+Taxes+Trust+and+Estate+Taxes++++Self-Employment+Taxes++++Payroll+Taxes+++Payroll+Services+Incorporation+Services+++++Health+Insurance++++QuickBooks+HelpMonthly+or+Quarterly+Financial+Statements+%28or+Profit++Loss+Statements%29%09help+savings+save+money+retirement+planning+pension+plan+good+trusted+helpful+help+EDD+FTB+IRS+franchise+tax+board+relief+Starting+a+Business++++++Buying+a+Business++++Business+Valuations++++Internal+Controls+Reviews+Any+other+expenses+that+you+are+concerned++Need+Payroll+Help+++++Hiring+Employees++++Suspect+Fraud%09Are+you+new+to+the+San+Diego+area+or+are+you+just+looking+for+a+Good+CPA+or+Accountant%3F+payroll+employment+hire+service+IRS+internal+revenue+service+paycheck+monthly+expert+expertise+specialize%2C+accountant+record+keeping++resolve+manangement+medical+practice+surgical+doctors+physicians+physician+healthcare+billing+receivalbe+payable++accountant+internal+revenue+service+%22free+payroll%22';
var metaContents  = 'Let+our+experience+and+expertise+help+you+and+your+business+today...++Visit+our+web+site+at+www.StopBurningMoney.com+to+learn+more+about+us%2C+or+if+you+prefer%2C+give+us+a+call+at+619-464-1015.+++We+provide+not+only+quality+accounting+and+tax+services%2C+but+a+whole+lot+more.++Save+time+and+money+by+hiring+the+right+CPA+firm.+++Please+take+advantage+of+our+FREE+one-hour+consultation...+give+us+a+call+today.++Youll+be+glad+you+did...%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();
};

