/* [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','1901',jdecode('Home'),jdecode(''), jdecode('%2F1901.html'), 'true',[],'',''],
	['PAGE','1952',jdecode('Biographical'),jdecode(''), jdecode('%2F1952.html'), 'true',[],'',''],
	['PAGE','1973',jdecode('Contact+Us'),jdecode(''), jdecode('%2F1973.html'), 'true',[],'',''],
	['PAGE','1994',jdecode('Types+of+Bankruptcy'),jdecode(''), jdecode('%2F1994%2Findex.html'), 'true',[ 
		['PAGE','2015',jdecode('Chapter+7'),jdecode(''), jdecode('%2F1994%2F2015.html'), 'true',[],'',''],
		['PAGE','2036',jdecode('Chapter+11'),jdecode(''), jdecode('%2F1994%2F2036.html'), 'true',[],'',''],
		['PAGE','2057',jdecode('Chapter+12'),jdecode(''), jdecode('%2F1994%2F2057.html'), 'true',[],'',''],
		['PAGE','2078',jdecode('Chapter+13'),jdecode(''), jdecode('%2F1994%2F2078.html'), 'true',[],'','']
	],'',''],
	['PAGE','2099',jdecode('Areas+of+Concern'),jdecode(''), jdecode('%2F2099%2Findex.html'), 'true',[ 
		['PAGE','2120',jdecode('Business+Debt'),jdecode(''), jdecode('%2F2099%2F2120.html'), 'true',[],'',''],
		['PAGE','2141',jdecode('Farm+and+Ranch+Debt'),jdecode(''), jdecode('%2F2099%2F2141.html'), 'true',[],'',''],
		['PAGE','2162',jdecode('Keeping+Property'),jdecode(''), jdecode('%2F2099%2F2162.html'), 'true',[],'',''],
		['PAGE','15901',jdecode('Means+Testing'),jdecode(''), jdecode('%2F2099%2F15901.html'), 'true',[],'',''],
		['PAGE','2183',jdecode('Mortgages'),jdecode(''), jdecode('%2F2099%2F2183.html'), 'true',[],'',''],
		['PAGE','5601',jdecode('Seniors'),jdecode(''), jdecode('%2F2099%2F5601.html'), 'true',[],'',''],
		['PAGE','2204',jdecode('Tax+Debt'),jdecode(''), jdecode('%2F2099%2F2204.html'), 'true',[],'',''],
		['PAGE','5622',jdecode('Vehicles'),jdecode(''), jdecode('%2F2099%2F5622.html'), 'true',[],'','']
	],'',''],
	['PAGE','7001',jdecode('EN+ESPA%C3%91OL'),jdecode(''), jdecode('%2F7001%2Findex.html'), 'true',[ 
		['PAGE','15922',jdecode('BIOGR%C3%81FICO'),jdecode(''), jdecode('%2F7001%2F15922.html'), 'true',[],'',''],
		['PAGE','15943',jdecode('PARA+CONTACTARNOS'),jdecode(''), jdecode('%2F7001%2F15943.html'), 'true',[],'',''],
		['PAGE','15964',jdecode('CAP%C3%8DTULO+7'),jdecode(''), jdecode('%2F7001%2F15964.html'), 'true',[],'',''],
		['PAGE','15985',jdecode('CAP%C3%8DTULO+11'),jdecode(''), jdecode('%2F7001%2F15985.html'), 'true',[],'',''],
		['PAGE','16006',jdecode('CAP%C3%8DTULO+12'),jdecode(''), jdecode('%2F7001%2F16006.html'), 'true',[],'',''],
		['PAGE','16027',jdecode('CAP%C3%8DTULO+13'),jdecode(''), jdecode('%2F7001%2F16027.html'), 'true',[],'','']
	],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Toronto';
theSitetree.paletteFamily='94824B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16883';
theSitetree.graphicsetId='12319';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='94824B';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Toronto',
				paletteFamily: 	'94824B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16883',
				graphicsetId: 	'12319',
				contentColor: 	'FFFFFF',
				contentBGColor: '94824B',
				a_color: 		'94824B',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20110222-182211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1952',
internalId:  '',
customField: '20110222-183457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1973',
internalId:  '',
customField: '20110221-164434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1994',
internalId:  '',
customField: '20110207-180519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2099',
internalId:  '',
customField: '20110207-185548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2015',
internalId:  '',
customField: '20110221-184638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2036',
internalId:  '',
customField: '20110221-165044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2057',
internalId:  '',
customField: '20110209-135357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2078',
internalId:  '',
customField: '20110221-184849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2120',
internalId:  '',
customField: '20110209-143802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5622',
internalId:  '',
customField: '20110209-144816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20110207-191226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2141',
internalId:  '',
customField: '20110208-211547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2162',
internalId:  '',
customField: '20110221-171024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2183',
internalId:  '',
customField: '20110207-191645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2204',
internalId:  '',
customField: '20110208-221054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20110222-183056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15922',
internalId:  '',
customField: '20110222-184123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15943',
internalId:  '',
customField: '20110215-212230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15964',
internalId:  '',
customField: '20110221-144051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15985',
internalId:  '',
customField: '20110221-144320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16006',
internalId:  '',
customField: '20110215-224206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16027',
internalId:  '',
customField: '20110221-141547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20110221-184429'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I71L4G';
var companyName   = 'Law+Office+of+David+Fillerup++Bankruptcy+Services';
var htmlTitle	  = 'David+Fillerup+Bankruptcy+Attorney+Chico+California';
var metaKeywords  = 'bankruptcy+attorney++++++++bankruptcy++++++++bankruptcy+reorganization++++++++bankruptcy+liquidation++++++++bankruptcy+chapters++++++++chapter+7++++++++discharge+of+debt++++++++chapter+11++++++++busniess+reorgainzation++++++++chapter+12++++++++farm+and+ranch+reorganization++++++++chapter+13++++++++personal+and+business+reorganization++++++++save+your+home++++++++save+your+car++++++++save+your+business++++++++discharge+taxes++++++++strip+off+second+mortages++++++++value+automobiles++++++++means+testing++++++++exemptions++++++++keeping+property+in+bankruptcy++++++++payment+plan++++++++debt+relief++++++++discharge+or+get+rid+of+credit+cards++++++++discharge+or+get+rid+of+judgments++++++++discharge+or+get+rid+of+medical+debt++++++++get+rid+of+taxes';
var metaContents  = 'Debt+Relief+-+Worry+Relief%3A+Chapter+7+Debt+Relief%3B+Save+Your+Home%2C+Save+Your+Car%2C+Save+Your+Business%3A+Chapter+13+Payment+Plan%3B+Family+Farmer+Reorganization%3A+Chapter+12+Payment+Plan%3B+Business+Reorganization%3A+Chapter+11+Payment+Plan.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++';
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();
};

