/* [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','2001',jdecode('Home'),jdecode(''), jdecode('%2F2001.html'), 'true',[],'',''],
	['PAGE','2052',jdecode('About+Us'),jdecode(''), jdecode('%2F2052.html'), 'true',[],'',''],
	['PAGE','2073',jdecode('Our+Programs'),jdecode(''), jdecode('%2F2073%2Findex.html'), 'true',[ 
		['PAGE','2094',jdecode('Tax+Payers'),jdecode(''), jdecode('%2F2073%2F2094.html'), 'true',[],'',''],
		['PAGE','2115',jdecode('Medical+Practitioners'),jdecode(''), jdecode('%2F2073%2F2115.html'), 'true',[],'',''],
		['PAGE','2136',jdecode('1st+and+14th+Amendment'),jdecode(''), jdecode('%2F2073%2F2136.html'), 'true',[],'',''],
		['PAGE','2157',jdecode('Texas+Joint-Stock+Companies'),jdecode(''), jdecode('%2F2073%2F2157.html'), 'true',[],'',''],
		['PAGE','2199',jdecode('Charitable+Remainder+Trust'),jdecode(''), jdecode('%2F2073%2F2199.html'), 'true',[],'',''],
		['PAGE','2220',jdecode('Foreign+Joint-Stock+Companies'),jdecode(''), jdecode('%2F2073%2F2220.html'), 'true',[],'',''],
		['PAGE','2241',jdecode('Criminal'),jdecode(''), jdecode('%2F2073%2F2241.html'), 'true',[],'',''],
		['PAGE','2262',jdecode('Pro-Se+Litigation'),jdecode(''), jdecode('%2F2073%2F2262.html'), 'true',[],'',''],
		['PAGE','2283',jdecode('Pro-Se+Litigation+with+Super+Appeal'),jdecode(''), jdecode('%2F2073%2F2283.html'), 'true',[],'',''],
		['PAGE','2304',jdecode('Title+42+Civil+and+Constitutional+Rights+Lawsuit'),jdecode(''), jdecode('%2F2073%2F2304.html'), 'true',[],'',''],
		['PAGE','25201',jdecode('General+Partnership+%2F+Texas+Revocable+Living+Trust'),jdecode(''), jdecode('%2F2073%2F25201.html'), 'true',[],'','']
	],'',''],
	['PAGE','2346',jdecode('Seminars'),jdecode(''), jdecode('%2F2346.html'), 'true',[],'',''],
	['PAGE','23001',jdecode('Contact+Us'),jdecode(''), jdecode('%2F23001.html'), 'true',[],'',''],
	['PAGE','46701',jdecode('Request+Information'),jdecode(''), jdecode('%2F46701.html'), 'true',[],'',''],
	['PAGE','26101',jdecode('Weather'),jdecode(''), jdecode('%2F26101.html'), 'true',[],'',''],
	['PAGE','26701',jdecode('Hotels'),jdecode(''), jdecode('%2F26701.html'), 'true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Disco';
theSitetree.paletteFamily='3D5465';
theSitetree.keyvisualId='1873';
theSitetree.keyvisualName='business.jpg';
theSitetree.fontsetId='307';
theSitetree.graphicsetId='364';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3D5465';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp13-cbeyon',
  product: 'WSCSYSSSSLYTC2ZA'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Disco',
				paletteFamily: 	'3D5465',
				keyvisualId: 	'1873',
				keyvisualName: 	'business.jpg',
				fontsetId: 		'307',
				graphicsetId: 	'364',
				contentColor: 	'FFFFFF',
				contentBGColor: '3D5465',
				a_color: 		'3D5465',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20101129-163642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2052',
internalId:  '',
customField: '20100401-160112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2073',
internalId:  '',
customField: '20100427-121830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2094',
internalId:  '',
customField: '20101129-153325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2346',
internalId:  '',
customField: '20100427-134313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2115',
internalId:  '',
customField: '20101228-161240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2136',
internalId:  '',
customField: '20101228-160619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2157',
internalId:  '',
customField: '20101202-125742'
};
webappMappings['7080']=webappMappings['7080-808']={
webappId:    '7080',
documentId:  '26101',
internalId:  '808',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2199',
internalId:  '',
customField: '20101207-155751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2220',
internalId:  '',
customField: '20101129-170617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2241',
internalId:  '',
customField: '20101215-131110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2262',
internalId:  '',
customField: '20101129-165518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2283',
internalId:  '',
customField: '20101122-154300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2304',
internalId:  '',
customField: '20100426-144900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25201',
internalId:  '',
customField: '20101129-173750'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-15202296']={
webappId:    '1501',
documentId:  '2001',
internalId:  '15202296',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20100427-135510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20111205-171359'
};
webappMappings['7008']=webappMappings['7008-28101']={
webappId:    '7008',
documentId:  '46701',
internalId:  '28101',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26701',
internalId:  '',
customField: '20100427-153438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46701',
internalId:  '',
customField: '20111205-145915'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CGSE';
var companyName   = 'ProAdvocate+Group';
var htmlTitle	  = 'ProAdvocate+Group';
var metaKeywords  = 'tax+resolution%2Cback+taxes%2Clitigation%2Clegal+help%2Casset+protection%2Cholistic%2Cjudgement+proofing%2Ctax+payer%2Ccriminal+appeal%2Ctexas+joint+stock+company%2Ccivil+rights%2Cconstitutional+rights%2Crevocable%2Cirrevocable+trust%2Ccriminal+reversal';
var metaContents  = 'An+Alternative+to+Excessive+Legal+Fees.+%22+In+a+government+of+laws%2C+the+existence+of+the+government+will+be+imperiled+if+it+fails+to+observe+the+law+scrupulously.+Our+government+is+the+potent%2C+the+omnipresent+teacher.+For+good+or+for+ill%2C+it+teaches+the+whole+people+by+its+example.+Crime+is+contagious.+If+the+government+becomes+a+lawbreaker%2C+it+breeds+contempt+for+law%3B+it+invites+every+man+to+become+a+law+unto+himself%3B+it+invites+anarchy.%22+Olmstead+v.+U.S.%2C+277+U.S.+438+%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A';
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();
};

