/* [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','1001',jdecode('Home'),jdecode(''),'/1001.html','true',[],''],
	['PAGE','9001',jdecode('About+us'),jdecode(''),'/9001/index.html','true',[ 
		['PAGE','10301',jdecode('Owner+%2F+Director'),jdecode(''),'/9001/10301.html','true',[],''],
		['PAGE','9022',jdecode('The+Staff'),jdecode(''),'/9001/9022.html','true',[],''],
		['PAGE','15201',jdecode('Vision'),jdecode(''),'/9001/15201.html','true',[],''],
		['PAGE','15222',jdecode('Philosphy'),jdecode(''),'/9001/15222.html','true',[],''],
		['PAGE','17501',jdecode('Mealtimes'),jdecode(''),'/9001/17501.html','true',[],''],
		['PAGE','16801',jdecode('Physical+Activity'),jdecode(''),'/9001/16801.html','true',[],''],
		['PAGE','16001',jdecode('Discipline'),jdecode(''),'/9001/16001.html','true',[],''],
		['PAGE','18301',jdecode('Guidelines'),jdecode(''),'/9001/18301.html','true',[],''],
		['PAGE','18701',jdecode('Hours+of+Operation'),jdecode(''),'/9001/18701.html','true',[],''],
		['PAGE','10701',jdecode('Tours'),jdecode(''),'/9001/10701.html','true',[],''],
		['PAGE','20601',jdecode('Tuition'),jdecode(''),'/9001/20601.html','true',[],'']
	],''],
	['PAGE','9043',jdecode('Programs+Offered'),jdecode(''),'/9043/index.html','true',[ 
		['PAGE','9064',jdecode('Infants+%2F+Toddlers'),jdecode(''),'/9043/9064.html','true',[],''],
		['PAGE','9106',jdecode('Pre-School+%2F+Pre-K'),jdecode(''),'/9043/9106.html','true',[],''],
		['PAGE','9901',jdecode('School+Age+%2F+Activities+Club++School+Age+Activities+Club'),jdecode(''),'/9043/9901.html','true',[],''],
		['PAGE','10343',jdecode('Transportation'),jdecode(''),'/9043/10343.html','true',[],'']
	],''],
	['PAGE','23401',jdecode('Newsletter+'),jdecode(''),'/23401.html','true',[],''],
	['PAGE','23701',jdecode('Helpful+Information'),jdecode(''),'/23701/index.html','true',[ 
		['PAGE','24101',jdecode('AZAEYC'),jdecode(''),'/23701/24101.html','true',[],''],
		['PAGE','24122',jdecode('new'),jdecode(''),'/23701/24122.html','true',[],''],
		['PAGE','24143',jdecode('new'),jdecode(''),'/23701/24143.html','true',[],'']
	],''],
	['PAGE','9127',jdecode('Contact+Information'),jdecode(''),'/9127/index.html','true',[ 
		['PAGE','12701',jdecode('Map'),jdecode(''),'/9127/12701.html','true',[],'']
	],''],
	['PAGE','9190',jdecode('Job+Inquiry'),jdecode(''),'/9190.html','true',[],''],
	['PAGE','9211',jdecode('Choosing+a+Facility'),jdecode(''),'/9211.html','true',[],''],
	['PAGE','22001',jdecode('Poll'),jdecode(''),'/22001.html','true',[],''],
	['PAGE','8706',jdecode('Guestbook'),jdecode(''),'/8706/index.html','true',[ 
		['PAGE','8701',jdecode('Read+Guestbook'),jdecode(''),'/8706/8701.html','false',[],'']
	],''],
	['PAGE','24901',jdecode('new'),jdecode(''),'/24901.html','true',[],'']];
var siteelementCount=31;
theSitetree.topTemplateName='Celebration';
theSitetree.paletteFamily='8787FC';
theSitetree.keyvisualId='3790';
theSitetree.keyvisualName='kv_3790.jpg';
theSitetree.fontsetId='10583';
theSitetree.graphicsetId='10987';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Celebration',
				paletteFamily: 	'8787FC',
				keyvisualId: 	'3790',
				keyvisualName: 	'kv_3790.jpg',
				fontsetId: 		'10583',
				graphicsetId: 	'10987',
				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: 		'4141B3',
				e_color: 		'4141B3',
				f_color: 		'4141B3',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-117617']={
webappId:    '1501',
documentId:  '1001',
internalId:  '117617',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-8706AHW050INX2OU']={
webappId:    '1002',
documentId:  '8706',
internalId:  '8706AHW050INX2OU',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '12701',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['7005']=webappMappings['7005-149']={
webappId:    '7005',
documentId:  '22001',
internalId:  '149',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20080229-091950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20070607-094013'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX2OU';
var companyName   = 'Kelland%27s+Kiddie+College';
var htmlTitle	  = 'Kellandscollege';
var metaKeywords  = 'Childcare%2C+Daycare%2C+before+school+care%2C+after+school+care%2C+preschool%2C+Schools+Academic%2C+Kindergarten';
var metaContents  = 'Childcare%2C+Daycare%2C+before+school+care%2C+after+school+care%2C+preschool%2C+Schools+Academic%2C+Kindergarten';
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();
};
