/* [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','1801',jdecode('Home'),jdecode(''),'/1801.html','true',[],'',''],
	['PAGE','1852',jdecode('About+Us'),jdecode(''),'/1852/index.html','true',[ 
		['PAGE','1873',jdecode('Our+teams+%26+locations'),jdecode(''),'/1852/1873.html','true',[],'','']
	],'',''],
	['PAGE','1894',jdecode('Classes'),jdecode(''),'/1894/index.html','true',[ 
		['PAGE','1915',jdecode('Infants'),jdecode(''),'/1894/1915.html','true',[],'',''],
		['PAGE','1936',jdecode('Toddlers'),jdecode(''),'/1894/1936.html','true',[],'',''],
		['PAGE','1957',jdecode('Two%26%23x27%3Bs+%26+Three%26%23x27%3Bs'),jdecode(''),'/1894/1957.html','true',[],'',''],
		['PAGE','1978',jdecode('Three%2C+Four+%26+Five-Year-Olds'),jdecode(''),'/1894/1978.html','true',[],'',''],
		['PAGE','1999',jdecode('School-Age+Programs'),jdecode(''),'/1894/1999.html','true',[],'','']
	],'',''],
	['PAGE','2020',jdecode('Policies'),jdecode(''),'/2020.html','true',[],'',''],
	['PAGE','2041',jdecode('Calendar'),jdecode(''),'/2041.html','true',[],'',''],
	['PAGE','2062',jdecode('Sample+Schedule'),jdecode(''),'/2062.html','true',[],'',''],
	['PAGE','2083',jdecode('Sample+Menu'),jdecode(''),'/2083.html','true',[],'',''],
	['PAGE','2104',jdecode('Contact'),jdecode(''),'/2104.html','true',[],'',''],
	['PAGE','2125',jdecode('Jobs'),jdecode(''),'/2125.html','true',[],'',''],
	['PAGE','2146',jdecode('Links+%26+Articles'),jdecode(''),'/2146.html','true',[],'',''],
	['PAGE','2167',jdecode('Photos'),jdecode(''),'/2167.html','true',[],'',''],
	['PAGE','2188',jdecode('Notices+%26+News'),jdecode(''),'/2188.html','true',[],'',''],
	['PAGE','2209',jdecode('Guest+Book'),jdecode(''),'/2209.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Nurseries';
theSitetree.paletteFamily='93B9F3';
theSitetree.keyvisualId='7904';
theSitetree.keyvisualName='kv_7904.jpg';
theSitetree.fontsetId='16858';
theSitetree.graphicsetId='12317';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='93B9F3';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'true',
				name: 			'Nurseries',
				paletteFamily: 	'93B9F3',
				keyvisualId: 	'7904',
				keyvisualName: 	'kv_7904.jpg',
				fontsetId: 		'16858',
				graphicsetId: 	'12317',
				contentColor: 	'000000',
				contentBGColor: '93B9F3',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-2209ahw050inlby0']={
webappId:    '1002',
documentId:  '2209',
internalId:  '2209ahw050inlby0',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20100914-104243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20100818-124919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20100818-124306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20090811-202741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20090811-203106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20090811-203347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20090811-204102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1978',
internalId:  '',
customField: '20090811-204202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1999',
internalId:  '',
customField: '20090811-204600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2020',
internalId:  '',
customField: '20090811-195725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2041',
internalId:  '',
customField: '20110708-170503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2062',
internalId:  '',
customField: '20090811-154351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2083',
internalId:  '',
customField: '20090811-154455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2104',
internalId:  '',
customField: '20090811-154659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2125',
internalId:  '',
customField: '20090811-194645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2146',
internalId:  '',
customField: '20090811-205858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2167',
internalId:  '',
customField: '20110708-165605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2188',
internalId:  '',
customField: '20110109-223628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2209',
internalId:  '',
customField: '20090811-211047'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INLBY0';
var companyName   = 'Hobbit+Hill+Preschools';
var htmlTitle	  = 'www.hobbithill.com';
var metaKeywords  = 'early+education%2C+child+care%2C+daycare%2C+preschool%2C+kindergarten%2C+prekindergarten%2C+four%2C+three%2C+two%2C+infants%2C+afterschool+program%2C+summer+camp%2C+preschool%2C+children%2C+school';
var metaContents  = 'early+education%2C+child+care%2C+daycare%2C+preschool%2C+kindergarten%2C+prekindergarten%2C+four%2C+three%2C+two%2C+infants%2C+afterschool+program%2C+summer+camp%2C+preschool';
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();
};

