/* [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','275',jdecode('Home'),jdecode(''),'/275.html','true',[],''],
	['PAGE','4211',jdecode('About%2FContact'),jdecode(''),'/4211.html','true',[],''],
	['PAGE','181640',jdecode('Site+Map'),jdecode(''),'/181640.html','true',[],''],
	['PAGE','134452',jdecode('In+the+field'),jdecode(''),'/134452.html','true',[],''],
	['PAGE','148496',jdecode('Kentucky+ID'),jdecode(''),'/148496.html','true',[],''],
	['PAGE','173829',jdecode('Bluegrass+Spike'),jdecode(''),'/173829.html','true',[],''],
	['PAGE','128935',jdecode('Paleo+%2F+Flint'),jdecode(''),'/128935.html','true',[],''],
	['PAGE','128956',jdecode('Archaic+%2F+Flint'),jdecode(''),'/128956.html','true',[],''],
	['PAGE','128977',jdecode('Woodland+%2F+Flint'),jdecode(''),'/128977.html','true',[],''],
	['PAGE','128998',jdecode('Mississippian+%2F+Flint'),jdecode(''),'/128998.html','true',[],''],
	['PAGE','192495',jdecode('Points%2FBlades%2FOther'),jdecode(''),'/192495.html','true',[],''],
	['PAGE','157507',jdecode('Drills'),jdecode(''),'/157507.html','true',[],''],
	['PAGE','147696',jdecode('Tools+%2F+Other'),jdecode(''),'/147696.html','true',[],''],
	['PAGE','4129',jdecode('Hardstone'),jdecode(''),'/4129.html','true',[],''],
	['PAGE','4138',jdecode('Slate'),jdecode(''),'/4138.html','true',[],''],
	['PAGE','129019',jdecode('Bone'),jdecode(''),'/129019.html','true',[],''],
	['PAGE','132752',jdecode('Pottery'),jdecode(''),'/132752.html','true',[],''],
	['PAGE','180240',jdecode('Basketry'),jdecode(''),'/180240.html','true',[],''],
	['PAGE','129040',jdecode('Miscellaneous'),jdecode(''),'/129040.html','true',[],''],
	['PAGE','1690',jdecode('Links'),jdecode(''),'/1690.html','true',[],''],
	['PAGE','190795',jdecode('Collector+Tools'),jdecode(''),'/190795.html','true',[],''],
	['PAGE','188595',jdecode('Weather%2FMaps%2FTools'),jdecode(''),'/188595.html','true',[],'']];
var siteelementCount=22;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10344';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10344',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'5E5E5E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4211',
internalId:  '',
customField: '20091130-173448'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '275',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '275',
internalId:  '',
customField: '20091122-095502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148496',
internalId:  '',
customField: '20100131-150615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128998',
internalId:  '',
customField: '20091012-105301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129019',
internalId:  '',
customField: '20091012-105604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129040',
internalId:  '',
customField: '20091012-105704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132752',
internalId:  '',
customField: '20091012-105624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134452',
internalId:  '',
customField: '20091204-184210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128977',
internalId:  '',
customField: '20091017-203005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147696',
internalId:  '',
customField: '20091012-105443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4129',
internalId:  '',
customField: '20091012-105515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4138',
internalId:  '',
customField: '20091117-180813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128935',
internalId:  '',
customField: '20091115-181540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128956',
internalId:  '',
customField: '20091117-175343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190795',
internalId:  '',
customField: '20091012-105819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '192495',
internalId:  '',
customField: '20091012-105348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1690',
internalId:  '',
customField: '20091122-101648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '157507',
internalId:  '',
customField: '20091012-105417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '173829',
internalId:  '',
customField: '20091012-105123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '180240',
internalId:  '',
customField: '20091012-105643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '181640',
internalId:  '',
customField: '20091012-105038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188595',
internalId:  '',
customField: '20091012-105837'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXXTI';
var companyName   = 'Hudson+Artifacts';
var htmlTitle	  = 'Hudson+Artifacts';
var metaKeywords  = 'Hudson+Artifacts%2CNative+American%2CIndian%2CArtifacts%2CArrowheads%2CFlint%2CCherokee%2CKentucky%2CArrowhead%2CArtifact%2CFlint%2CChert%2CCreek%2CRiver%2CHudson+Artifacts%2CRelic%2CStone+Tools%2CRock%2CHunting%2CCollecting%2CSlate%2CHardstone%2CPottery%2CAxe%2CNative+American%2CIndian%2CStreams%2CFinds%2C';
var metaContents  = 'Welcome+to+Hudson+Artifacts.+I+have+been+hunting+and+collecting+artifacts+most+of+my+life+around+the+Kentucky+area.And+have+been+very+fortunate+to+have+seen+and+studied+many+fine+examples.+I+love+the+outdoors+and+im+very+at+home+in+the+woods+and+streams.I+have+always+been+interested+in+every+angle+and+corner+of+the+hobby.Including+Native+American+Heritage.Good+hunting+to+you%21';
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();
};
