/* [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','2301',jdecode('Home'),jdecode(''),'/2301.html','true',[],''],
	['PAGE','2352',jdecode('Family+Law'),jdecode(''),'/2352.html','true',[],''],
	['PAGE','17301',jdecode('Wills+Trusts+Estates'),jdecode(''),'/17301.html','true',[],''],
	['PAGE','17322',jdecode('Disability'),jdecode(''),'/17322.html','true',[],''],
	['PAGE','17343',jdecode('Practice+Areas'),jdecode(''),'/17343.html','true',[],''],
	['PAGE','2373',jdecode('Information'),jdecode(''),'/2373.html','true',[],''],
	['PAGE','11901',jdecode('How+to+find+us'),jdecode(''),'/11901.html','true',[],''],
	['PAGE','13101',jdecode('E-Mail'),jdecode(''),'/13101.html','true',[],''],
	['PAGE','38101',jdecode('Guestbook'),jdecode(''),'/38101.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Bigcity_NYC';
theSitetree.paletteFamily='303050';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17891';
theSitetree.graphicsetId='13161';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='303050';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Bigcity_NYC',
				paletteFamily: 	'303050',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17891',
				graphicsetId: 	'13161',
				contentColor: 	'FFFFFF',
				contentBGColor: '303050',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20090723-225402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20090309-051626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2352',
internalId:  '',
customField: '20090312-194905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2373',
internalId:  '',
customField: '20090524-122527'
};
webappMappings['1501']=webappMappings['1501-15509812']={
webappId:    '1501',
documentId:  '2301',
internalId:  '15509812',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2301',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20090619-170131'
};
webappMappings['7008']=webappMappings['7008-13577']={
webappId:    '7008',
documentId:  '13101',
internalId:  '13577',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2352',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2373',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '11901',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '13101',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '11901',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17343',
internalId:  '',
customField: '20090309-044317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17322',
internalId:  '',
customField: '20090720-021603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20090723-204517'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '17301',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '17322',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '17343',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38101',
internalId:  '',
customField: '20090515-102454'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '38101',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-38101aendu0inehgd']={
webappId:    '1002',
documentId:  '38101',
internalId:  '38101aendu0inehgd',
customField: 'icq=false'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INEHGD';
var companyName   = '';
var htmlTitle	  = 'Norfolk+Virginia+Divorce+Attorney+Custody+Lawyer+Wills+Trust++Long+Term+Disability+Attorney';
var metaKeywords  = 'Norfolk%2C+Virginia+Beach%2C+Chesapeake%2C+Portsmouth%2C+Suffolk%2C+hampton+roads%2C+tidewater%2C+yellow+page%2C++Attorney%2CLawyer%2C++Divorce%2C+Child+Custody%2C+Child+Support%2C+Divorce+lawyer%2CAttorney%2C+lawyer%2C++Norfolk+Virginia+divorce+lawyer%2C+divorce+attorney%2C+female+divorce+attorney+Norfolk%2C+++collaborative+law%2C+collaborative+practice%2C+collaborative+law+divorce%2C+attorney%2C+Virginia+attorney%2C+Virginia+lawyer%2C+female+attorney%2C+female+lawyer%2C+divorce%2C+divorce+attorney%2C+divorce+attorney+Virginia%2C+divorce+lawyer+Virginia%2C+Military+divorce%2C+Military+divorce+Virginia%2Cchild+custody%2C+child+support%2C+child+support+lawyer%2C+child+custody+attorney%2C+disability+%2C+social+security+disability%2C+Norfolk%2CVa%2C+Norfolk+Virginia+disability+lawyer%2C+disability+attorney+Norfolk+Va%2C+disability+insurance+attorney%2C+ERISA%2C+ERISA+insurance+lawyer%2C+wills%2CFamily+Law+Firm+Norfolk+VA%2C+find+divorce+attorney+Norfolk+va%2C+find+military+divorce+lawyer+norfolk+va%2C+find+lawyer+Norfolk+va%2C+Estate+Planning%2C+Norfolk+Virginia+Estate+Planning+Lawyer%2C+Probate+will%2C+probate+lawyer%2Cprobate%2C+norfolk+va+probate+lawyer%2C+living+will%2Cwills+trust%2C+estate+planning%2C+avoid+probate+virginia%2C+advance+medical+directives%2CVirginia+Norfolk+lawyer%2C+living+trust%2C+men+in+divorce%2C+women+in+divorce%2C+divorce+representation%2C+divorce+work%2C+law+firm%2C+separation+agreement%2C+separation%2C+separation+divorce+attorney%2C+divorce+separation+lawyer%2C+Norfolk+Virginia+separation+lawyer%2Cfree+consultations%2C+pre-nuptial+agreements%2Cliving+will%2C+powers+of+attorney%2C+medical+powers+of+attorney%2C+probate+in+Virginia%2C+active+duty+military+divorce+in+Virginia%2C+';
var metaContents  = 'Aggressive+Divorce++Representation+on+your+side+with+Susan+Donner+Divorce+Attorney.+Her+practices++in+Norfolk+VA%2C+has+served+the+Hampton+Roads+area+for+ten+years+now.+Susan++is+considered+one+of+the+areas+top+women+lawyers+and+is+a+Certified+Collaborative+Practice+Lawyer.+She+welcomes+the+military+as+well+as+civilians+and+is+sensitive+to+her+clients+needs+in+times+of+great+emotional+stress.+Divorce%2C+Separation++and+Child+custody+and+support+are+the+areas+of+her+practice+that+she+considers+to+be+her+areas+of+concentration.+She+is+a+gifted+negotiator+and+while+quiet+spoken+she+knows+how+to+win.+Susan+also+is+extremely+knowledgeable+in+preparing+Wills%2C+trusts+and+estate+planning+and+handles+disability+ERISA+and+Social+Security+disability.+She+offers+her+clients+both+free+consultations+and+payment+plans.+';
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();
};
