/* [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','2201',jdecode('HOME+%22Jest%22+4+kids'),jdecode(''),'/2201.html','true',[],''],
	['PAGE','2522',jdecode('Meet+Deborah+Hercsek'),jdecode(''),'/2522.html','true',[],''],
	['PAGE','3501',jdecode('Giggles+4+kids'),jdecode(''),'/3501.html','true',[],''],
	['PAGE','10201',jdecode('Rosebud+D.+Clown'),jdecode(''),'/10201.html','true',[],''],
	['PAGE','2606',jdecode('Close-Up+Magic+4+kids'),jdecode(''),'/2606.html','true',[],''],
	['PAGE','2627',jdecode('Storytelling+4+kids'),jdecode(''),'/2627.html','true',[],''],
	['PAGE','2648',jdecode('Balloon+Bending+4+kids'),jdecode(''),'/2648.html','true',[],''],
	['PAGE','2669',jdecode('Face+Painting+4+kids'),jdecode(''),'/2669.html','true',[],''],
	['PAGE','53601',jdecode('Glitter+TATTOOS'),jdecode(''),'/53601.html','true',[],''],
	['PAGE','2564',jdecode('Contact+DEBORAH'),jdecode(''),'/2564.html','true',[],''],
	['PAGE','2501',jdecode('Professional+References'),jdecode(''),'/2501.html','true',[],''],
	['PAGE','9601',jdecode('PHOTO+GALLERY'),jdecode(''),'/9601.html','true',[],''],
	['PAGE','26301',jdecode('SEARCH+SITE'),jdecode(''),'/26301.html','true',[],'']];
var siteelementCount=13;
theSitetree.topTemplateName='Hobby1';
theSitetree.paletteFamily='FFFFF4';
theSitetree.keyvisualId='10181';
theSitetree.keyvisualName='kv_10181.jpg';
theSitetree.fontsetId='21082';
theSitetree.graphicsetId='13180';
theSitetree.contentColor='CA0D0D';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Hobby1',
				paletteFamily: 	'FFFFF4',
				keyvisualId: 	'10181',
				keyvisualName: 	'kv_10181.jpg',
				fontsetId: 		'21082',
				graphicsetId: 	'13180',
				contentColor: 	'CA0D0D',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-7527']={
webappId:    '7008',
documentId:  '2564',
internalId:  '7527',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20100306-085544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2522',
internalId:  '',
customField: '20100306-085615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20100306-090257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20100306-085742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2564',
internalId:  '',
customField: '20100306-090216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20100306-090334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2606',
internalId:  '',
customField: '20100306-085818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2627',
internalId:  '',
customField: '20100306-085857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2648',
internalId:  '',
customField: '20100306-085936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2669',
internalId:  '',
customField: '20100306-090014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3501',
internalId:  '',
customField: '20100306-085715'
};
webappMappings['7060']=webappMappings['7060-45fffa3c381e10fb2b325508f2c354d6']={
webappId:    '7060',
documentId:  '9601',
internalId:  '45fffa3c381e10fb2b325508f2c354d6',
customField: 'language:en;country:US;'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '26301',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20080903-180539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53601',
internalId:  '',
customField: '20100306-090048'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INE9M3';
var companyName   = 'jest4kids.com';
var htmlTitle	  = 'Magic%2C+Balloons%2C+Storytelling+and+Clowning';
var metaKeywords  = 'I+find+a+clown%2C+Storyteller%2C+master+storyteller%2C+Balloon+artist%2C+balloon+bending%2C+balloons%2C+stories%2C+fables%2C+childrens+stories%2C+stories+for+children%2C+storytelling+for+kids%2C+Jest4kids.com%2C+just+for+kids%2C+Magic%2C+magic+for+children%2C+Close+up+magic%2C+Games+for+children%2C+picnic+games%2C+birthday+parties%2C+kids+party+entertainer%2C+entertainment+for+children%2C+children%2C+fun%2C+laughing%2C+humor%2C+entertain%2C+performances%2C+kids+performer%2C+Debbie+Hercsek%2C+Hercsek%2C+Deborah+Hercsek%2C+Bath%2C+Ohio%2C+Ohio%2C+Funny%2C+fun+for+kids%2C+libraries%2C+storyteller%2C+folklore%2C+jokes%2C+laughs%2C+small+children%E2%80%99s+party+entertainer%2C+Clown%2C+clowns%2C+Close-up+magic%2C+tricks%2C+games+for+kids%2C+party+for+kids%2C+activities+for+children%2C+activities+for+kids%2C+Akron%2C+Oh%2C+Lake+County%2C+Portage+County%2C+Cuyahoga+County%2C+teacher%2C+educator%2C+poetry%2C+poetry+reading%2C+kidz%2C+students%2C+youngsters%2C+grade+school%2C+all+ages%2C+for+all+ages%2C+costumes%2C+faces%2C+kids+faces%2C+kids+attention.';
var metaContents  = 'Giggles+and+Rosebud+D.+Clown+provide+entertainment+%E2%80%9Cjest+4+kids%E2%80%9D+using+balloon+art%2C+close-up+magic%2C+storytelling%2C+humor+and+jokes%2C+creating+fun+and+excitement+for+children+and+kids+of+all+ages.';
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();
};
