/* [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','701',jdecode('home'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','962',jdecode('about+us'),jdecode(''),'/962/index.html','true',[ 
		['PAGE','773',jdecode('playroom+fun'),jdecode(''),'/962/773.html','true',[],'',''],
		['PAGE','794',jdecode('menu+'),jdecode(''),'/962/794.html','true',[],'',''],
		['PAGE','1004',jdecode('play+groups'),jdecode(''),'/962/1004.html','true',[],'',''],
		['PAGE','90545',jdecode('membership+%22perks%22'),jdecode(''),'/962/90545.html','true',[],'',''],
		['PAGE','55345',jdecode('fundraisers'),jdecode(''),'/962/55345.html','true',[],'',''],
		['PAGE','40034',jdecode('press'),jdecode(''),'/962/40034.html','true',[],'','']
	],'',''],
	['PAGE','836',jdecode('calendar+%26+special+events'),jdecode(''),'/836.html','true',[],'',''],
	['PAGE','26001',jdecode('birthday+parties'),jdecode(''),'/26001.html','true',[],'',''],
	['PAGE','81345',jdecode('Summer+Classes'),jdecode(''),'/81345/index.html','true',[ 
		['PAGE','88766',jdecode('Little+Kritters+Soccer'),jdecode(''),'/81345/88766.html','true',[],'',''],
		['PAGE','99645',jdecode('%22Clay+With+Me%22+classes'),jdecode(''),'/81345/99645.html','true',[],'',''],
		['PAGE','91245',jdecode('Play+%22House+Music%22'),jdecode(''),'/81345/91245.html','true',[],'',''],
		['PAGE','88787',jdecode('Painting+Picassos'),jdecode(''),'/81345/88787.html','true',[],'','']
	],'',''],
	['PAGE','102845',jdecode('Steven+Courtney+Concert'),jdecode(''),'/102845.html','true',[],'',''],
	['PAGE','50545',jdecode('Cafe+At+Work'),jdecode(''),'/50545.html','true',[],'',''],
	['PAGE','43745',jdecode('Playhouse+Faves...'),jdecode(''),'/43745.html','true',[],'',''],
	['PAGE','941',jdecode('contact+us'),jdecode(''),'/941/index.html','true',[ 
		['PAGE','27501',jdecode('directions'),jdecode(''),'/941/27501.html','true',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='617F92';
theSitetree.keyvisualId='6905';
theSitetree.keyvisualName='kv_6905.jpg';
theSitetree.fontsetId='11216';
theSitetree.graphicsetId='12036';
theSitetree.contentColor='304B5C';
theSitetree.contentBGColor='809DAF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antigua',
				paletteFamily: 	'617F92',
				keyvisualId: 	'6905',
				keyvisualName: 	'kv_6905.jpg',
				fontsetId: 		'11216',
				graphicsetId: 	'12036',
				contentColor: 	'304B5C',
				contentBGColor: '809DAF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100714-202137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20100714-201918'
};
webappMappings['1501']=webappMappings['1501-2585705']={
webappId:    '1501',
documentId:  '701',
internalId:  '2585705',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '962',
internalId:  '',
customField: '20100714-202308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99645',
internalId:  '',
customField: '20100702-112956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1004',
internalId:  '',
customField: '20100205-154441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27501',
internalId:  '',
customField: '20100319-135508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '941',
internalId:  '',
customField: '20100607-154558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43745',
internalId:  '',
customField: '20100714-202626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20100726-173051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26001',
internalId:  '',
customField: '20100625-180236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40034',
internalId:  '',
customField: '20090908-132538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20100714-200450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50545',
internalId:  '',
customField: '20100714-202401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55345',
internalId:  '',
customField: '20091105-085841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81345',
internalId:  '',
customField: '20100628-142715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88766',
internalId:  '',
customField: '20100716-155739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88787',
internalId:  '',
customField: '20100628-151800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90545',
internalId:  '',
customField: '20100421-234015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91245',
internalId:  '',
customField: '20100429-203218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102845',
internalId:  '',
customField: '20100712-165334'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INVQCI';
var companyName   = '++++++The+Playhouse+Cafe++++++++++++++++++++kids+play+while+you+cafe';
var htmlTitle	  = '';
var metaKeywords  = 'play%2C+playhouse%2C+my+playhouse%2C+lemoyne%2C+child-friendly+coffeehouse%2C+kids%2C+play+area%2C+playroom%2C+toddlers%2C+kid-friendly+coffee+shop%2C+pennsylvania%2C+playtime%2C+espresso%2C+lunch%2C+breakfast%2C+meetings%2C+catering%2C+kid+classes%2C+seminars%2C+delivery%2C+donuts%2C+maple+donuts';
var metaContents  = 'kids+play+while+you+cafe%2C+the+playhouse+cafe+in+South+Central+PA+caters+to+guests+of+all+ages.+celebrating+1+year+in+lemoyne%2C+pa.';
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();
};
