/* [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','11601',jdecode('Home'),jdecode(''), jdecode('%2F11601.html'), 'true',[],'',''],
	['PAGE','188701',jdecode('Real+Estate+Law'),jdecode(''), jdecode('%2F188701.html'), 'true',[],'',''],
	['PAGE','434401',jdecode('Bank%2FLender%2FSettlement'),jdecode(''), jdecode('%2F434401.html'), 'true',[],'',''],
	['PAGE','280501',jdecode('Landlord%2FTenant'),jdecode(''), jdecode('%2F280501%2Findex.html'), 'true',[ 
		['PAGE','405901',jdecode('Landlord+Representation'),jdecode(''), jdecode('%2F280501%2F405901.html'), 'true',[],'',''],
		['PAGE','405922',jdecode('Tenant+Representation'),jdecode(''), jdecode('%2F280501%2F405922.html'), 'true',[],'','']
	],'',''],
	['PAGE','187901',jdecode('Foreclosure+Services'),jdecode(''), jdecode('%2F187901%2Findex.html'), 'true',[ 
		['PAGE','435901',jdecode('Loan+Modifications+%26+Workouts'),jdecode(''), jdecode('%2F187901%2F435901.html'), 'true',[],'',''],
		['PAGE','436201',jdecode('Foreclosure+Defense'),jdecode(''), jdecode('%2F187901%2F436201.html'), 'true',[],'',''],
		['PAGE','436222',jdecode('Short+Sales'),jdecode(''), jdecode('%2F187901%2F436222.html'), 'true',[],'','']
	],'',''],
	['PAGE','280564',jdecode('Divorce%2FFamily+Law'),jdecode(''), jdecode('%2F280564.html'), 'true',[],'',''],
	['PAGE','521601',jdecode('Bankruptcy'),jdecode(''), jdecode('%2F521601.html'), 'true',[],'',''],
	['PAGE','435401',jdecode('Business+%26+Contracts'),jdecode(''), jdecode('%2F435401%2Findex.html'), 'true',[ 
		['PAGE','435001',jdecode('Corporations%2C+LLCs+%26+Entities'),jdecode(''), jdecode('%2F435401%2F435001.html'), 'true',[],'','']
	],'',''],
	['PAGE','280606',jdecode('Commercial+Litigation'),jdecode(''), jdecode('%2F280606%2Findex.html'), 'true',[ 
		['PAGE','280522',jdecode('Collections'),jdecode(''), jdecode('%2F280606%2F280522.html'), 'true',[],'',''],
		['PAGE','280585',jdecode('Wills+%26+Probate'),jdecode(''), jdecode('%2F280606%2F280585.html'), 'true',[],'','']
	],'',''],
	['PAGE','11652',jdecode('Additional+Practice+Areas'),jdecode(''), jdecode('%2F11652.html'), 'true',[],'',''],
	['PAGE','11673',jdecode('Disclaimer'),jdecode(''), jdecode('%2F11673.html'), 'true',[],'',''],
	['PAGE','96201',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F96201.html'), 'true',[],'',''],
	['PAGE','504101',jdecode('Interesting+links'),jdecode(''), jdecode('%2F504101.html'), 'true',[],'',''],
	['PAGE','96222',jdecode('Contact+Us'),jdecode(''), jdecode('%2F96222.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='364EB6';
theSitetree.keyvisualId='7111';
theSitetree.keyvisualName='kv_7111.jpg';
theSitetree.fontsetId='16394';
theSitetree.graphicsetId='12129';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'netfirms',
  product: 'WSCSYSSSSLY0XYNE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'364EB6',
				keyvisualId: 	'7111',
				keyvisualName: 	'kv_7111.jpg',
				fontsetId: 		'16394',
				graphicsetId: 	'12129',
				contentColor: 	'000000',
				contentBGColor: 'E5E2E2',
				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:  '11601',
internalId:  '',
customField: '20120202-015822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11652',
internalId:  '',
customField: '20120202-010157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11673',
internalId:  '',
customField: '20120202-010056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96222',
internalId:  '',
customField: '20120202-010344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96201',
internalId:  '',
customField: '20091127-035805'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '96201',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['7008']=webappMappings['7008-1753']={
webappId:    '7008',
documentId:  '96222',
internalId:  '1753',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '187901',
internalId:  '',
customField: '20120202-005609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '405901',
internalId:  '',
customField: '20100922-182951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188701',
internalId:  '',
customField: '20120202-005425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '280501',
internalId:  '',
customField: '20120202-005531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '280606',
internalId:  '',
customField: '20100923-171643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '280522',
internalId:  '',
customField: '20100920-184444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '280564',
internalId:  '',
customField: '20120202-005853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '280585',
internalId:  '',
customField: '20100925-115922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '521601',
internalId:  '',
customField: '20120128-233224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '435401',
internalId:  '',
customField: '20120202-005933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '435901',
internalId:  '',
customField: '20120202-005722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '405922',
internalId:  '',
customField: '20100922-182951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '434401',
internalId:  '',
customField: '20120202-005336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '435001',
internalId:  '',
customField: '20120202-005957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '436201',
internalId:  '',
customField: '20100923-164246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '436222',
internalId:  '',
customField: '20100924-185745'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '504101',
internalId:  '',
customField: '20100925-115603'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'ANFI10INX377';
var companyName   = 'ACKERMAN+%26+FELBER+LLP+++++Tel%3A+%28516%29+877-1500';
var htmlTitle	  = 'Ackerman+%26+Felber%2C+LLP+-+NY+Attorneys+and+Professionals+at+Law+';
var metaKeywords  = 'real+estate+lawyer+NY%2C+real+estate+attorney+NY%2C+foreclosure+prevention+NY%2C+foreclosure+defense+NY%2C+litigation+attorney+long+island+NY%2C+landlord%2Ftenant+attorney+Nassau+NY%2C+real+estate+syosset.';
var metaContents  = 'Ackerman++Felber%2C+LLP+-+NY+Attorneys+and+Professionals+at+Law.++Call+us+at+%28516%29+877-1500.%0D%0A%0D%0AReal+Estate%2C+Contracts%2C+Business%2C+Matrimonial+and+Litigation+Attorneys+-+Representing+Syosset%2C+Long+Island%2C+Queens%2C+Brooklyn%2C+Bronx%2C+Manhattan%2C+Westchester.';
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();
};

