/* [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','7101',jdecode('Home'),jdecode(''),'/7101.html','true',[],''],
	['PAGE','56901',jdecode('About+Us'),jdecode(''),'/56901/index.html','true',[ 
		['PAGE','25522',jdecode('FAQ'),jdecode(''),'/56901/25522.html','true',[],''],
		['PAGE','25543',jdecode('Bylaws'),jdecode(''),'/56901/25543.html','true',[],''],
		['PAGE','25564',jdecode('Timeline'),jdecode(''),'/56901/25564.html','true',[],''],
		['PAGE','25585',jdecode('Committee'),jdecode(''),'/56901/25585.html','true',[],''],
		['PAGE','25606',jdecode('Book+Selection'),jdecode(''),'/56901/25606.html','true',[],''],
		['PAGE','50201',jdecode('Promotional'),jdecode(''),'/56901/50201.html','true',[],'']
	],''],
	['PAGE','72943',jdecode('Intermediate+List'),jdecode(''),'/72943/index.html','true',[ 
		['PAGE','73943',jdecode('Book+Resources'),jdecode(''),'/72943/73943.html','true',[],''],
		['PAGE','25501',jdecode('Past+Nominees'),jdecode(''),'/72943/25501.html','true',[],''],
		['PAGE','33843',jdecode('Winners'),jdecode(''),'/72943/33843.html','true',[],''],
		['PAGE','65343',jdecode('2010+Book+Resources'),jdecode(''),'/72943/65343.html','false',[],''],
		['PAGE','61401',jdecode('2010'),jdecode(''),'/72943/61401.html','false',[],''],
		['PAGE','38701',jdecode('1993'),jdecode(''),'/72943/38701.html','false',[],''],
		['PAGE','39101',jdecode('1994'),jdecode(''),'/72943/39101.html','false',[],''],
		['PAGE','39301',jdecode('1995'),jdecode(''),'/72943/39301.html','false',[],''],
		['PAGE','39601',jdecode('1996'),jdecode(''),'/72943/39601.html','false',[],''],
		['PAGE','40401',jdecode('1997'),jdecode(''),'/72943/40401.html','false',[],''],
		['PAGE','40601',jdecode('1998'),jdecode(''),'/72943/40601.html','false',[],''],
		['PAGE','41201',jdecode('1999'),jdecode(''),'/72943/41201.html','false',[],''],
		['PAGE','41401',jdecode('2000'),jdecode(''),'/72943/41401.html','false',[],''],
		['PAGE','41701',jdecode('2001'),jdecode(''),'/72943/41701.html','false',[],''],
		['PAGE','41901',jdecode('2002'),jdecode(''),'/72943/41901.html','false',[],''],
		['PAGE','42101',jdecode('2003'),jdecode(''),'/72943/42101.html','false',[],''],
		['PAGE','42301',jdecode('2004'),jdecode(''),'/72943/42301.html','false',[],''],
		['PAGE','42501',jdecode('2005'),jdecode(''),'/72943/42501.html','false',[],''],
		['PAGE','42522',jdecode('2006'),jdecode(''),'/72943/42522.html','false',[],''],
		['PAGE','42543',jdecode('2007'),jdecode(''),'/72943/42543.html','false',[],''],
		['PAGE','42564',jdecode('2008'),jdecode(''),'/72943/42564.html','false',[],''],
		['PAGE','33801',jdecode('2009'),jdecode(''),'/72943/33801.html','false',[],''],
		['PAGE','33822',jdecode('2009+Book+Resources'),jdecode(''),'/72943/33822.html','false',[],'']
	],''],
	['PAGE','72964',jdecode('Teen+List'),jdecode(''),'/72964/index.html','true',[ 
		['PAGE','72985',jdecode('Book+Resources'),jdecode(''),'/72964/72985.html','true',[],''],
		['PAGE','33885',jdecode('Past+Nominees'),jdecode(''),'/72964/33885.html','true',[],''],
		['PAGE','33927',jdecode('Winners'),jdecode(''),'/72964/33927.html','true',[],''],
		['PAGE','65364',jdecode('2010+Book+Resources'),jdecode(''),'/72964/65364.html','false',[],''],
		['PAGE','61301',jdecode('2010'),jdecode(''),'/72964/61301.html','false',[],''],
		['PAGE','50601',jdecode('2006+Teen'),jdecode(''),'/72964/50601.html','false',[],''],
		['PAGE','50622',jdecode('2007+Teen'),jdecode(''),'/72964/50622.html','false',[],''],
		['PAGE','50643',jdecode('2008+Teen'),jdecode(''),'/72964/50643.html','false',[],''],
		['PAGE','33864',jdecode('2009+Teen'),jdecode(''),'/72964/33864.html','false',[],''],
		['PAGE','33906',jdecode('2009+Book+Resources'),jdecode(''),'/72964/33906.html','false',[],'']
	],''],
	['PAGE','33948',jdecode('Participation'),jdecode(''),'/33948/index.html','true',[ 
		['PAGE','33969',jdecode('Voting'),jdecode(''),'/33948/33969.html','true',[],''],
		['PAGE','33990',jdecode('Student+Readers'),jdecode(''),'/33948/33990.html','true',[],''],
		['PAGE','34011',jdecode('Selection+Committee'),jdecode(''),'/33948/34011.html','true',[],'']
	],''],
	['PAGE','7401',jdecode('Contact+Us'),jdecode(''),'/7401/index.html','true',[ 
		['PAGE','34032',jdecode('Publisher+FAQs'),jdecode(''),'/7401/34032.html','true',[],''],
		['PAGE','34074',jdecode('Webmoiselle'),jdecode(''),'/7401/34074.html','true',[],'']
	],''],
	['PAGE','37301',jdecode('Blog'),jdecode(''),'/37301.html','false',[],''],
	['PAGE','65943',jdecode('Photos'),jdecode(''),'/65943.html','true',[],'']];
var siteelementCount=52;
theSitetree.topTemplateName='Produce';
theSitetree.paletteFamily='FDFC75';
theSitetree.keyvisualId='5748';
theSitetree.keyvisualName='kv_5748.jpg';
theSitetree.fontsetId='11055';
theSitetree.graphicsetId='11831';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='98A5F8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Produce',
				paletteFamily: 	'FDFC75',
				keyvisualId: 	'5748',
				keyvisualName: 	'kv_5748.jpg',
				fontsetId: 		'11055',
				graphicsetId: 	'11831',
				contentColor: 	'000000',
				contentBGColor: '98A5F8',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FDFC75',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20100510-202901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50201',
internalId:  '',
customField: '20100301-165523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20090630-224657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25501',
internalId:  '',
customField: '20100201-213654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25522',
internalId:  '',
customField: '20081229-204520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25543',
internalId:  '',
customField: '20081003-115030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25564',
internalId:  '',
customField: '20090105-222345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25585',
internalId:  '',
customField: '20091112-001637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25606',
internalId:  '',
customField: '20081229-205124'
};
webappMappings['7008']=webappMappings['7008-9210']={
webappId:    '7008',
documentId:  '34074',
internalId:  '9210',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33864',
internalId:  '',
customField: '20090615-221836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33801',
internalId:  '',
customField: '20090615-221705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33822',
internalId:  '',
customField: '20090701-223555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33948',
internalId:  '',
customField: '20081231-152736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34074',
internalId:  '',
customField: '20081006-215659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34032',
internalId:  '',
customField: '20081229-202925'
};
webappMappings['7050']=webappMappings['7050-5508']={
webappId:    '7050',
documentId:  '37301',
internalId:  '5508',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37301',
internalId:  '',
customField: '20081006-215728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33843',
internalId:  '',
customField: '20081003-122920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33885',
internalId:  '',
customField: '20100201-213846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33906',
internalId:  '',
customField: '20090107-194428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33927',
internalId:  '',
customField: '20081006-211653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33969',
internalId:  '',
customField: '20081229-214754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33990',
internalId:  '',
customField: '20081229-220341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34011',
internalId:  '',
customField: '20090909-214804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38701',
internalId:  '',
customField: '20081229-212607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39101',
internalId:  '',
customField: '20081229-212730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39301',
internalId:  '',
customField: '20081229-212802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39601',
internalId:  '',
customField: '20081229-212826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40401',
internalId:  '',
customField: '20081229-212903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20081229-212931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41201',
internalId:  '',
customField: '20081229-213006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41401',
internalId:  '',
customField: '20081229-213033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41701',
internalId:  '',
customField: '20081229-213101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41901',
internalId:  '',
customField: '20081229-213134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20081229-213158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20081229-213229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42501',
internalId:  '',
customField: '20081229-213306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42522',
internalId:  '',
customField: '20081229-213334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42543',
internalId:  '',
customField: '20081229-213405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42564',
internalId:  '',
customField: '20081229-213448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50601',
internalId:  '',
customField: '20081214-184636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50622',
internalId:  '',
customField: '20081214-185944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50643',
internalId:  '',
customField: '20081214-190808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56901',
internalId:  '',
customField: '20090102-170139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61301',
internalId:  '',
customField: '20100505-195933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61401',
internalId:  '',
customField: '20100505-195801'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '7101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65343',
internalId:  '',
customField: '20091112-002602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65364',
internalId:  '',
customField: '20100201-214005'
};
webappMappings['7060']=webappMappings['7060-6c8f56a3404f4d78d6af991e98afa1be']={
webappId:    '7060',
documentId:  '65943',
internalId:  '6c8f56a3404f4d78d6af991e98afa1be',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65943',
internalId:  '',
customField: '20090213-235952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72943',
internalId:  '',
customField: '20100201-220706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72964',
internalId:  '',
customField: '20100201-222623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72985',
internalId:  '',
customField: '20100505-195050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73943',
internalId:  '',
customField: '20100505-195011'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INEJBK';
var companyName   = 'Nutmeg+Book+Award';
var htmlTitle	  = 'Nutmeg+Book+Award';
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();
};
