/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','452',jdecode('Services+'),jdecode(''),'/452.html','true',[],''],
	['PAGE','69612',jdecode('Bankruptcy'),jdecode(''),'/69612.html','true',[],''],
	['PAGE','6401',jdecode('Tax+Resolution'),jdecode(''),'/6401/index.html','true',[ 
		['PAGE','7001',jdecode('Offer+in+Compromies'),jdecode(''),'/6401/7001.html','true',[],''],
		['PAGE','7022',jdecode('Installment+Agreement'),jdecode(''),'/6401/7022.html','true',[],''],
		['PAGE','7043',jdecode('Penalty+Abatement'),jdecode(''),'/6401/7043.html','true',[],''],
		['PAGE','6422',jdecode('Currently+Not+Collectible'),jdecode(''),'/6401/6422.html','true',[],''],
		['PAGE','7064',jdecode('Tax+Levy%2FLien+'),jdecode(''),'/6401/7064.html','true',[],'']
	],''],
	['PAGE','7085',jdecode('Tax+Preparation'),jdecode(''),'/7085.html','true',[],''],
	['PAGE','7106',jdecode('Audit+Representation'),jdecode(''),'/7106.html','true',[],''],
	['PAGE','7127',jdecode('Business+Consulting'),jdecode(''),'/7127.html','true',[],''],
	['PAGE','7148',jdecode('Trust%2FEstate+Planning'),jdecode(''),'/7148.html','true',[],''],
	['PAGE','473',jdecode('Contact+Us'),jdecode(''),'/473/index.html','true',[ 
		['PAGE','11012',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/473/11012.html','false',[],'']
	],''],
	['PAGE','6506',jdecode('About+the+Firm'),jdecode(''),'/6506.html','true',[],''],
	['PAGE','28912',jdecode('Privacy+Notice'),jdecode(''),'/28912.html','true',[],''],
	['PAGE','14212',jdecode('Disclaimer'),jdecode(''),'/14212.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='6683B6';
theSitetree.keyvisualId='2443';
theSitetree.keyvisualName='beratung.jpg';
theSitetree.fontsetId='406';
theSitetree.graphicsetId='461';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Collage',
				paletteFamily: 	'6683B6',
				keyvisualId: 	'2443',
				keyvisualName: 	'beratung.jpg',
				fontsetId: 		'406',
				graphicsetId: 	'461',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFFFFF',
				b_color: 		'6683B6',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']=webappMappings['1001-ahw050inejegd799419e6ea577b3']={
webappId:    '1001',
documentId:  '473',
internalId:  'ahw050inejegd799419e6ea577b3',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inejegd799419e6ea577b3']={
webappId:    '1001',
documentId:  '11012',
internalId:  'ahw050inejegd799419e6ea577b3',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20080713-174042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20080428-215939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69612',
internalId:  '',
customField: '20080428-223815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6401',
internalId:  '',
customField: '20080813-193423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20070401-204239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7022',
internalId:  '',
customField: '20070401-204457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7043',
internalId:  '',
customField: '20070401-204529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6422',
internalId:  '',
customField: '20070401-204743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7064',
internalId:  '',
customField: '20070401-204950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7085',
internalId:  '',
customField: '20070401-205051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7106',
internalId:  '',
customField: '20070401-205150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7127',
internalId:  '',
customField: '20070401-205334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7148',
internalId:  '',
customField: '20070404-133659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20080813-193353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11012',
internalId:  '',
customField: '20070215-150129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6506',
internalId:  '',
customField: '20090523-102856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28912',
internalId:  '',
customField: '20070329-142557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14212',
internalId:  '',
customField: '20080616-112123'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INEJEG';
var companyName   = 'Packey+Law+Corporation+%28916%29+564-1600';
var htmlTitle	  = 'Packey+Law+Corporation%2C+A+Sacramento+Tax+Law+Firm';
var metaKeywords  = 'Law+Offices+of+Steven+J.+Packey%2C+Law+Offices+of+Steven+Packey%2C+Steve+Packey%2C+Offer+in+Compromise%2C+tax+attorney%2C+IRS%2C+back+taxes%2C+sacramento+tax+attorney%2C+tax+relief%2C+owe+taxes%2C+steven+j+packey+tax+attorney%2C+ftb+taxes%2C+ftb+tax+attorney%2C+wage+levy%2C+tax+lien%2C+wage+garnishment%2C+bank+levy%2C+levy%2C+lien%2C+installment+agreement%2C+local+tax+attorney%2C+currently+not+collectible+status%2C+';
var metaContents  = 'The+Law+Offices+of+Steven+J.+Packey+is+a+full+service+tax+law+firm.++Sacramento+Tax+Attorney+Steven+Packey+has+years+of+tax+experience+and+an+LL.M.+or+Master+of+Laws+in+Taxation.+Servies+include+tax+resolution+services%2C+tax+preparation%2C+tax+controversy%2C+business+consulting+and+estate+planning.+';
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();
};
