/* [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','22',jdecode('Home'),jdecode(''),'/22.html','true',[],''],
	['PAGE','6621',jdecode('Kizzy+Sightings%21'),jdecode(''),'/6621.html','true',[],''],
	['PAGE','2525',jdecode('Events+%26+Signings'),jdecode(''),'/2525.html','true',[],''],
	['PAGE','2534',jdecode('Links'),jdecode(''),'/2534.html','true',[],''],
	['PAGE','2543',jdecode('Contact'),jdecode(''),'/2543.html','true',[],''],
	['PAGE','2552',jdecode('About+us'),jdecode(''),'/2552.html','true',[],''],
	['PAGE','2832',jdecode('Kizzy+Pix'),jdecode(''),'/2832.html','true',[],''],
	['PAGE','3612',jdecode('Kizzy%26%23x27%3Bs+Friends'),jdecode(''),'/3612.html','true',[],''],
	['PAGE','2507',jdecode('Guestbook'),jdecode(''),'/2507.html','true',[],''],
	['PAGE','2506',jdecode('Read+Guestbook'),jdecode(''),'/2506.html','false',[],''],
	['PAGE','3813',jdecode('In+the+News'),jdecode(''),'/3813.html','true',[],''],
	['PAGE','4806',jdecode('About+R.E.A.D.%C2%AE+'),jdecode(''),'/4806.html','true',[],''],
	['PAGE','5054',jdecode('Where+we%26%23x27%3Bve+been%21'),jdecode(''),'/5054.html','true',[],''],
	['PAGE','5479',jdecode('About+the+Author'),jdecode(''),'/5479.html','true',[],''],
	['PAGE','6362',jdecode('NEW%21%21%21+Special+Picture'),jdecode(''),'/6362.html','true',[],''],
	['PAGE','12601',jdecode(''),jdecode(''),'/12601.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Sonnemond';
theSitetree.paletteFamily='D7E1FC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10759';
theSitetree.graphicsetId='10815';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D7E1FC';
var theTemplate={
				name: 			'Sonnemond',
				paletteFamily: 	'D7E1FC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10759',
				graphicsetId: 	'10815',
				contentColor: 	'000000',
				contentBGColor: 'D7E1FC',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5C5898',
				e_color: 		'ED4747',
				f_color: 		'437D3B',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-165372']={
webappId:    '1501',
documentId:  '22',
internalId:  '165372',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-2507AHW050INXECI']={
webappId:    '1002',
documentId:  '2507',
internalId:  '2507AHW050INXECI',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '22',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-6ce0478412a119a4a0ad17a681132bbd']={
webappId:    '7060',
documentId:  '2832',
internalId:  '6ce0478412a119a4a0ad17a681132bbd',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-370812e30094f70ba624e6a7cc3ad367']={
webappId:    '7060',
documentId:  '3612',
internalId:  '370812e30094f70ba624e6a7cc3ad367',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22',
internalId:  '',
customField: '20070605-033700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6621',
internalId:  '',
customField: '20071101-230854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2525',
internalId:  '',
customField: '20080820-093003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2534',
internalId:  '',
customField: '20090115-214705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2543',
internalId:  '',
customField: '20071101-230828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2552',
internalId:  '',
customField: '20080503-013347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2832',
internalId:  '',
customField: '20060810-022417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3612',
internalId:  '',
customField: '20070319-032401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2507',
internalId:  '',
customField: '20070509-035427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2506',
internalId:  '',
customField: '20070308-040521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3813',
internalId:  '',
customField: '20060822-034228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4806',
internalId:  '',
customField: '20070205-155916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5054',
internalId:  '',
customField: '20090115-213229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5479',
internalId:  '',
customField: '20070321-023616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6362',
internalId:  '',
customField: '20070730-195821'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24G']={
webappId:    '5003',
documentId:  '22',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24G',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20090202-225932'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INXECI';
var companyName   = 'Kizzy%27s+Korner';
var htmlTitle	  = 'Kizzys+Korner';
var metaKeywords  = 'R.E.A.D.%2C+therapy+dogs%2C+TDI%2C+Delta%2C+training%2C+reading%2C+kids%2C+libraries%2C+schools%2Cchildrens+books%2C+one+incredible+dog%2C+Kizzy%2C+Judy%2C+Audevard%2C+Nanuet%2C+Nyack%2C+Rockland%2C+READ%2C+Therapy+Dogs+Inc.+TDInc.+Judith';
var metaContents  = 'R.E.A.D.%2C+therapy+dogs%2C+TDI%2C+Delta%2C+training%2C+reading%2C+kids%2C+libraries%2C+schools%2C+childrens+books%2C+one+incredible+dog%2C+Kizzy%2C+Judy%2C+Audevard%2C+Nanuet%2C+Nyack%2C+Rockland%2C+READ%2C+Therapy+Dogs+Inc.+TDInc.+Judith';
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();
};
