/* [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','4301',jdecode('Home'),jdecode(''), jdecode('%2F4301.html'), 'true',[],'',''],
	['PAGE','15701',jdecode('About+Us'),jdecode(''), jdecode('%2F15701%2Findex.html'), 'true',[ 
		['PAGE','40648',jdecode('Board+Members'),jdecode(''), jdecode('%2F15701%2F40648.html'), 'true',[],'','']
	],'',''],
	['PAGE','96548',jdecode('Chapters'),jdecode(''), jdecode('%2F96548.html'), 'true',[],'',''],
	['PAGE','5401',jdecode('Capital+Area'),jdecode(''), jdecode('%2F5401.html'), 'true',[],'',''],
	['PAGE','5422',jdecode('Central+Virginia'),jdecode(''), jdecode('%2F5422.html'), 'true',[],'',''],
	['PAGE','5443',jdecode('Hampton+Roads'),jdecode(''), jdecode('%2F5443.html'), 'true',[],'',''],
	['PAGE','4394',jdecode('Northern+VA'),jdecode(''), jdecode('%2F4394%2Findex.html'), 'true',[ 
		['PAGE','99348',jdecode('Newsletter'),jdecode(''), jdecode('%2F4394%2F99348.html'), 'true',[],'','']
	],'',''],
	['PAGE','4415',jdecode('Piedmont'),jdecode(''), jdecode('%2F4415.html'), 'true',[],'',''],
	['PAGE','29111',jdecode('Conferences'),jdecode(''), jdecode('%2F29111%2Findex.html'), 'true',[ 
		['PAGE','97648',jdecode('2012+State+Conference+'),jdecode(''), jdecode('%2F29111%2F97648.html'), 'true',[],'',''],
		['PAGE','99369',jdecode('National+Conference'),jdecode(''), jdecode('%2F29111%2F99369.html'), 'true',[],'','']
	],'',''],
	['PAGE','24601',jdecode('Members'),jdecode(''), jdecode('%2F24601%2Findex.html'), 'true',[ 
		['PAGE','5201',jdecode('Education'),jdecode(''), jdecode('%2F24601%2F5201.html'), 'true',[],'',''],
		['PAGE','66548',jdecode('Job+Postings'),jdecode(''), jdecode('%2F24601%2F66548.html'), 'true',[],'','']
	],'',''],
	['PAGE','29174',jdecode('Membership'),jdecode(''), jdecode('%2F29174.html'), 'true',[],'',''],
	['PAGE','29195',jdecode('Guestbook'),jdecode(''), jdecode('%2F29195.html'), 'true',[],'',''],
	['PAGE','38348',jdecode('Forum'),jdecode(''), jdecode('%2F38348.html'), 'true',[],'',''],
	['PAGE','99390',jdecode('Blog'),jdecode(''), jdecode('%2F99390.html'), 'true',[],'',''],
	['PAGE','97048',jdecode('Your+Vote'),jdecode(''), jdecode('%2F97048.html'), 'true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Rectangle';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='2517';
theSitetree.keyvisualName='maler.jpg';
theSitetree.fontsetId='451';
theSitetree.graphicsetId='506';
theSitetree.contentColor='033568';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Rectangle',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'2517',
				keyvisualName: 	'maler.jpg',
				fontsetId: 		'451',
				graphicsetId: 	'506',
				contentColor: 	'033568',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20120201-191853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20120202-154128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66548',
internalId:  '',
customField: '20120202-154134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4394',
internalId:  '',
customField: '20080715-112223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4415',
internalId:  '',
customField: '20090220-105607'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20120202-130419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20110814-152549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5422',
internalId:  '',
customField: '20110824-191141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5443',
internalId:  '',
customField: '20111015-151833'
};
webappMappings['7005']=webappMappings['7005-288']={
webappId:    '7005',
documentId:  '97048',
internalId:  '288',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20120202-153755'
};
webappMappings['7050']=webappMappings['7050-5157']={
webappId:    '7050',
documentId:  '99390',
internalId:  '5157',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96548',
internalId:  '',
customField: '20120201-191433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38348',
internalId:  '',
customField: '20090213-094738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40648',
internalId:  '',
customField: '20110814-150848'
};
webappMappings['1002']=webappMappings['1002-29195aendu0in2z15']={
webappId:    '1002',
documentId:  '29195',
internalId:  '29195aendu0in2z15',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99348',
internalId:  '',
customField: '20120203-152544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97048',
internalId:  '',
customField: '20120202-113553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97648',
internalId:  '',
customField: '20120202-130050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29111',
internalId:  '',
customField: '20120202-125357'
};
webappMappings['1003']=webappMappings['1003-aendu0in2z1511f7015b00e']={
webappId:    '1003',
documentId:  '38348',
internalId:  'aendu0in2z1511f7015b00e',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29174',
internalId:  '',
customField: '20100824-113842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29195',
internalId:  '',
customField: '20090814-142502'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2Z15';
var companyName   = '++++++++++++++++++++++++V++S++A++O++H++N+';
var htmlTitle	  = 'VSAOHN';
var metaKeywords  = '';
var metaContents  = 'VSAOHN';
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();
};

