/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','57172',jdecode('Specials'),jdecode(''), jdecode('%2F57172.html'), 'true',[],'',''],
	['PAGE','174256',jdecode('Event+Calendar'),jdecode(''), jdecode('%2F174256.html'), 'true',[],'',''],
	['PAGE','174277',jdecode('BTG+Online+Coupons'),jdecode(''), jdecode('%2F174277.html'), 'true',[],'',''],
	['PAGE','58640',jdecode('Online+Ordering'),jdecode(''), jdecode('%2F58640.html'), 'true',[],'',''],
	['PAGE','4643',jdecode('Food+Menus'),jdecode(''), jdecode('%2F4643%2Findex.html'), 'true',[ 
		['PAGE','36101',jdecode('Appetizers'),jdecode(''), jdecode('%2F4643%2F36101.html'), 'true',[],'',''],
		['PAGE','36122',jdecode('Soups+and+Salads'),jdecode(''), jdecode('%2F4643%2F36122.html'), 'true',[],'',''],
		['PAGE','36143',jdecode('Burgers'),jdecode(''), jdecode('%2F4643%2F36143.html'), 'true',[],'',''],
		['PAGE','36164',jdecode('Sandwiches'),jdecode(''), jdecode('%2F4643%2F36164.html'), 'true',[],'',''],
		['PAGE','279711',jdecode('Wraps'),jdecode(''), jdecode('%2F4643%2F279711.html'), 'true',[],'',''],
		['PAGE','36185',jdecode('Entr%C3%A9es'),jdecode(''), jdecode('%2F4643%2F36185.html'), 'true',[],'',''],
		['PAGE','56392',jdecode('Before+the+Glory-Children'),jdecode(''), jdecode('%2F4643%2F56392.html'), 'true',[],'',''],
		['PAGE','56483',jdecode('Desserts'),jdecode(''), jdecode('%2F4643%2F56483.html'), 'true',[],'','']
	],'',''],
	['PAGE','4664',jdecode('Beverage+Selections'),jdecode(''), jdecode('%2F4664%2Findex.html'), 'true',[ 
		['PAGE','32701',jdecode('Beer+Selections'),jdecode(''), jdecode('%2F4664%2F32701.html'), 'true',[],'',''],
		['PAGE','42101',jdecode('Wine+Selectons'),jdecode(''), jdecode('%2F4664%2F42101.html'), 'true',[],'',''],
		['PAGE','42122',jdecode('Soft+Drink+Selections'),jdecode(''), jdecode('%2F4664%2F42122.html'), 'true',[],'','']
	],'',''],
	['PAGE','80412',jdecode('Catering'),jdecode(''), jdecode('%2F80412.html'), 'true',[],'',''],
	['PAGE','42143',jdecode('Online+Store'),jdecode(''), jdecode('%2F42143.html'), 'true',[],'',''],
	['PAGE','4601',jdecode('Hours+%26+Contact+Info'),jdecode(''), jdecode('%2F4601.html'), 'true',[],'',''],
	['PAGE','45701',jdecode('Feedback'),jdecode(''), jdecode('%2F45701%2Findex.html'), 'true',[ 
		['PAGE','46001',jdecode('Feedback+%28follow+up+page%29'),jdecode(''), jdecode('%2F45701%2F46001.html'), 'false',[],'','']
	],'',''],
	['PAGE','114623',jdecode('Super+Bowl+Pics'),jdecode(''), jdecode('%2F114623.html'), 'false',[],'',''],
	['PAGE','66001',jdecode('BTG+Arena'),jdecode(''), jdecode('%2F66001%2Findex.html'), 'false',[ 
		['PAGE','66022',jdecode('Monday+Night+Football+%26%23x27%3B10'),jdecode(''), jdecode('%2F66001%2F66022.html'), 'true',[],'',''],
		['PAGE','66043',jdecode('Glory+Notes'),jdecode(''), jdecode('%2F66001%2F66043.html'), 'true',[],'',''],
		['PAGE','61018',jdecode('Local+Sports+Schedules'),jdecode(''), jdecode('%2F66001%2F61018.html'), 'true',[],'',''],
		['PAGE','93323',jdecode('Local+Sports+Stars'),jdecode(''), jdecode('%2F66001%2F93323.html'), 'true',[],'','']
	],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '279711',
internalId:  '',
customField: '20110604-020036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58640',
internalId:  '',
customField: '20111206-124723'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20111206-111252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57172',
internalId:  '',
customField: '20110903-010507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4643',
internalId:  '',
customField: '20090921-225024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20110603-234948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36122',
internalId:  '',
customField: '20110604-002923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36143',
internalId:  '',
customField: '20110604-005809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36164',
internalId:  '',
customField: '20110604-015702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36185',
internalId:  '',
customField: '20110604-125320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56392',
internalId:  '',
customField: '20110604-130454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56483',
internalId:  '',
customField: '20110604-131254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4664',
internalId:  '',
customField: '20090817-235355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32701',
internalId:  '',
customField: '20110604-135457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20100404-205242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42122',
internalId:  '',
customField: '20110604-152205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80412',
internalId:  '',
customField: '20111212-150728'
};
webappMappings['7008']=webappMappings['7008-7754']={
webappId:    '7008',
documentId:  '45701',
internalId:  '7754',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-464']={
webappId:    '7008',
documentId:  '80412',
internalId:  '464',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66001',
internalId:  '',
customField: '20101014-140234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66022',
internalId:  '',
customField: '20101206-161448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66043',
internalId:  '',
customField: '20110228-185407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114623',
internalId:  '',
customField: '20090921-223414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93323',
internalId:  '',
customField: '20090211-145938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42143',
internalId:  '',
customField: '20100313-232552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20111206-114124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61018',
internalId:  '',
customField: '20090830-234407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '174256',
internalId:  '',
customField: '20090921-224509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '174277',
internalId:  '',
customField: '20111206-130022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45701',
internalId:  '',
customField: '20111206-114310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20080602-224603'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INE356';
var companyName   = '+707-775-3775++++++++++++++++++++++++++++...';
var htmlTitle	  = 'Beyond+the+Glory+Sports+Bar+and+Grill+Restaurant';
var metaKeywords  = 'sports%2C+bar%2C+grill%2C+restaurant%2C+menu%2C+catering%2C+petaluma%2C+beer%2C+wine%2C+soda%2C+BTG%2C+BTGsports%2C+BTGsportsbar%2C+btgarena%2C+orderbtg%2C+btg+daily+specials%2C+beyond+the+glory+daily+specials';
var metaContents  = 'Petalumas+and+the+North+Bays+best+sports+bars+and+grill.++16+giant+screens%2C+great+food%2C+and+family+friendly.++';
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();
};

