/* [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 theSitetree=[ 
	['PAGE','4301',jdecode('Home'),jdecode(''),'/4301/index.html','true',[ 
		['PAGE','38348',jdecode('Forum'),jdecode(''),'/4301/38348.html','true',[],''],
		['PAGE','29195',jdecode('Guestbook'),jdecode(''),'/4301/29195.html','true',[],'']
	],''],
	['PAGE','15701',jdecode('About+Us'),jdecode(''),'/15701/index.html','true',[ 
		['PAGE','40648',jdecode('Board+Members'),jdecode(''),'/15701/40648.html','true',[],'']
	],''],
	['PAGE','24601',jdecode('Members+'),jdecode(''),'/24601/index.html','true',[ 
		['PAGE','57048',jdecode('Annoucements'),jdecode(''),'/24601/57048.html','true',[],''],
		['PAGE','5201',jdecode('Education'),jdecode(''),'/24601/5201.html','true',[],''],
		['PAGE','66548',jdecode('Job+Postings'),jdecode(''),'/24601/66548.html','true',[],'']
	],''],
	['PAGE','29174',jdecode('Membership'),jdecode(''),'/29174/index.html','true',[ 
		['PAGE','5401',jdecode('Capital+Area'),jdecode(''),'/29174/5401.html','true',[],''],
		['PAGE','5422',jdecode('Central+Virginia'),jdecode(''),'/29174/5422.html','true',[],''],
		['PAGE','5443',jdecode('Hampton+Roads'),jdecode(''),'/29174/5443.html','true',[],''],
		['PAGE','4394',jdecode('Northern+VA'),jdecode(''),'/29174/4394.html','true',[],''],
		['PAGE','4415',jdecode('Piedmont'),jdecode(''),'/29174/4415.html','true',[],'']
	],''],
	['PAGE','29111',jdecode('Conferences'),jdecode(''),'/29111.html','true',[],''],
	['PAGE','29069',jdecode('News'),jdecode(''),'/29069/index.html','true',[ 
		['PAGE','36648',jdecode('Governmental+Affairs'),jdecode(''),'/29069/36648.html','true',[],'']
	],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Shield';
theSitetree.paletteFamily='D5D5F6';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10415';
theSitetree.graphicsetId='10686';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D5D5F6';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Shield',
				paletteFamily: 	'D5D5F6',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10415',
				graphicsetId: 	'10686',
				contentColor: 	'000000',
				contentBGColor: 'D5D5F6',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'F30606',
				e_color: 		'6969FA',
				f_color: 		'7F7E7E',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20100120-215123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100120-215255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66548',
internalId:  '',
customField: '20100127-225419'
};
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: '20100120-213545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20100127-220936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5422',
internalId:  '',
customField: '20090814-210938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5443',
internalId:  '',
customField: '20090128-212638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20100127-215704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57048',
internalId:  '',
customField: '20100120-204856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38348',
internalId:  '',
customField: '20090213-094738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40648',
internalId:  '',
customField: '20100127-224814'
};
webappMappings['1002']=webappMappings['1002-29195aendu0in2z15']={
webappId:    '1002',
documentId:  '29195',
internalId:  '29195aendu0in2z15',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29069',
internalId:  '',
customField: '20100120-213615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36648',
internalId:  '',
customField: '20100127-214441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29111',
internalId:  '',
customField: '20100127-231745'
};
webappMappings['1003']=webappMappings['1003-aendu0in2z1511f7015b00e']={
webappId:    '1003',
documentId:  '38348',
internalId:  'aendu0in2z1511f7015b00e',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29174',
internalId:  '',
customField: '20100120-204001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29195',
internalId:  '',
customField: '20090814-142502'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2Z15';
var companyName   = 'V+S+A+O+H+N';
var htmlTitle	  = '';
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();
};
