/* [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','63',jdecode('Home'),jdecode(''),'/63.html','true',[],'',''],
	['PAGE','1148',jdecode('About+our+Firm'),jdecode(''),'/1148/index.html','true',[ 
		['PAGE','15001',jdecode('Noah+Davis'),jdecode(''),'/1148/15001.html','true',[],'',''],
		['PAGE','15022',jdecode('James+Vasquez'),jdecode(''),'/1148/15022.html','true',[],'',''],
		['PAGE','15822',jdecode('Marisa+Morgan'),jdecode(''),'/1148/15822.html','true',[],'',''],
		['PAGE','15801',jdecode('Victoria+Nguyen'),jdecode(''),'/1148/15801.html','true',[],'',''],
		['PAGE','2904',jdecode('Our+Rates'),jdecode(''),'/1148/2904.html','true',[],'','']
	],'',''],
	['PAGE','1175',jdecode('Services'),jdecode(''),'/1175/index.html','true',[ 
		['PAGE','1184',jdecode('Alternative+Dispute+Resolution'),jdecode(''),'/1175/1184.html','true',[],'',''],
		['PAGE','1193',jdecode('Bankruptcy'),jdecode(''),'/1175/1193.html','true',[],'',''],
		['PAGE','1202',jdecode('Business+Law'),jdecode(''),'/1175/1202.html','true',[],'',''],
		['PAGE','3365',jdecode('Employment+Law'),jdecode(''),'/1175/3365.html','true',[],'',''],
		['PAGE','1211',jdecode('Family+Law'),jdecode(''),'/1175/1211.html','true',[],'',''],
		['PAGE','1229',jdecode('International+Transactions'),jdecode(''),'/1175/1229.html','true',[],'',''],
		['PAGE','1238',jdecode('Literary+Agency'),jdecode(''),'/1175/1238.html','true',[],'',''],
		['PAGE','1247',jdecode('Litigation'),jdecode(''),'/1175/1247.html','true',[],'',''],
		['PAGE','1256',jdecode('Personal+Injury'),jdecode(''),'/1175/1256.html','true',[],'','']
	],'',''],
	['PAGE','1265',jdecode('Contact+us'),jdecode(''),'/1265/index.html','true',[ 
		['PAGE','1166',jdecode('How+to+find+us'),jdecode(''),'/1265/1166.html','true',[],'',''],
		['PAGE','1741',jdecode('Directions'),jdecode(''),'/1265/1741.html','true',[],'',''],
		['PAGE','1319',jdecode('Employment+Opp%26%23x27%3Bs%2FInternships'),jdecode(''),'/1265/1319.html','true',[],'','']
	],'',''],
	['PAGE','1292',jdecode('Press+Releases'),jdecode(''),'/1292.html','true',[],'',''],
	['PAGE','1301',jdecode('Links'),jdecode(''),'/1301.html','true',[],'',''],
	['PAGE','2175',jdecode('Visa%2FMC+Payments'),jdecode(''),'/2175.html','true',[],'',''],
	['PAGE','1310',jdecode('Disclaimer'),jdecode(''),'/1310.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='1347';
theSitetree.keyvisualName='buero.jpg';
theSitetree.fontsetId='232';
theSitetree.graphicsetId='294';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Startup',
				paletteFamily: 	'000000',
				keyvisualId: 	'1347',
				keyvisualName: 	'buero.jpg',
				fontsetId: 		'232',
				graphicsetId: 	'294',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '63',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20100120-145645'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '1741',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63',
internalId:  '',
customField: '20100122-195216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1148',
internalId:  '',
customField: '20100122-192651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1166',
internalId:  '',
customField: '20070712-052027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2904',
internalId:  '',
customField: '20100122-192505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1175',
internalId:  '',
customField: '20100122-192236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1184',
internalId:  '',
customField: '20100118-150412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1193',
internalId:  '',
customField: '20100118-150336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1202',
internalId:  '',
customField: '20100118-131943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3365',
internalId:  '',
customField: '20100118-132631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1211',
internalId:  '',
customField: '20100118-141246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1229',
internalId:  '',
customField: '20100118-150219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1238',
internalId:  '',
customField: '20100122-201003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1247',
internalId:  '',
customField: '20100118-150301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1256',
internalId:  '',
customField: '20100122-192413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1265',
internalId:  '',
customField: '20100122-194454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1292',
internalId:  '',
customField: '20100122-194656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1301',
internalId:  '',
customField: '20050715-131433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1319',
internalId:  '',
customField: '20100122-194626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1741',
internalId:  '',
customField: '20100122-194523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2175',
internalId:  '',
customField: '20071031-044234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1310',
internalId:  '',
customField: '20100122-194740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15022',
internalId:  '',
customField: '20100122-190626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20100629-143519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15822',
internalId:  '',
customField: '20100118-144414'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXEUG';
var companyName   = 'IN+PACTA+LAWYERS';
var htmlTitle	  = 'IN+PACTA+SEATTLE+LAWYER';
var metaKeywords  = 'seattle+lawyer%2C+seattle+business+lawyer%2C+seattle+personal+injury+lawyer%2C+personal+injury+attorney+seattle%2C+In+Pacta%2C+washington+litigation%2C+seattle+automobile+accident%2C+seattle+civil+litigation%2C+washington+appeals%2C+Noah+Davis%2C+James+Vasquez%2C+Asser+Aldana%2C+Seattle+family+law%2C+seattle+divorce+lawyer%2C+Marisa+Morgan';
var metaContents  = 'In+Pacta+is+a+commercial+and+personal+injury+minded+law+firm+based+in+Seattle+Washington+%28USA%29+with+lawyer+%28s%29+able+to+handle+a+broad+range+of+legal+issues+from+the+smallest+or+least+complex+to+the+largest+and+most+complex.++We+also+aim+to+be+affordable.++Call+or+email+us%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();
};
