/* [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','4801',jdecode('Home'),jdecode(''),'/4801.html','true',[],'',''],
	['PAGE','8201',jdecode('Attorneys'),jdecode(''),'/8201.html','true',[],'',''],
	['PAGE','8222',jdecode('DUI+%26+Criminal+Charges'),jdecode(''),'/8222.html','true',[],'',''],
	['PAGE','8306',jdecode('Divorce%2C+Custody%2C+Support'),jdecode(''),'/8306.html','true',[],'',''],
	['PAGE','8243',jdecode('Wills+%26+Estates'),jdecode(''),'/8243.html','true',[],'',''],
	['PAGE','8264',jdecode('LLC+%26+Incorporation'),jdecode(''),'/8264.html','true',[],'',''],
	['PAGE','8285',jdecode('Civil+Cases'),jdecode(''),'/8285.html','true',[],'',''],
	['PAGE','37901',jdecode('Articles+on+Legal+Topics'),jdecode(''),'/37901.html','true',[],'',''],
	['PAGE','8327',jdecode('Contact+Us'),jdecode(''),'/8327.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Meta';
theSitetree.paletteFamily='C0824E';
theSitetree.keyvisualId='11304';
theSitetree.keyvisualName='kv_11304.jpg';
theSitetree.fontsetId='31993';
theSitetree.graphicsetId='13827';
theSitetree.contentColor='020202';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Meta',
				paletteFamily: 	'C0824E',
				keyvisualId: 	'11304',
				keyvisualName: 	'kv_11304.jpg',
				fontsetId: 		'31993',
				graphicsetId: 	'13827',
				contentColor: 	'020202',
				contentBGColor: 'FFFFFF',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20110517-152559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20110517-135841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8222',
internalId:  '',
customField: '20110517-135242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8243',
internalId:  '',
customField: '20110517-135612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8264',
internalId:  '',
customField: '20080621-074349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8285',
internalId:  '',
customField: '20110606-115156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8306',
internalId:  '',
customField: '20080621-074210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8327',
internalId:  '',
customField: '20100429-111436'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4801',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-5355']={
webappId:    '7008',
documentId:  '8327',
internalId:  '5355',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-9975788']={
webappId:    '1501',
documentId:  '4801',
internalId:  '9975788',
customField: '1501'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8327',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8285',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8264',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8243',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8306',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8222',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-21118']={
webappId:    '7050',
documentId:  '37901',
internalId:  '21118',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8201',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4801',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20110527-114453'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2SVM';
var companyName   = 'Lieberman+%26+Kohler%2C+LLP%2C++++Attorneys+at+Law++++West+Chester%2C+PA++%28610%29+430-3701';
var htmlTitle	  = 'Lieberman+%26+Kohler%2C+Lawyers%2C+West+Chester%2C+Chester+County%2C+Pennsylvania%2C+PA%2C+DUI%2C+DWI%2C+Custody%2C+Support%2C+Criminal%2C+Divorce%2C+Wills%2C+Business%2C+Coatesville%2C+Exton%2C+Paoli%2C+Kennett+Square%2C+Avondale%2C+Downingtown%2C+Honebrook%2C+Oxford';
var metaKeywords  = 'Lawyer%2C+Attorney%2C+legal%2C+Chester+County%2C+Pennsylvania%2C+DUI%2C+DWI%2C+Drunk+Driving%2C+Divorce%2C+Custody%2C+Support%2C+Wills%2C+Estate%2C+Guardianships%2C+Adoptions%2C+Power+of+Attorney%2C+LLC%2C+Corporation%2C+Criminal%2C+Traffic%2C+Speeding%2C+Business%2C+Family+Law%2C+PFA%2C+assault%2C+help%2C+Bryn+Mawr%2C+19010%2C+Chester%2C+19013%2C+19016%2C+Aston%2C19014%2C+Brookhaven%2C+19015%2C+Chester+Heights%2C+19017%2C+Clifton+Heights%2C+19018%2C+Crum+Lynne%2C+19022%2C+Darby%2C+19023%2C+Drexel+Hill%2C+19026%2C+Edgemont%2C+19028%2C+Essington%2C+19029%2C+Folcroft%2C+19032%2C+Folsom%2C+19033%2C+Glenolden%2C+19036%2C+Glen+Riddle%2C+Lima%2C+19037%2C+Gradyville%2C+19039%2C+Holmes%2C+19043%2C+Lansdowne%2C+19050%2C+Lenni%2C+19052%2C+Marcus+Hook%2C+19061%2C+Media%2C+19063%2C+19065%2C+19091%2C+Springfield%2C+19064%2C+Morton%2C+19070%2C+Newtown+Square%2C+19073%2C+Norwood%2C+19074%2C+Prospect+Park%2C+19076%2C+Ridley+Park%2C+19078%2C+Sharon+Hill%2C+19079%2C+Wayne%2C+Radnor%2C+19080%2C+19087%2C+19088%2C+19089%2C+Swarthmore%2C+19081%2C+Upper+Darby%2C+19082%2C+Havertown%2C+19083%2C+Villanova%2C+19085%2C+Wallingford%2C+19086%2C+Woodlyn%2C+19094%2C+Holmes%2C+19098%2C+Philadelphia%2C+19113%2C+19154%2C+19114%2C+19103%2C+19102%2C+Paoli%2C+19301%2C+Atglen%2C+19310%2C+Avondale%2C+19311%2C+Berwyn%2C+19312%2C+Brandamore%2C+19316%2C+Chadds+Ford%2C+19317%2C+Chatham%2C+19318%2C+Cheyney%2C+19319%2C+Coatesville%2C+19320%2C+Cochranville%2C+19330%2C+19331%2C+19339%2C+19340%2C+Devon%2C+19333%2C+Downingtown%2C+19335%2C+Exton%2C+19341%2C+Glen+Mills%2C+19342%2C+Glenmoore%2C+19343%2C+Honey+Brook%2C+19344%2C+Immaculata%2C+19345%2C+Kelton%2C+19346%2C+Kemblesville%2C+19347%2C+Kennett+Square%2C+19348%2C+Landenberg%2C+19350%2C+Lewisville%2C+19351%2C+Lincoln+University%2C+19352%2C+Lionville%2C+19353%2C+Lyndell%2C+19354%2C+Malvern%2C+19355%2C+Mendenhall%2C+19357%2C+Modena%2C+19358%2C+New+London%2C+19360%2C+Nottingham%2C+19362%2C+Oxford%2C+19363%2C+Parkesburg%2C+19365%2C+Pocopson%2C+19366%2C+Pomeroy%2C+19367%2C+Sadsburyville%2C+19369%2C+Suplee%2C+19371%2C+Thorndale%2C+19372%2C+Thornton%2C+19373%2C+Toughkenamon%2C+19374%2C+Unionville%2C+19375%2C+Wagontown%2C+19376%2C+West+Chester%2C+19380%2C+19381%2C+19382%2C+19383%2C+West+Grove%2C+19390%2C+Westtown%2C+19395%2C+Southeastern%2C+19397%2C+19398%2C+19399%2C+Birchrunville%2C+19421%2C+Chester+Springs%2C+19425%2C+Devault%2C+19432%2C+Kimberton%2C+19442%2C+Parker+Ford%2C+19457%2C+Phoenixville%2C+19460%2C+Pottstown%2C+19465%2C+Saint+Peters%2C+19470%2C+Spring+City%2C+19475%2C+Uwchland%2C+19480%2C+Valley+Forge%2C+19481%2C+19482%2C+19493%2C+19494+%2C19495%2C+19496%2C+King+of+Prussia%2C+19487%2C+Norristown%2C+19488%2C+19489%2C++Bally%2C+19503%2C+Barto%2C+19504%2C+Bechtelsville%2C+19505%2C+Bernville%2C+19506%2C+Bethel%2C+19507%2C+Birdsboro%2C+19508%2C+Blandon%2C+19510%2C+Bowers%2C+19511%2C+Boyertown%2C+19512%2C+Centerport%2C+19516%2C+Douglassville%2C+19518%2C+Earlville%2C+19519%2C+Elverson%2C+19520%2C+Fleetwood%2C+19522%2C+Geigertown%2C+19523%2C+Hamburg%2C+19526%2C+Kempton%2C+19529%2C+Kutztown%2C+19530%2C+Leesport%2C+19533%2C+Lenhartsville%2C+19534%2C+Limekiln%2C+19535%2C+Lyon+Station%2C+19536%2C+Maxatawny%2C+19538%2C+Mertztown%2C+19539%2C+Mohnton%2C+19540%2C+Mohrsville%2C+19541%2C+Monocacy+Station%2C+19542%2C+Morgantown%2C+19543%2C+Mount+Aetna%2C+19544%2C+New+Berlinville%2C+19545%2C+Oley%2C+19547%2C+Pine+Forge%2C+19548%2C+Rehrersburg%2C+19550%2C+Robesonia%2C+19551%2C+Shartlesville%2C+19554%2C+Shoemakersville%2C+19555%2C+Strausstown%2C+19559%2C+Temple+19560+Topton+19562+Virginville+19564+Wernersville+19565+Womelsdorf+19567+Reading+19601%2C+19602%2C+19603%2C+19604%2C+19605%2C+19606%2C+19607%2C+19608%2C+19609%2C+19610%2C+19611%2C++19612%2C+19640';
var metaContents  = 'Lawyers+located+in+West+Chester%2C+Pennsylvania%2C+serving+Chester%2C+Bucks%2C+Delaware%2C+Montgomery%2C+Berks+and+Lancaster+Counties.++Drunk+Driving%2C+DUI%2C+Divorce%2C+Criminal+Defense%2C+Wills%2C+Estates%2C+Custody%2C+Support%2C+Traffic+Tickets%2C+Guardianships%2C+Adoptions%2C+Incorportation+and+Business.';
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();
};

