/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('Legal+areas'),jdecode(''),'/552/index.html','true',[ 
		['PAGE','58101',jdecode('Adoption'),jdecode(''),'/552/58101.html','true',[],''],
		['PAGE','58901',jdecode('Annulment'),jdecode(''),'/552/58901.html','true',[],''],
		['PAGE','58164',jdecode('Custody'),jdecode(''),'/552/58164.html','true',[],''],
		['PAGE','58122',jdecode('Divorce'),jdecode(''),'/552/58122.html','true',[],''],
		['PAGE','58143',jdecode('Military+Divorce'),jdecode(''),'/552/58143.html','true',[],''],
		['PAGE','58922',jdecode('Separation'),jdecode(''),'/552/58922.html','true',[],'']
	],''],
	['PAGE','573',jdecode('Testimonials'),jdecode(''),'/573.html','true',[],''],
	['PAGE','594',jdecode('Judgments'),jdecode(''),'/594.html','true',[],''],
	['PAGE','657',jdecode('About+us'),jdecode(''),'/657.html','true',[],''],
	['PAGE','32501',jdecode('FAST%2C+AFFORDABLE+DIVORCE'),jdecode(''),'/32501.html','true',[],''],
	['PAGE','636',jdecode('Contact'),jdecode(''),'/636.html','true',[],''],
	['PAGE','6301',jdecode('Map'),jdecode(''),'/6301.html','true',[],''],
	['PAGE','741',jdecode('Library'),jdecode(''),'/741/index.html','true',[ 
		['PAGE','72901',jdecode('Our+Clients'),jdecode(''),'/741/72901.html','true',[],''],
		['PAGE','804',jdecode('FAQS+on+Annulment'),jdecode(''),'/741/804.html','true',[],''],
		['PAGE','762',jdecode('FAQs+on+Divorce'),jdecode(''),'/741/762.html','true',[],''],
		['PAGE','10401',jdecode('FAQs+on+Separation'),jdecode(''),'/741/10401.html','true',[],''],
		['PAGE','825',jdecode('FAQs+on+Custody'),jdecode(''),'/741/825.html','true',[],''],
		['PAGE','783',jdecode('FAQs+on+Adoption'),jdecode(''),'/741/783.html','true',[],''],
		['PAGE','37901',jdecode('FAQs+on+Pre-Nups'),jdecode(''),'/741/37901.html','true',[],''],
		['PAGE','49601',jdecode('FAQs+on+Elder+Fraud'),jdecode(''),'/741/49601.html','true',[],''],
		['PAGE','69101',jdecode('FAQs+on+Marriage+'),jdecode(''),'/741/69101.html','true',[],''],
		['PAGE','70101',jdecode('Before+You+Move+In...'),jdecode(''),'/741/70101.html','true',[],''],
		['PAGE','33601',jdecode('Christians+and+Divorce'),jdecode(''),'/741/33601.html','true',[],''],
		['PAGE','33622',jdecode('Peacemaking%3A+A+Model'),jdecode(''),'/741/33622.html','true',[],''],
		['PAGE','43422',jdecode('A+Lawyer%26%23x27%3Bs+Prayer'),jdecode(''),'/741/43422.html','true',[],''],
		['PAGE','43601',jdecode('A+Lawyer+Is...'),jdecode(''),'/741/43601.html','true',[],''],
		['PAGE','53001',jdecode('Prayers+'),jdecode(''),'/741/53001.html','true',[],'']
	],''],
	['PAGE','7222',jdecode('VA+Law+Talk+Newsletter'),jdecode(''),'/7222.html','true',[],''],
	['PAGE','42101',jdecode('News'),jdecode(''),'/42101.html','true',[],''],
	['PAGE','615',jdecode('Interesting+links'),jdecode(''),'/615.html','true',[],'']];
var siteelementCount=33;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1745';
theSitetree.keyvisualName='familie.jpg';
theSitetree.fontsetId='290';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1745',
				keyvisualName: 	'familie.jpg',
				fontsetId: 		'290',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1520038']={
webappId:    '1501',
documentId:  '501',
internalId:  '1520038',
customField: '1501'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '6301',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49601',
internalId:  '',
customField: '20090924-143108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33622',
internalId:  '',
customField: '20090924-143924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53001',
internalId:  '',
customField: '20090720-143330'
};
webappMappings['7008']=webappMappings['7008-71']={
webappId:    '7008',
documentId:  '636',
internalId:  '71',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58101',
internalId:  '',
customField: '20091123-103443'
};
webappMappings['7008']=webappMappings['7008-74']={
webappId:    '7008',
documentId:  '741',
internalId:  '74',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-75']={
webappId:    '7008',
documentId:  '7222',
internalId:  '75',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20090924-144330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33601',
internalId:  '',
customField: '20090924-143558'
};
webappMappings['7008']=webappMappings['7008-908']={
webappId:    '7008',
documentId:  '32501',
internalId:  '908',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100622-155253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20090723-163939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20091019-173034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20100720-105201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20091123-104243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20100415-135752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20091218-112608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20100622-155441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20090723-164049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20090721-175322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20090924-142010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '804',
internalId:  '',
customField: '20091221-111300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '825',
internalId:  '',
customField: '20090723-164143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20090723-164243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7222',
internalId:  '',
customField: '20090924-144032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43422',
internalId:  '',
customField: '20090720-143228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20100415-143119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43601',
internalId:  '',
customField: '20090402-094147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20091104-154534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58122',
internalId:  '',
customField: '20091123-103748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58143',
internalId:  '',
customField: '20091123-103825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58164',
internalId:  '',
customField: '20090713-174304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58901',
internalId:  '',
customField: '20090723-163417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58922',
internalId:  '',
customField: '20090723-163607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69101',
internalId:  '',
customField: '20091218-120116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70101',
internalId:  '',
customField: '20100112-161100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72901',
internalId:  '',
customField: '20091124-160242'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INXVA5';
var companyName   = 'Perry+Law+Group%2C+PC';
var htmlTitle	  = 'VA+Divorce+Attorneys%7C+Custody+Support+Adoption+Lawyers+%7CColonial+Heights+Hopewell+Chesterfield+Prince+George+Dinwiddie+';
var metaKeywords  = 'adoption%2C+divorce%2C+separation%2C+child+custody%2C+lawyer%2C+attorney%2C+military+divorce%2C+support%2C+wills%2C+annulment%2C+adoption%2C+family+law%2C+family+lawyer%2C+Colonial+Heights%2C+VA%2C+Petersburg%2C+Chesterfield+County%2C+Richmond%2C+Prince+George%2C+Dinwiddie+';
var metaContents  = 'divorce%2C+child+custody%2C+adoption%2C+annulment%2C+separation%2C+FAQs%2C++support%2C+wills%2C+powers+of+attorney%2C+free+reports%2C+free+newsletter%2C+experienced%2C+trials+and+judgments%2C+client+testimonials';
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();
};
