/* [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','2501',jdecode('Home'),jdecode(''), jdecode('%2F2501.html'), 'true',[],'',''],
	['PAGE','4501',jdecode('Disclosure+Statement'),jdecode(''), jdecode('%2F4501.html'), 'true',[],'',''],
	['PAGE','6101',jdecode('Newsletter'),jdecode(''), jdecode('%2F6101.html'), 'true',[],'',''],
	['PAGE','9701',jdecode('Latest+Article'),jdecode(''), jdecode('%2F9701.html'), 'true',[],'',''],
	['PAGE','7701',jdecode('Archived+Newsletters'),jdecode(''), jdecode('%2F7701%2Findex.html'), 'true',[ 
		['PAGE','10601',jdecode('May+2009'),jdecode(''), jdecode('%2F7701%2F10601.html'), 'true',[],'',''],
		['PAGE','10622',jdecode('June+2009'),jdecode(''), jdecode('%2F7701%2F10622.html'), 'true',[],'',''],
		['PAGE','10643',jdecode('January+2010'),jdecode(''), jdecode('%2F7701%2F10643.html'), 'true',[],'',''],
		['PAGE','11901',jdecode('February+2010'),jdecode(''), jdecode('%2F7701%2F11901.html'), 'true',[],'',''],
		['PAGE','12601',jdecode('May+2010'),jdecode(''), jdecode('%2F7701%2F12601.html'), 'true',[],'',''],
		['PAGE','13501',jdecode('July+2010'),jdecode(''), jdecode('%2F7701%2F13501.html'), 'true',[],'',''],
		['PAGE','14101',jdecode('October+2010'),jdecode(''), jdecode('%2F7701%2F14101.html'), 'true',[],'',''],
		['PAGE','15101',jdecode('January+2011'),jdecode(''), jdecode('%2F7701%2F15101.html'), 'true',[],'',''],
		['PAGE','18001',jdecode('April+2011'),jdecode(''), jdecode('%2F7701%2F18001.html'), 'true',[],'',''],
		['PAGE','18901',jdecode('September+2011'),jdecode(''), jdecode('%2F7701%2F18901.html'), 'true',[],'',''],
		['PAGE','20601',jdecode('October+2011'),jdecode(''), jdecode('%2F7701%2F20601.html'), 'true',[],'','']
	],'',''],
	['PAGE','3001',jdecode('Services'),jdecode(''), jdecode('%2F3001%2Findex.html'), 'true',[ 
		['PAGE','3022',jdecode('Investment+Advice'),jdecode(''), jdecode('%2F3001%2F3022.html'), 'true',[],'',''],
		['PAGE','3043',jdecode('Contributory+Mortgage+Analysis'),jdecode(''), jdecode('%2F3001%2F3043.html'), 'true',[],'',''],
		['PAGE','3064',jdecode('Investment+Portfolio+Reviews'),jdecode(''), jdecode('%2F3001%2F3064.html'), 'true',[],'',''],
		['PAGE','3085',jdecode('Business+Investment+Due+Diligence'),jdecode(''), jdecode('%2F3001%2F3085.html'), 'true',[],'',''],
		['PAGE','3106',jdecode('Property+Syndication+Advice'),jdecode(''), jdecode('%2F3001%2F3106.html'), 'true',[],'',''],
		['PAGE','3401',jdecode('Trustee+Investment+Advice'),jdecode(''), jdecode('%2F3001%2F3401.html'), 'true',[],'',''],
		['PAGE','4801',jdecode('Referral+Work+from+other+professionals'),jdecode(''), jdecode('%2F3001%2F4801.html'), 'true',[],'',''],
		['PAGE','4822',jdecode('Opinions+for+lay+trustees+on+investments'),jdecode(''), jdecode('%2F3001%2F4822.html'), 'true',[],'',''],
		['PAGE','4843',jdecode('Court+work+on+recovery+of+investments'),jdecode(''), jdecode('%2F3001%2F4843.html'), 'true',[],'',''],
		['PAGE','4864',jdecode('Personal+assistance+on+private+investments'),jdecode(''), jdecode('%2F3001%2F4864.html'), 'true',[],'',''],
		['PAGE','4885',jdecode('Corporate+and+Local+Body+investment+advice'),jdecode(''), jdecode('%2F3001%2F4885.html'), 'true',[],'','']
	],'',''],
	['PAGE','2657',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F2657.html'), 'true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Fields';
theSitetree.paletteFamily='FEFEFE';
theSitetree.keyvisualId='11085';
theSitetree.keyvisualName='kv_11085.jpg';
theSitetree.fontsetId='31970';
theSitetree.graphicsetId='13807';
theSitetree.contentColor='464D2F';
theSitetree.contentBGColor='FEFEFE';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'mitdnz',
  product: 'WSCSYSSSSLYTC22A'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Fields',
				paletteFamily: 	'FEFEFE',
				keyvisualId: 	'11085',
				keyvisualName: 	'kv_11085.jpg',
				fontsetId: 		'31970',
				graphicsetId: 	'13807',
				contentColor: 	'464D2F',
				contentBGColor: 'FEFEFE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20110704-224035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20090202-210905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3043',
internalId:  '',
customField: '20090201-235414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3064',
internalId:  '',
customField: '20090201-235414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3022',
internalId:  '',
customField: '20090201-235414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2657',
internalId:  '',
customField: '20090528-003514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3085',
internalId:  '',
customField: '20090201-235414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3106',
internalId:  '',
customField: '20090201-235414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20090202-185447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20110703-222746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20090202-215302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4822',
internalId:  '',
customField: '20090202-215302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4843',
internalId:  '',
customField: '20090202-215302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4864',
internalId:  '',
customField: '20090202-215302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4885',
internalId:  '',
customField: '20090202-215302'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20111017-205907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7701',
internalId:  '',
customField: '20100519-210857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20111127-203817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20100308-201835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10622',
internalId:  '',
customField: '20100308-202040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10643',
internalId:  '',
customField: '20100308-202740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20100519-210045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100705-225912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20101027-203414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14101',
internalId:  '',
customField: '20110201-215041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20110602-211010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20110718-230615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18901',
internalId:  '',
customField: '20111017-210038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20111212-195721'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INPFUI';
var companyName   = 'Financial+Navigation';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

