/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','694',jdecode('2010%2F2011+Tuition+Rates'),jdecode(''),'/694.html','true',[],'',''],
	['PAGE','21522',jdecode('Child+Care++Programs'),jdecode(''),'/21522/index.html','true',[ 
		['PAGE','21543',jdecode('Infant+%26+Todder+Program'),jdecode(''),'/21522/21543.html','true',[],'',''],
		['PAGE','21564',jdecode('Pre-School'),jdecode(''),'/21522/21564.html','true',[],'',''],
		['PAGE','37853',jdecode('Private+Kindergarten'),jdecode(''),'/21522/37853.html','true',[],'',''],
		['PAGE','21585',jdecode('Before+%26+After+Care'),jdecode(''),'/21522/21585.html','true',[],'','']
	],'',''],
	['PAGE','39430',jdecode('Enrichment+Programs'),jdecode(''),'/39430.html','true',[],'',''],
	['PAGE','39354',jdecode('Child+Nutrition'),jdecode(''),'/39354.html','true',[],'',''],
	['PAGE','799',jdecode('Registration+Forms'),jdecode(''),'/799.html','true',[],'',''],
	['PAGE','820',jdecode('Contact+Us'),jdecode(''),'/820.html','true',[],'',''],
	['PAGE','42055',jdecode('Community+Involvement+'),jdecode(''),'/42055.html','true',[],'',''],
	['PAGE','18801',jdecode('Map'),jdecode(''),'/18801.html','true',[],'',''],
	['PAGE','42692',jdecode('Employment+'),jdecode(''),'/42692.html','true',[],'',''],
	['PAGE','26106',jdecode('Guestbook'),jdecode(''),'/26106/index.html','true',[ 
		['PAGE','26101',jdecode('Read+Guestbook'),jdecode(''),'/26106/26101.html','false',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Kalkutta';
theSitetree.paletteFamily='9F69A4';
theSitetree.keyvisualId='6181';
theSitetree.keyvisualName='kv_6181.jpg';
theSitetree.fontsetId='11141';
theSitetree.graphicsetId='11949';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D5B2D8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Kalkutta',
				paletteFamily: 	'9F69A4',
				keyvisualId: 	'6181',
				keyvisualName: 	'kv_6181.jpg',
				fontsetId: 		'11141',
				graphicsetId: 	'11949',
				contentColor: 	'000000',
				contentBGColor: 'D5B2D8',
				a_color: 		'000000',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '18801',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42692',
internalId:  '',
customField: '20100510-163801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42055',
internalId:  '',
customField: '20100413-163957'
};
webappMappings['1002']=webappMappings['1002-26106AHW050INEE7U']={
webappId:    '1002',
documentId:  '26106',
internalId:  '26106AHW050INEE7U',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100716-152015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20100716-144009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21522',
internalId:  '',
customField: '20100413-142534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21543',
internalId:  '',
customField: '20100302-184439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21564',
internalId:  '',
customField: '20100716-150200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37853',
internalId:  '',
customField: '20100413-142350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21585',
internalId:  '',
customField: '20100413-142505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '820',
internalId:  '',
customField: '20100716-150502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20080109-173015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '799',
internalId:  '',
customField: '20100716-151708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26106',
internalId:  '',
customField: '20080106-020014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20080106-020014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39354',
internalId:  '',
customField: '20100716-150426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39430',
internalId:  '',
customField: '20100716-150654'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEE7U';
var companyName   = 'Kuebler+Early+Learning+Center';
var htmlTitle	  = 'Kueblerearlylearning';
var metaKeywords  = 'childcare++daycare++education++preschool++Keubler+Early+Learning+Center+Salem%2C+OR';
var metaContents  = 'childcare++daycare++education++preschool++++Keubler+Early+Learning+Center+Salem%2C+OR';
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();
};
