/* [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','5401',jdecode('Home'),jdecode(''),'/5401.html','true',[],'',''],
	['PAGE','6001',jdecode('Areas+of+Practice'),jdecode(''),'/6001/index.html','true',[ 
		['PAGE','7601',jdecode('Business+Services'),jdecode(''),'/6001/7601.html','true',[],'',''],
		['PAGE','7622',jdecode('Estate+Planning%2C+Will%2C+%26+Probate+Services'),jdecode(''),'/6001/7622.html','true',[],'',''],
		['PAGE','7643',jdecode('Mediation+%26+Conflict+Resolution+Services'),jdecode(''),'/6001/7643.html','true',[],'','']
	],'',''],
	['PAGE','6022',jdecode('About+Us'),jdecode(''),'/6022.html','true',[],'',''],
	['PAGE','6043',jdecode('Resources'),jdecode(''),'/6043.html','true',[],'',''],
	['PAGE','6064',jdecode('Contact+Us'),jdecode(''),'/6064.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Trend';
theSitetree.paletteFamily='929192';
theSitetree.keyvisualId='7931';
theSitetree.keyvisualName='kv_7931.jpg';
theSitetree.fontsetId='16910';
theSitetree.graphicsetId='12327';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp19-dulles',
  product: 'WSCSYSSSSLYTCPII'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Trend',
				paletteFamily: 	'929192',
				keyvisualId: 	'7931',
				keyvisualName: 	'kv_7931.jpg',
				fontsetId: 		'16910',
				graphicsetId: 	'12327',
				contentColor: 	'000000',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20101216-141449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20101216-141741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7622',
internalId:  '',
customField: '20101216-130753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20101216-131004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7643',
internalId:  '',
customField: '20101216-133013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6022',
internalId:  '',
customField: '20101216-134729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6043',
internalId:  '',
customField: '20101216-134920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6064',
internalId:  '',
customField: '20101216-140548'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7KK8J';
var companyName   = 'Pollack+%26+Davis%2C+LLP';
var htmlTitle	  = 'Pollack+%26+Davis%2C+LLP';
var metaKeywords  = 'attorney%2C+attorneys%2C+berkeley%2C+california%2C+bay+area%2C+business%2C+law%2C+practice%2C+services%2C+estate+planning%2C+will%2C+probate%2C+mediation%2C+conflict+resolution%2C+pollack%2C+davis%2C+willet%2C+decaro%2C+real+estate+law%2C+leasing%2C+trusts%2C+development%2C+entitlement%2C+land+use%2C+corporate%2C+contract%2C+lawyer%2C+lawyers%2C+san+francisco%2C+east+bay%2C+find+lawyer%2C+lawyer+search%2C+san+francisco+lawyer%2C+bay+area+lawyer%2C+berkeley+lawyer%2C+california+lawyer%2C+conservation%2C+conservation+partners%2C+pollack+davis%2C+harry+pollack%2C+william+davis%2C+nancy+willet%2C+lara+decaro%2C+business+law%2C+will+law%2C+real+estate+law%2C+corporate+law%2C+college+of+marin%2C+probate+lawyer%2C+probate+attorney%2C+business+attorney%2C+real+estate+attorney%2C+corporate+attorney%2C+attorney+search%2C+state+bar%2C+conservation+attorney%2C+berkeley+attorney%2C+entitlement+attorney%2C+lease+attorney%2C+ca%2C+mediation+process%2C+mediation+class%2C+workplace%2C+workplace+conflict+resolution';
var metaContents  = 'Pollack+%26+Davis%2C+LLP%2C+attorneys+in+Berkeley%2C+California+offering+business%2C+estate+planning%2C+and+conflict+resolution+services.';
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();
};

