/* [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','3901',jdecode('HOME'),jdecode(''), jdecode('%2F3901.html'), 'true',[],'',''],
	['PAGE','121001',jdecode('TAXONOMY'),jdecode(''), jdecode('%2F121001.html'), 'true',[],'',''],
	['PAGE','3952',jdecode('SPECIES'),jdecode(''), jdecode('%2F3952.html'), 'true',[],'',''],
	['PAGE','3973',jdecode('ANATOMY'),jdecode(''), jdecode('%2F3973.html'), 'true',[],'',''],
	['PAGE','3994',jdecode('EGGS'),jdecode(''), jdecode('%2F3994.html'), 'true',[],'',''],
	['PAGE','4015',jdecode('HOST+STEMS'),jdecode(''), jdecode('%2F4015.html'), 'true',[],'',''],
	['PAGE','43001',jdecode('HATCHING'),jdecode(''), jdecode('%2F43001.html'), 'true',[],'',''],
	['PAGE','4036',jdecode('NYMPHS'),jdecode(''), jdecode('%2F4036.html'), 'true',[],'',''],
	['PAGE','4057',jdecode('INSTARS'),jdecode(''), jdecode('%2F4057.html'), 'true',[],'',''],
	['PAGE','95001',jdecode('Abdomen+patterns'),jdecode(''), jdecode('%2F95001.html'), 'true',[],'',''],
	['PAGE','4099',jdecode('SINGING+MALES'),jdecode(''), jdecode('%2F4099.html'), 'true',[],'',''],
	['PAGE','126901',jdecode('POSTER'),jdecode(''), jdecode('%2F126901.html'), 'true',[],'',''],
	['PAGE','23185',jdecode('Two-spotted'),jdecode(''), jdecode('%2F23185.html'), 'true',[],'',''],
	['PAGE','23101',jdecode('Black-horned'),jdecode(''), jdecode('%2F23101.html'), 'true',[],'',''],
	['PAGE','23122',jdecode('Forbes%26%23x27%3B'),jdecode(''), jdecode('%2F23122.html'), 'true',[],'',''],
	['PAGE','23143',jdecode('Pine'),jdecode(''), jdecode('%2F23143.html'), 'true',[],'',''],
	['PAGE','93401',jdecode('Tamarack'),jdecode(''), jdecode('%2F93401.html'), 'true',[],'',''],
	['PAGE','55201',jdecode('Fast-calling'),jdecode(''), jdecode('%2F55201.html'), 'true',[],'',''],
	['PAGE','23164',jdecode('Four-spotted'),jdecode(''), jdecode('%2F23164.html'), 'true',[],'',''],
	['PAGE','109401',jdecode('Prairie'),jdecode(''), jdecode('%2F109401.html'), 'true',[],'',''],
	['PAGE','23206',jdecode('Snowy'),jdecode(''), jdecode('%2F23206.html'), 'true',[],'',''],
	['PAGE','23227',jdecode('Alexander%26%23x27%3Bs'),jdecode(''), jdecode('%2F23227.html'), 'true',[],'',''],
	['PAGE','23248',jdecode('Narrow-winged'),jdecode(''), jdecode('%2F23248.html'), 'true',[],'',''],
	['PAGE','106401',jdecode('Broad-winged'),jdecode(''), jdecode('%2F106401.html'), 'true',[],'',''],
	['PAGE','100801',jdecode('Davis%26%23x27%3B'),jdecode(''), jdecode('%2F100801.html'), 'true',[],'',''],
	['PAGE','55801',jdecode('Different-horned'),jdecode(''), jdecode('%2F55801.html'), 'true',[],'',''],
	['PAGE','55822',jdecode('Western'),jdecode(''), jdecode('%2F55822.html'), 'true',[],'',''],
	['PAGE','106422',jdecode('Texas'),jdecode(''), jdecode('%2F106422.html'), 'true',[],'',''],
	['PAGE','71301',jdecode('Undetermined+TX+sp.C'),jdecode(''), jdecode('%2F71301.html'), 'true',[],'',''],
	['PAGE','4267',jdecode('Nicaraguan+species'),jdecode(''), jdecode('%2F4267.html'), 'true',[],'',''],
	['PAGE','64301',jdecode('World+species'),jdecode(''), jdecode('%2F64301.html'), 'true',[],'',''],
	['PAGE','4120',jdecode('MATING'),jdecode(''), jdecode('%2F4120.html'), 'true',[],'',''],
	['PAGE','32501',jdecode('SPERMATOPHORE'),jdecode(''), jdecode('%2F32501.html'), 'true',[],'',''],
	['PAGE','4141',jdecode('OVIPOSITION'),jdecode(''), jdecode('%2F4141.html'), 'true',[],'',''],
	['PAGE','4162',jdecode('MOLTING'),jdecode(''), jdecode('%2F4162.html'), 'true',[],'',''],
	['PAGE','4078',jdecode('LIFE+CYCLE'),jdecode(''), jdecode('%2F4078.html'), 'true',[],'',''],
	['PAGE','4183',jdecode('BEHAVIORS'),jdecode(''), jdecode('%2F4183.html'), 'true',[],'',''],
	['PAGE','102001',jdecode('Interactions'),jdecode(''), jdecode('%2F102001.html'), 'true',[],'',''],
	['PAGE','4204',jdecode('HABITATS'),jdecode(''), jdecode('%2F4204.html'), 'true',[],'',''],
	['PAGE','4225',jdecode('LOCATIONS'),jdecode(''), jdecode('%2F4225.html'), 'true',[],'',''],
	['PAGE','4246',jdecode('SOUND+ANALYSIS'),jdecode(''), jdecode('%2F4246.html'), 'true',[],'',''],
	['PAGE','11901',jdecode('WHO%26%23x27%3BS+WHO'),jdecode(''), jdecode('%2F11901.html'), 'true',[],'',''],
	['PAGE','4288',jdecode('HISTORY'),jdecode(''), jdecode('%2F4288.html'), 'true',[],'',''],
	['PAGE','4309',jdecode('SCIENTIFIC+DATA'),jdecode(''), jdecode('%2F4309.html'), 'true',[],'',''],
	['PAGE','4330',jdecode('GLOSSARY'),jdecode(''), jdecode('%2F4330.html'), 'true',[],'',''],
	['PAGE','19101',jdecode('LINKS'),jdecode(''), jdecode('%2F19101.html'), 'true',[],'',''],
	['PAGE','53201',jdecode('Contact+Us'),jdecode(''), jdecode('%2F53201.html'), 'true',[],'',''],
	['PAGE','59401',jdecode('Children%26%23x27%3Bs+Book'),jdecode(''), jdecode('%2F59401.html'), 'true',[],'',''],
	['PAGE','130801',jdecode('Warm+up+singing'),jdecode(''), jdecode('%2F130801.html'), 'true',[],'',''],
	['PAGE','130901',jdecode('Synchronous+songs'),jdecode(''), jdecode('%2F130901.html'), 'true',[],'','']];
var siteelementCount=50;
theSitetree.topTemplateName='Grace';
theSitetree.paletteFamily='A1E57B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32047';
theSitetree.graphicsetId='13870';
theSitetree.contentColor='484848';
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: 			'Grace',
				paletteFamily: 	'A1E57B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32047',
				graphicsetId: 	'13870',
				contentColor: 	'484848',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20111106-012019'
};
webappMappings['1501']=webappMappings['1501-25956856']={
webappId:    '1501',
documentId:  '3901',
internalId:  '25956856',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3952',
internalId:  '',
customField: '20100526-215946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3973',
internalId:  '',
customField: '20111106-012825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3994',
internalId:  '',
customField: '20111215-224313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4015',
internalId:  '',
customField: '20111016-225915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4036',
internalId:  '',
customField: '20100521-204503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4057',
internalId:  '',
customField: '20100402-205913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4078',
internalId:  '',
customField: '20110807-093954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4099',
internalId:  '',
customField: '20111220-184527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4120',
internalId:  '',
customField: '20100712-213150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4141',
internalId:  '',
customField: '20100301-224422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4162',
internalId:  '',
customField: '20101121-194200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4183',
internalId:  '',
customField: '20100421-215324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4204',
internalId:  '',
customField: '20100222-213633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4225',
internalId:  '',
customField: '20100126-223917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4246',
internalId:  '',
customField: '20100303-224443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4267',
internalId:  '',
customField: '20110220-135400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4288',
internalId:  '',
customField: '20110529-135812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4309',
internalId:  '',
customField: '20101114-114034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4330',
internalId:  '',
customField: '20111120-143642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126901',
internalId:  '',
customField: '20111008-000729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20110208-221546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20110208-222537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23206',
internalId:  '',
customField: '20101114-154449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20101114-121459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23122',
internalId:  '',
customField: '20111107-195003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23227',
internalId:  '',
customField: '20110529-152820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23185',
internalId:  '',
customField: '20101114-221936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23164',
internalId:  '',
customField: '20101114-120824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23143',
internalId:  '',
customField: '20110919-014821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23248',
internalId:  '',
customField: '20101114-221828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20111016-232959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43001',
internalId:  '',
customField: '20100725-092412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53201',
internalId:  '',
customField: '20110320-224258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130901',
internalId:  '',
customField: '20111220-210849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55801',
internalId:  '',
customField: '20110212-143205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130801',
internalId:  '',
customField: '20111220-205736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55201',
internalId:  '',
customField: '20110212-174002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55822',
internalId:  '',
customField: '20101002-222706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59401',
internalId:  '',
customField: '20111204-122814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64301',
internalId:  '',
customField: '20100515-114734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71301',
internalId:  '',
customField: '20101128-112351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93401',
internalId:  '',
customField: '20110917-004245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95001',
internalId:  '',
customField: '20100713-233629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100801',
internalId:  '',
customField: '20110212-170530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102001',
internalId:  '',
customField: '20110102-222724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106422',
internalId:  '',
customField: '20110212-134138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106401',
internalId:  '',
customField: '20101114-114237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109401',
internalId:  '',
customField: '20110212-170719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121001',
internalId:  '',
customField: '20111215-230107'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVXJG';
var companyName   = '+++OECANTHINAE+-+Tree+Crickets';
var htmlTitle	  = 'Tree+cricket+information+with+photos+and+videos';
var metaKeywords  = 'tree%2C+cricket%2C+tree+cricket%2C+oecanthinae%2C+oecanthus%2C+neoxabea%2C+alexanderi%2C+argentinus%2C+bipunctata%2C+californicus%2C+celerinictus%2C+exclamationis%2C+forbesi%2C+formosa%2C+fultoni+%2Claricis%2C+latipennis%2C+leptogrammus%2C+nigricornis%2C+niveus%2C+pini%2C+quadripunctatus%2C+rileyi%2C+varicornis%2C+Walker%2C+B.B.+Fulton%2C+Blatchley%2C+DeGeer%2C+Alexander%2C+orthoptera%2C+trilling%2C+ovipositor%2C+metanotal%2C+ensifera';
var metaContents  = 'Tree+cricket+information+with+photos+and+videos.++Includes%3A++Species%2C+Locations%2C+Behaviors%2C+Song+Analysis%2C+Calling+males%2C+History+and+Life+Cycle.++Photos+and+videos+of+species+found+within+the+U.S.++General+information+on+species+found+throughout+the+world.++Links+to+important+websites.++This+website+has+been+developed++to+increase+awareness+of+these+fascinating+little+creatures.';
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();
};

