/* [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','801',jdecode('Home'),jdecode(''),'/801.html','true',[],''],
	['PAGE','852',jdecode('About+Us'),jdecode(''),'/852.html','true',[],''],
	['PAGE','894',jdecode('Probate'),jdecode(''),'/894.html','true',[],''],
	['PAGE','27216',jdecode('Intestate+Administration'),jdecode(''),'/27216.html','true',[],''],
	['PAGE','915',jdecode('Estate+Taxes'),jdecode(''),'/915.html','true',[],''],
	['PAGE','27225',jdecode('Small+Estate+Settlement'),jdecode(''),'/27225.html','true',[],''],
	['PAGE','936',jdecode('Proving+Kinship'),jdecode(''),'/936.html','true',[],''],
	['PAGE','20522',jdecode('Surrogate%26%23x27%3Bs+Courts'),jdecode(''),'/20522.html','true',[],''],
	['PAGE','20543',jdecode('Public+Administrators'),jdecode(''),'/20543.html','true',[],''],
	['PAGE','27234',jdecode('Free+Court+Forms'),jdecode(''),'/27234.html','true',[],''],
	['PAGE','27243',jdecode('Links+to+Estate+Info'),jdecode(''),'/27243.html','true',[],''],
	['PAGE','957',jdecode('Contact+Us'),jdecode(''),'/957/index.html','true',[ 
		['PAGE','11701',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/957/11701.html','false',[],'']
	],''],
	['PAGE','26910',jdecode('Map'),jdecode(''),'/26910.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Basic';
theSitetree.paletteFamily='823333';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10829';
theSitetree.graphicsetId='11284';
theSitetree.contentColor='823333';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Basic',
				paletteFamily: 	'823333',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10829',
				graphicsetId: 	'11284',
				contentColor: 	'823333',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1001']=webappMappings['1001-ahw050inek2449ddb2789a55ad2b']={
webappId:    '1001',
documentId:  '957',
internalId:  'ahw050inek2449ddb2789a55ad2b',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inek2449ddb2789a55ad2b']={
webappId:    '1001',
documentId:  '11701',
internalId:  'ahw050inek2449ddb2789a55ad2b',
customField: 'followUp'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '26910',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20081111-150340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27216',
internalId:  '',
customField: '20081113-130007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20080930-133753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20081111-150406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '915',
internalId:  '',
customField: '20081113-130220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '936',
internalId:  '',
customField: '20081111-153623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20522',
internalId:  '',
customField: '20080930-134109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20543',
internalId:  '',
customField: '20070405-172402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27225',
internalId:  '',
customField: '20081113-101644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27234',
internalId:  '',
customField: '20080930-134137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27243',
internalId:  '',
customField: '20081111-152113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '957',
internalId:  '',
customField: '20080930-134153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20070404-131855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26910',
internalId:  '',
customField: '20080926-144308'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INEK24';
var companyName   = '+++++Effective+%26+Experienced+Legal+Representation';
var htmlTitle	  = 'Trust%2C+Estate+and+Probate+Attorney+-+Rudolf+J.+Karvay';
var metaKeywords  = 'Estate%2C+Wills%2C+Probate%2C+Trust%2C+Estate+Planning%2C+Lawyer%2C+Attorney%2C+Estate+Tax%2C+Income+Tax%2C+Administration%2C+Surrogates+Court%2C+Public+Administrator+of+Kings+County%2C+Public+Administrator+of+Queens+County%2C+Administration%2C+Accounting%2C+Kinship+Hearings%2C+Heirship%2C+Contested+Probate%2C+Estate+Litigation%2C+Genealogy%2C+Family+Tree';
var metaContents  = 'Experienced+New+York+Trust++Estate+Attorney+-+Rudolf+J.+Karvay';
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();
};

