/* [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','1601',jdecode('Home'),jdecode(''),'/1601.html','true',[],''],
	['PAGE','33001',jdecode('Continuing+Education'),jdecode(''),'/33001.html','true',[],''],
	['PAGE','1652',jdecode('Founding'),jdecode(''),'/1652/index.html','true',[ 
		['PAGE','1673',jdecode('Home+of+the+Club'),jdecode(''),'/1652/1673.html','true',[],'']
	],''],
	['PAGE','1736',jdecode('Contact'),jdecode(''),'/1736.html','true',[],''],
	['PAGE','1883',jdecode('Board+of+Directors'),jdecode(''),'/1883.html','true',[],''],
	['PAGE','49801',jdecode('Scholarships'),jdecode(''),'/49801.html','true',[],''],
	['PAGE','1799',jdecode('News'),jdecode(''),'/1799/index.html','true',[ 
		['PAGE','1820',jdecode('Calendar+of+Events'),jdecode(''),'/1799/1820.html','true',[],'']
	],''],
	['PAGE','1841',jdecode('Members'),jdecode(''),'/1841.html','true',[],''],
	['PAGE','32001',jdecode('Golf+outing+2009'),jdecode(''),'/32001.html','true',[],''],
	['PAGE','41501',jdecode('Clambake+2009'),jdecode(''),'/41501.html','true',[],''],
	['PAGE','1946',jdecode('Join'),jdecode(''),'/1946.html','true',[],''],
	['PAGE','12201',jdecode('Tips+%26+Tricks'),jdecode(''),'/12201.html','true',[],''],
	['PAGE','7306',jdecode('Guestbook'),jdecode(''),'/7306/index.html','true',[ 
		['PAGE','7301',jdecode('Read+Guestbook'),jdecode(''),'/7306/7301.html','false',[],'']
	],''],
	['PAGE','43201',jdecode('old+timers'),jdecode(''),'/43201.html','true',[],''],
	['PAGE','50001',jdecode('Summer+Send+off+Deck+party+2009'),jdecode(''),'/50001.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Ornaments';
theSitetree.paletteFamily='606ED4';
theSitetree.keyvisualId='3890';
theSitetree.keyvisualName='kv_3890.jpg';
theSitetree.fontsetId='10493';
theSitetree.graphicsetId='11073';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Ornaments',
				paletteFamily: 	'606ED4',
				keyvisualId: 	'3890',
				keyvisualName: 	'kv_3890.jpg',
				fontsetId: 		'10493',
				graphicsetId: 	'11073',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'887248',
				e_color: 		'887248',
				f_color: 		'887248',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-11139211']={
webappId:    '1501',
documentId:  '1601',
internalId:  '11139211',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-7306avec10inp021']={
webappId:    '1002',
documentId:  '7306',
internalId:  '7306avec10inp021',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-6b2aa4105a77deb13090a8e950aa80b1']={
webappId:    '7060',
documentId:  '32001',
internalId:  '6b2aa4105a77deb13090a8e950aa80b1',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-c7e17f5e5fe84fcfdbd3c242a510fcca']={
webappId:    '7060',
documentId:  '43201',
internalId:  'c7e17f5e5fe84fcfdbd3c242a510fcca',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20090719-172543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33001',
internalId:  '',
customField: '20090719-182232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1652',
internalId:  '',
customField: '20080922-184934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1673',
internalId:  '',
customField: '20080922-185214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1736',
internalId:  '',
customField: '20080813-190248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1883',
internalId:  '',
customField: '20090512-194213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1799',
internalId:  '',
customField: '20080914-135438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1820',
internalId:  '',
customField: '20090719-174056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1841',
internalId:  '',
customField: '20090505-205548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32001',
internalId:  '',
customField: '20090712-102653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20090719-173950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1946',
internalId:  '',
customField: '20080907-130307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12201',
internalId:  '',
customField: '20080730-192610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7306',
internalId:  '',
customField: '20080727-183119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20080727-183119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43201',
internalId:  '',
customField: '20080922-183622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49801',
internalId:  '',
customField: '20090719-175433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50001',
internalId:  '',
customField: '20090719-181539'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INP021';
var companyName   = 'Connecticut+Valley+Litho+Club';
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();
};
