/* [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(''),'/401.html','true',[],'',''],
	['PAGE','114623',jdecode('Super+Bowl+Pics'),jdecode(''),'/114623.html','true',[],'',''],
	['PAGE','57172',jdecode('Specials'),jdecode(''),'/57172.html','true',[],'',''],
	['PAGE','174256',jdecode('Event+Calendar'),jdecode(''),'/174256.html','true',[],'',''],
	['PAGE','174277',jdecode('BTG+Online+Coupons'),jdecode(''),'/174277.html','true',[],'',''],
	['PAGE','58640',jdecode('Online+Ordering'),jdecode(''),'/58640.html','true',[],'',''],
	['PAGE','4643',jdecode('Food+Menus'),jdecode(''),'/4643/index.html','true',[ 
		['PAGE','36101',jdecode('Appetizers'),jdecode(''),'/4643/36101.html','true',[],'',''],
		['PAGE','36122',jdecode('Soups+and+Salads'),jdecode(''),'/4643/36122.html','true',[],'',''],
		['PAGE','36143',jdecode('Burgers'),jdecode(''),'/4643/36143.html','true',[],'',''],
		['PAGE','36164',jdecode('Sandwiches'),jdecode(''),'/4643/36164.html','true',[],'',''],
		['PAGE','36185',jdecode('Entr%C3%A9es'),jdecode(''),'/4643/36185.html','true',[],'',''],
		['PAGE','56392',jdecode('Before+the+Glory-Children'),jdecode(''),'/4643/56392.html','true',[],'',''],
		['PAGE','56483',jdecode('Desserts'),jdecode(''),'/4643/56483.html','true',[],'','']
	],'',''],
	['PAGE','4664',jdecode('Beverage+Selections'),jdecode(''),'/4664/index.html','true',[ 
		['PAGE','32701',jdecode('Beer+Selections'),jdecode(''),'/4664/32701.html','true',[],'',''],
		['PAGE','42101',jdecode('Wine+Selectons'),jdecode(''),'/4664/42101.html','true',[],'',''],
		['PAGE','42122',jdecode('Soft+Drink+Selections'),jdecode(''),'/4664/42122.html','true',[],'','']
	],'',''],
	['PAGE','80412',jdecode('Catering'),jdecode(''),'/80412.html','true',[],'',''],
	['PAGE','66001',jdecode('BTG+Arena'),jdecode(''),'/66001/index.html','true',[ 
		['PAGE','66022',jdecode('Monday+Night+Football+%26%23x27%3B09'),jdecode(''),'/66001/66022.html','true',[],'',''],
		['PAGE','66043',jdecode('Glory+Notes'),jdecode(''),'/66001/66043.html','true',[],'',''],
		['PAGE','61018',jdecode('Local+Sports+Schedules'),jdecode(''),'/66001/61018.html','true',[],'',''],
		['PAGE','93323',jdecode('Local+Sports+Stars'),jdecode(''),'/66001/93323.html','true',[],'','']
	],'',''],
	['PAGE','42143',jdecode('Online+Store'),jdecode(''),'/42143.html','true',[],'',''],
	['PAGE','32764',jdecode('Press%2FMedia'),jdecode(''),'/32764.html','true',[],'',''],
	['PAGE','4601',jdecode('Hours+%26+Contact+Info'),jdecode(''),'/4601.html','true',[],'',''],
	['PAGE','45701',jdecode('Feedback'),jdecode(''),'/45701/index.html','true',[ 
		['PAGE','46001',jdecode('Feedback+%28follow+up+page%29'),jdecode(''),'/45701/46001.html','false',[],'','']
	],'','']];
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 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:  '58640',
internalId:  '',
customField: '20090817-220621'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090817-200430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57172',
internalId:  '',
customField: '20100723-171727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4643',
internalId:  '',
customField: '20090921-225024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20090921-225050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36122',
internalId:  '',
customField: '20100404-002734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36143',
internalId:  '',
customField: '20090921-225305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36164',
internalId:  '',
customField: '20090921-225337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36185',
internalId:  '',
customField: '20100404-185544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56392',
internalId:  '',
customField: '20090921-225444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56483',
internalId:  '',
customField: '20090921-225522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4664',
internalId:  '',
customField: '20090817-235355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32701',
internalId:  '',
customField: '20090818-000638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20100404-205242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42122',
internalId:  '',
customField: '20100404-211058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80412',
internalId:  '',
customField: '20090911-161749'
};
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: '20090830-233150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66022',
internalId:  '',
customField: '20090830-233344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66043',
internalId:  '',
customField: '20100620-171727'
};
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:  '32764',
internalId:  '',
customField: '20090818-011023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20090921-225804'
};
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: '20100629-194600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45701',
internalId:  '',
customField: '20090818-012127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20080602-224603'
};
var canonHostname = 'wsc-worker02.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();
};
