/* [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','1301',jdecode('Home'),jdecode(''),'/1301.html','true',[],'',''],
	['PAGE','14601',jdecode('Picture+Gallery'),jdecode(''),'/14601.html','true',[],'',''],
	['PAGE','6001',jdecode('Hours+of+Operation'),jdecode(''),'/6001.html','true',[],'',''],
	['PAGE','6022',jdecode('How+to+find+us'),jdecode(''),'/6022.html','true',[],'',''],
	['PAGE','6043',jdecode('Our+Team'),jdecode(''),'/6043.html','true',[],'',''],
	['PAGE','6064',jdecode('E-Mail+Club+%26+Cub+Club'),jdecode(''),'/6064/index.html','true',[ 
		['PAGE','10501',jdecode('Join+our+Clubs+%28follow+up+page%29'),jdecode(''),'/6064/10501.html','false',[],'','']
	],'',''],
	['PAGE','6085',jdecode('Daily+Deals'),jdecode(''),'/6085.html','true',[],'',''],
	['PAGE','6127',jdecode('Main+Menu'),jdecode(''),'/6127.html','true',[],'',''],
	['PAGE','6148',jdecode('Bar+Menu'),jdecode(''),'/6148.html','true',[],'',''],
	['PAGE','6169',jdecode('Wine+List'),jdecode(''),'/6169.html','true',[],'',''],
	['PAGE','6190',jdecode('Monthly+Lunch+Menu'),jdecode(''),'/6190.html','true',[],'',''],
	['PAGE','6211',jdecode('Special+Events+Menu'),jdecode(''),'/6211.html','true',[],'',''],
	['PAGE','9701',jdecode('Banquets'),jdecode(''),'/9701.html','true',[],'',''],
	['PAGE','13601',jdecode('Catering'),jdecode(''),'/13601.html','true',[],'',''],
	['PAGE','6232',jdecode('Upcoming+Events'),jdecode(''),'/6232.html','true',[],'',''],
	['PAGE','6253',jdecode('Reservations'),jdecode(''),'/6253.html','true',[],'',''],
	['PAGE','6274',jdecode('Contact+Us'),jdecode(''),'/6274/index.html','true',[ 
		['PAGE','8901',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/6274/8901.html','false',[],'','']
	],'',''],
	['PAGE','22301',jdecode('Map'),jdecode(''),'/22301.html','true',[],'',''],
	['PAGE','26366',jdecode('Coupons'),jdecode(''),'/26366.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Cater';
theSitetree.paletteFamily='DFDEDC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10475';
theSitetree.graphicsetId='10959';
theSitetree.contentColor='0000A0';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cater',
				paletteFamily: 	'DFDEDC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10475',
				graphicsetId: 	'10959',
				contentColor: 	'0000A0',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'ADACAC',
				e_color: 		'ADACAC',
				f_color: 		'ADACAC',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1301',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '22301',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-164360']={
webappId:    '1501',
documentId:  '1301',
internalId:  '164360',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-8126']={
webappId:    '7008',
documentId:  '6274',
internalId:  '8126',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-8127']={
webappId:    '7008',
documentId:  '6064',
internalId:  '8127',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26366',
internalId:  '',
customField: '20100728-141757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1301',
internalId:  '',
customField: '20100728-140124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6190',
internalId:  '',
customField: '20100701-092924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6211',
internalId:  '',
customField: '20090921-235429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6232',
internalId:  '',
customField: '20100728-141329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6253',
internalId:  '',
customField: '20070330-234150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6043',
internalId:  '',
customField: '20100528-142546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20100515-132832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20070311-223017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6022',
internalId:  '',
customField: '20100528-142126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6064',
internalId:  '',
customField: '20100129-162133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20070311-162014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6085',
internalId:  '',
customField: '20100701-093022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6127',
internalId:  '',
customField: '20090922-231512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6148',
internalId:  '',
customField: '20100528-142518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6169',
internalId:  '',
customField: '20100129-162736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20100528-142628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20100129-163021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6274',
internalId:  '',
customField: '20100528-142309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20070119-025539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20071119-152338'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXEYH';
var companyName   = 'Aspen+Restaurant+and+Bar';
var htmlTitle	  = 'Aspen+Restaurant+and+Bar';
var metaKeywords  = 'Restaurant++Catering++Banquets++Bar++Club';
var metaContents  = 'Restaurant++Catering++Banquets++Bar++Club';
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();
};
